CmdID / PowerShell / Cmdlets / ConvertFrom
ConvertFrom-SddlString
Converts a SDDL string to a custom object. PowerShell reference
From the PowerShell reference 2 parameters
What it does
Converts a SDDL string to a custom object. The ConvertFrom-SddlString cmdlet converts a Security Descriptor Definition Language string to a custom PSCustomObject object with the following properties: Owner, Group, DiscretionaryAcl, SystemAcl and RawDescriptor. Owner, Group, DiscretionaryAcl and SystemAcl properties contain a readable text representation of the access rights specified in a SDDL string. This cmdlet was introduced in PowerShell 5.0.
ConvertFrom-SddlString [-Sddl] <String> [-Type <Object>] [<CommonParameters>]
Convert file system access rights SDDL to a PSCustomObject
$acl = Get-Acl -Path C:\Windows
ConvertFrom-SddlString -Sddl $acl.SddlIdentifyConvert registry access rights SDDL to a PSCustomObject
$acl = Get-Acl HKLM:\SOFTWARE\Microsoft\
ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRightsIdentifyConvert registry access rights SDDL to a PSCustomObject by using ConvertFrom-SddlString with and without the -Type parameter
$acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\
ConvertFrom-SddlString -Sddl $acl.Sddl |
ForEach-Object {$_.DiscretionaryAcl[0]}IdentifyConvert Active Directory access rights SDDL to a PSCustomObject
$user = [adsi]"LDAP://CN=username,CN=Users,DC=domain,DC=com"
ConvertFrom-SddlString $user.psbase.ObjectSecurity.Sddl -Type ActiveDirectoryRightsIdentifyIts page in the reference: ConvertFrom-SddlString.
Parameters
-SddlSpecifies the string representing the security descriptor in SDDL syntax.-TypeSpecifies the type of rights that SDDL string represents.
The acceptable values for this parameter are:
- FileSystemRights
- RegistryRights
- ActiveDirectoryRights
- MutexRights
- SemaphoreRights
- CryptoKeyRights
- EventWaitHandleRights
By default cmdlet uses file system rights.
CryptoKeyRights and ActiveDirectoryRights are not supported in PowerShell v6 and higher.