Escapes Active Directory special characters from a string.
Format-ADSearchFilterValue [-String] <String> [<CommonParameters>]
There are special characters in Active Directory queries/searches. This function escapes them so they aren't treated as AD commands/characters.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
String | String | The string to escape. |
true | false |
System.String. The input string with any Active Directory-sensitive characters escaped.
Format-ADSearchFilterValue -String "I have AD special characters (I think)."
Returns
I have AD special characters \28I think\29.