TestimoX

API Reference

Command

Set-CxSmbConfig

Namespace ComputerX.PowerShell
Inputs
System.String
Outputs
ComputerX.Smb.SmbConfigWriter+Result

Sets SMB server/client security configuration (selected fields only).

Examples

Authored help example

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 optionalposition: 0pipeline: true (ByPropertyName)
Target computer(s). Use '.' for local computer or provide DNS names.
AutoShareServer bool optionalposition: namedpipeline: false
Enables or disables automatic administrative shares on server SKUs.
AutoShareWks bool optionalposition: namedpipeline: false
Enables or disables automatic administrative shares on workstation SKUs.
ClientAllowInsecureGuestAuth bool optionalposition: namedpipeline: false
Allows or blocks insecure guest authentication on the SMB client.
ClientSigningEnabled bool optionalposition: namedpipeline: false
Enables SMB signing support on the client component without making it mandatory.
ClientSigningRequired bool optionalposition: namedpipeline: false
Requires SMB signing on the client component.
EnableLmHosts bool optionalposition: namedpipeline: false
Enables or disables LMHOSTS name resolution.
EnablePlainTextPassword bool optionalposition: namedpipeline: false
Allows or blocks plaintext password usage for SMB clients.
EveryoneIncludesAnonymous bool optionalposition: namedpipeline: false
Controls whether the Everyone SID includes anonymous users.
LmCompatibilityLevel int optionalposition: namedpipeline: false
Sets the LM compatibility level used for NTLM negotiation.
MergeNullLists SwitchParameter optionalposition: namedpipeline: false
Merges null-session share and pipe lists with existing values instead of replacing them.
NodeType int optionalposition: namedpipeline: false
Sets the NetBIOS node type value.
NullSessionPipes string[] optionalposition: namedpipeline: false
Null session named pipes to apply (if provided).
NullSessionShares string[] optionalposition: namedpipeline: false
Null session shares to apply (if provided).
RestartLanmanServer SwitchParameter optionalposition: namedpipeline: false
Restarts the LanmanServer service after applying SMB configuration changes.
RestrictAnonymous int optionalposition: namedpipeline: false
Sets the classic RestrictAnonymous security option value.
RestrictAnonymousSam int optionalposition: namedpipeline: false
Sets the RestrictAnonymousSAM security option value.
ServerRestrictNullSessAccess bool optionalposition: namedpipeline: false
Restricts anonymous null-session access on the SMB server.
ServerSigningEnabled bool optionalposition: namedpipeline: false
Enables SMB signing support on the server component without making it mandatory.
ServerSigningRequired bool optionalposition: namedpipeline: false
Requires SMB signing on the server component.
ServerSmb1Enabled bool optionalposition: namedpipeline: false
Enables or disables SMBv1 on the server component.
ServerSmb2Enabled bool optionalposition: namedpipeline: false
Enables or disables SMBv2 or later on the server component.

Outputs

ComputerX.Smb.SmbConfigWriter+Result