API Reference
Command
Set-CxSmbConfig
Sets SMB server/client security configuration (selected fields only).
Examples
Example 1
Set-CxSmbConfig -ServerSigningRequired $true -ClientAllowInsecureGuestAuth $false -RestrictAnonymous 1 -RestartLanmanServer
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Set-CxSmbConfig [-ComputerName <string>] [-AutoShareServer <bool>] [-AutoShareWks <bool>] [-ClientAllowInsecureGuestAuth <bool>] [-ClientSigningEnabled <bool>] [-ClientSigningRequired <bool>] [-EnableLmHosts <bool>] [-EnablePlainTextPassword <bool>] [-EveryoneIncludesAnonymous <bool>] [-LmCompatibilityLevel <int>] [-MergeNullLists] [-NodeType <int>] [-NullSessionPipes <string[]>] [-NullSessionShares <string[]>] [-RestartLanmanServer] [-RestrictAnonymous <int>] [-RestrictAnonymousSam <int>] [-ServerRestrictNullSessAccess <bool>] [-ServerSigningEnabled <bool>] [-ServerSigningRequired <bool>] [-ServerSmb1Enabled <bool>] [-ServerSmb2Enabled <bool>] [<CommonParameters>]#Parameters
- ComputerName string
- Target computer(s). Use '.' for local computer or provide DNS names.
- AutoShareServer bool
- Enables or disables automatic administrative shares on server SKUs.
- AutoShareWks bool
- Enables or disables automatic administrative shares on workstation SKUs.
- ClientAllowInsecureGuestAuth bool
- Allows or blocks insecure guest authentication on the SMB client.
- ClientSigningEnabled bool
- Enables SMB signing support on the client component without making it mandatory.
- ClientSigningRequired bool
- Requires SMB signing on the client component.
- EnableLmHosts bool
- Enables or disables LMHOSTS name resolution.
- EnablePlainTextPassword bool
- Allows or blocks plaintext password usage for SMB clients.
- EveryoneIncludesAnonymous bool
- Controls whether the Everyone SID includes anonymous users.
- LmCompatibilityLevel int
- Sets the LM compatibility level used for NTLM negotiation.
- MergeNullLists SwitchParameter
- Merges null-session share and pipe lists with existing values instead of replacing them.
- NodeType int
- Sets the NetBIOS node type value.
- NullSessionPipes string[]
- Null session named pipes to apply (if provided).
- NullSessionShares string[]
- Null session shares to apply (if provided).
- RestartLanmanServer SwitchParameter
- Restarts the LanmanServer service after applying SMB configuration changes.
- RestrictAnonymous int
- Sets the classic RestrictAnonymous security option value.
- RestrictAnonymousSam int
- Sets the RestrictAnonymousSAM security option value.
- ServerRestrictNullSessAccess bool
- Restricts anonymous null-session access on the SMB server.
- ServerSigningEnabled bool
- Enables SMB signing support on the server component without making it mandatory.
- ServerSigningRequired bool
- Requires SMB signing on the server component.
- ServerSmb1Enabled bool
- Enables or disables SMBv1 on the server component.
- ServerSmb2Enabled bool
- Enables or disables SMBv2 or later on the server component.
Outputs
ComputerX.Smb.SmbConfigWriter+Result