< Back
Invoke-Base64UrlEscape
Post
NAME Invoke-Base64UrlEscape
SYNOPSIS
Performs character escaping on a string that is already base64 encoded.
SYNTAX
Invoke-Base64UrlEscape [-InputObject] <String> [-Padding <Char>] [<CommonParameters>]
DESCRIPTION
This cmdlet takes an input and escapes url characters, changing + to - and / to _. The specified
padding character is also removed from the end.
PARAMETERS
-InputObject <String>
The base64 string to escape.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Padding <Char>
The trailing padding character to remove. This defaults to '='.
Required? false
Position? named
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
System.String
OUTPUTS
System.String
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/27/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Base64Str = "SGVsbG8gV29y/bGQhIEhlbG+xvIQ=="
$EscapedStr = $Base64Str | Invoke-Base64UrlEscape
The escaped string will be "SGVsbG8gV29y_bGQhIEhlbG-xvIQ".
RELATED LINKS
SYNOPSIS
Performs character escaping on a string that is already base64 encoded.
SYNTAX
Invoke-Base64UrlEscape [-InputObject] <String> [-Padding <Char>] [<CommonParameters>]
DESCRIPTION
This cmdlet takes an input and escapes url characters, changing + to - and / to _. The specified
padding character is also removed from the end.
PARAMETERS
-InputObject <String>
The base64 string to escape.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Padding <Char>
The trailing padding character to remove. This defaults to '='.
Required? false
Position? named
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
System.String
OUTPUTS
System.String
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/27/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Base64Str = "SGVsbG8gV29y/bGQhIEhlbG+xvIQ=="
$EscapedStr = $Base64Str | Invoke-Base64UrlEscape
The escaped string will be "SGVsbG8gV29y_bGQhIEhlbG-xvIQ".
RELATED LINKS