IT Toolbox
Menu
HomeProceduresConfigure secure scanning to an SMB folder
Procedure

Configure secure scanning to an SMB folder

Procedure for setting up, a multifunction to deposit the freeways in an SMB sharing

TopicProcedures → About 6 min read

Objective

Configure a multifunction printer to scan to an SMB2 or SMB3 share with a dedicated account, minimal permissions, TCP 445 validation, correct path and authentication, and without re-enabling SMBv1 by default.

  • Do not delete system folders, profiles, event logs or component-store files manually as a shortcut.
  • Before restarting a server or critical service, check dependencies and business impact.
  • Record the current state before making a production change and keep a tested rollback path.
  • Change one variable at a time. Preserve timestamps, logs and configuration evidence so the result can be explained afterward.
  • Use a pilot scope whenever possible and avoid broad service restarts, policy relaxations or destructive cleanup as a first diagnostic step.

Prerequisites

  • Local or remote administrative access and the exact Windows edition/build involved.
  • Enough free space and a recovery path for any repair or cleanup action.
  • Administrative access appropriate to the system being changed or diagnosed.
  • A clearly identified scope: affected users, systems, addresses, services and the time of the observed problem.
  • A maintenance or test window when the procedure can affect production traffic or availability.
  • A copy of the current configuration or other recovery material before any irreversible action.

Step-by-step procedure

Establish the baseline and scope

Before changing anything, reproduce the issue or document the requested change on a representative system. Record the affected users or services, exact time, current configuration, recent changes and a known-good comparison point. This baseline is the reference used to decide whether each later step improves the situation.

  • The scope and current state are documented well enough to reproduce or verify the procedure.

A dedicated account

Implement this requirement in a controlled scope: a dedicated account. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

Minimal permissions

Implement this requirement in a controlled scope: minimal permissions. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

TCP 445 validation

Implement this requirement in a controlled scope: TCP 445 validation. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

Correct path

Implement this requirement in a controlled scope: correct path. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

Authentication

Implement this requirement in a controlled scope: authentication. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

Without re-enabling SMBv1 by default

Implement this requirement in a controlled scope: without re-enabling SMBv1 by default. Capture the previous value or configuration first, make the smallest change that satisfies the design, and validate the effective state rather than assuming that a saved setting is active. If the expected result is not obtained, stop, restore the previous state, and reassess before expanding the change.

  • Evidence for this area is explicit, reproducible and consistent with the intended design.

Validate the complete service

Repeat the original user, system or application workflow from the real source and verify the complete result, not only one command or one local check. Confirm that logs and monitoring show the expected behavior and that no temporary debug, bypass, test account, rule or maintenance setting remains enabled.

  • The end-to-end service works or the remaining failure is isolated to a clearly identified component.

Technical commands from the original procedure

These technical blocks are preserved byte-for-byte from the historical procedure and kept in their original order. Review names, addresses, paths and parameters before use.

Technical block 1

Get-SmbServerConfiguration | Select EnableSMB1Protocol,EnableSMB2Protocol,RequireSecuritySignature,EncryptData

Technical block 2

New-Item -ItemType Directory -Path 'D:ScansAccueil' -Force

Technical block 3

New-SmbShare -Name 'ScansAccueil' -Path 'D:ScansAccueil' -ChangeAccess '<DOMAINESCAN-ACCOUNT>' -FullAccess 'BUILTINAdministrators'

Technical block 4

Get-SmbShare -Name 'ScansAccueil' | Format-List Name,Path

Technical block 5

icacls 'D:ScansAccueil'

Technical block 6

icacls 'D:ScansAccueil' /grant '<DOMAINESCAN-ACCOUNT>:(OI)(CI)M'

Technical block 7

Resolve-DnsName <FILESERVER-FQDN>

Technical block 8

Test-NetConnection <FILESERVER-FQDN> -Port 445

Technical block 9

cmd /c "net use <FILESERVER>ScansAccueil /user:<DOMAINESCAN-ACCOUNT> *"

Technical block 10

New-Item '<FILESERVER>ScansAccueilboai-test.txt' -ItemType File

Technical block 11

cmd /c "net use <FILESERVER>ScansAccueil /delete"

Technical block 12

Get-SmbSession | Select ClientComputerName,ClientUserName,NumOpens

Technical block 13

Get-SmbOpenFile | Select ClientComputerName,ClientUserName,Path

Technical block 14

Get-WinEvent -FilterHashtable @{LogName='Security';Id=4625;StartTime=(Get-Date).AddMinutes(-10)} -ErrorAction SilentlyContinue | Select TimeCreated,Message

Validation

The procedure is validated when:

  • The original symptom or change request has been tested end to end.
  • The effective configuration matches the intended design and no unexplained error remains in the relevant logs.
  • Temporary troubleshooting controls have been removed and monitoring remains normal.
  • The result, evidence and any follow-up action are documented.

Rollback

  • Restore the configuration, policy, binding, route, credential assignment or service state recorded in the baseline when the change does not meet its success criteria.
  • Remove temporary rules, test objects and diagnostic settings that were introduced only for the procedure.
  • After rollback, repeat the minimum health checks to confirm that the previous service level has been restored.

Troubleshooting / common errors

  • Correlate Event Viewer, service state and resource usage with the exact time of the symptom.
  • A repair command that completes successfully does not by itself prove the original application issue is resolved.
  • If the result changes between tests, compare source, destination, identity, time and policy context before changing additional settings.
  • If a command succeeds but the application still fails, continue at the next protocol or application layer instead of widening access.
  • If the expected evidence is missing, verify that logging, auditing and the test path actually cover the failing component.
  • If the change does not improve the measured symptom, restore the previous state and reassess the working hypothesis.

Official and vendor references preserved from the original procedure

  • https://learn.microsoft.com/en-us/powershell/module/smbshare/set-smbserverconfiguration
  • https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3

Adapt names, addresses, paths and parameters to your environment. Back up the configuration and test on a limited scope first.

Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI

My favorites