< Back
Format-CADSearchFilterValue
Post
NAME Format-CADSearchFilterValue
SYNOPSIS
Escapes Active Directory special characters from a string.
SYNTAX
Format-CADSearchFilterValue [-String] <String> [<CommonParameters>]
DESCRIPTION
There are special characters in Active Directory queries/searches. This function escapes them so they aren't
treated as AD commands/characters.
PARAMETERS
-String <String>
The string to escape.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String. The input string with any Active Directory-sensitive characters escaped.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Format-CADSearchFilterValue -String "I have AD special characters (I think)."
Returns
I have AD special characters \\28I think\\29.
RELATED LINKS
http://msdn.microsoft.com/en-us/library ... characters
SYNOPSIS
Escapes Active Directory special characters from a string.
SYNTAX
Format-CADSearchFilterValue [-String] <String> [<CommonParameters>]
DESCRIPTION
There are special characters in Active Directory queries/searches. This function escapes them so they aren't
treated as AD commands/characters.
PARAMETERS
-String <String>
The string to escape.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String. The input string with any Active Directory-sensitive characters escaped.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Format-CADSearchFilterValue -String "I have AD special characters (I think)."
Returns
I have AD special characters \\28I think\\29.
RELATED LINKS
http://msdn.microsoft.com/en-us/library ... characters