During the OS installation, SMBv1 can be temporarily enabled on the target for joining it to a domain.Reset the value , once the operation is finished. Steps to Enable SMBv1 during OSIM Job:
1. Open the custom.cmd :
- If you are creating the OS Image the file can be changed in DSM\osimips\os-template\images\<WINDOWS OS TYPE>\oeminst
- If the OS image already exists , change the file from the location: DSM\Server\SDBS\var\managedpc\images\<ImageName>\<ImageName>\oeminst
Add the following commands before the agent installation step:
echo Enable SMBv1 protocol, to enable the target to join it to a Domain >> c:\calogfile.txt
powershell -Command "Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol" -norestart -All" >> c:\calogfile.txt
e.g.:
<Please see attached file for image>

2. Open the oobecustom.cmd :
- If you are creating the OS Image the file can be changed in DSM\osimips\os-template\images\<WINDOWS OS TYPE>\oeminst
- If the OS image already exists , change the file from the location: DSM\Server\SDBS\var\managedpc\images\<ImageName>\<ImageName>\oeminst
Add the following commands After the Domain Joining step:
echo Disable SMBv1 protocol after joining the target to a Domain >> c:\calogfile.txt
powershell -Command "Disable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol" -norestart" >> c:\calogfile.txt
e.g.
<Please see attached file for image>

3. Initiate the OSIM job after these changes.
4. The target machine would be joined to a Domain after the successful completion of the OSIM Job.