Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private
Set-SmbServerConfiguration -EnableSMB2Protocol $true -Force
Set-ItemProperty `
"HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" `
-Name AllowInsecureGuestAuth `
-Type DWord `
-Value 1 `
-Force
Set-ItemProperty `
"HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" `
-Name RestrictNullSessAccess `
-Type DWord `
-Value 0 `
-Force
Set-SmbShare -Name "ApexScan" -FolderEnumerationMode Unrestricted
Restart-Service LanmanServer -Force