New‐SMBSecurityDACL - microsoft/SMBSecurity GitHub Wiki
Creates a DACL for a specific SMB SecurityDescriptor (SD).
New-SMBSecurityDACL [-SecurityDescriptorName] <String> [-Access] <SMBSecAccess> [-Rights] <String[]>
[-Account] <Object> [<CommonParameters>]
Creates a DACL for a specific SMB SecurityDescriptor (SD). A DACL must be created for a specific SMB SD because each DACL has a unique set of rights.
PS C:\> $DACLSplat = @{
SecurityDescriptor = 'SrvsvcDefaultShareInfo'
Access = 'Allow'
Right = 'FullControl'
Account = "Administrators"
}
PS C:\> $DACL = New-SMBSecurityDACL @DACLSplatThis sample creates a DACL for the SrvsvcDefaultShareInfo SMB SecurityDescriptor. This DACL object can be added to an SMBSecurityDescriptor object to modify the permission set.
Allow or Deny the the Right(s) for the Account. Please note that Deny overrules Allow.
Type: SMBSecAccess
Parameter Sets: (All)
Aliases:
Accepted values: Allow, Deny
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe user account or group that the Right(s) will apply to.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWhat permissions the account will (Allow) or will not (Deny) have for SMB SecurityDescriptor.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the SMB SecurityDescriptor. The valid set of names are: SrvsvcConfigInfo, SrvsvcConnection, SrvsvcFile, SrvsvcServerDiskEnum, SrvsvcSessionInfo, SrvsvcShareAdminConnect, SrvsvcShareAdminInfo, SrvsvcShareChange, SrvsvcShareConnect, SrvsvcShareFileInfo, SrvsvcSharePrintInfo, SrvsvcStatisticsInfo, SrvsvcTransportEnum, and SrvsvcDefaultShareInfo.
Type: String
Parameter Sets: (All)
Aliases: SDName, Name
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.