Set‐SMBSecurityGroup - microsoft/SMBSecurity GitHub Wiki
Replaces the Group in a SecurityDescriptor.
Set-SMBSecurityGroup [-SecurityDescriptor] <PSObject> [[-Account] <String>] [-PassThru] [<CommonParameters>]
Replaces the Group in a SecurityDescriptor.
PS C:\> $SD = Get-SMBSecurity -SecurityDescriptorName SrvsvcDefaultShareInfo
PS C:\> Set-SMBSecurityGroup -SecurityDescriptor $SMBSec -Account "Administrators"Changes the primary group of the SrvsvcDefaultShareInfo SMB SecurityDescriptor to the Administrators group.
WARNING! Extreme caution should be used when chaning SMB SecurityDescriptor group!
The group name. String SID or account/group name, [System.Security.Principal.NTAccount], [System.Security.Principal.SecurityIdentifier] (SID), [SMBSecAccount], and ,[SMBSecGroup] objects are accepted. Strings accept input in '[username|group]', 'domain\[username|group]', and '[username|group]@domain' format.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseReturns the result to the success stream.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe SMBSecurityDescriptor object where the Owner will be changed. The SMBSecurityDescriptor object must originate from Get-SMBSecurity.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
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.