Skip to content

Remove‐SMBSecurityDACL

James Kehr edited this page Sep 6, 2022 · 1 revision

Remove-SMBSecurityDACL

SYNOPSIS

Removes a DACL from an SMBSecurityDescriptor.

SYNTAX

Remove-SMBSecurityDACL [-SecurityDescriptor] <PSObject> [-DACL] <SMBSecDaclAce> [-PassThru]
 [<CommonParameters>]

DESCRIPTION

Removes a DACL from an SMBSecurityDescriptor. This does not commit the change to the system, it only modifies the SMBSecurityDescriptor. The Save-SMBSecurity cmdlet is used to commit changes to a SMBSecurityDescriptor to the system.

EXAMPLES

Example 1

PS C:\> $SD = Get-SMBSecurity -SecurityDescriptorName SrvsvcSharePrintInfo
PS C:\> $DACL = $SD | Where-Object {$_.Account.Username -eq "Everyone"}
PS C:\> $DACL | Remove-SMBSecurityDACL -SecurityDescriptor $SD

This example removes the Everyone group DACL from the SrvsvcSharePrintInfo SMB SecurityDescriptor.

PARAMETERS

-DACL

The DACL being removed to the SMBSecurityDescriptor. The DACL must be an exact match to a DACL in the SMBSecurityDescriptor object.

Type: SMBSecDaclAce
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru

Outputs the modified SMBSecurityDescriptor to the success stream.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityDescriptor

The SMBSecurityDescriptor object where the DACL should be removed. The SMBSecurityDescriptor object must originate from Get-SMBSecurity.

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

SMBSecDaclAce

OUTPUTS

System.Object

NOTES

RELATED LINKS

Remove-SMBSecurityDACL

Clone this wiki locally