Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ScriptingPro/56496f6d453b269bfaabe149c28962fd to your computer and use it in GitHub Desktop.
Save ScriptingPro/56496f6d453b269bfaabe149c28962fd to your computer and use it in GitHub Desktop.
AD Object Property Types and New-AD* Cmdlet Parameter Types
# Determine which AD Group attributes are of type string
$GetGroupStringProperties = $((Get-ADGroup -Filter * -ResultSetSize 1 -Properties *).psobject.properties | ?{$_.TypeNameOfValue -eq "System.String"}).Name
# Determine which parameters are expecting strings for New-AdGroup
$NewGroupStringParameters = $((Get-Help New-ADGroup).parameters.parameter | ?{$_.type.name -eq "string"}).Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment