Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (25 loc) · 1.31 KB

ConvertTo-Base64.README.md

File metadata and controls

40 lines (25 loc) · 1.31 KB

ConvertTo-Base64

Convert a text (command) to an Base64 encoded string.

Description

Convert a text (command) to an Base64 encoded string.

Screenshot

Syntax

ConvertTo-Base64 [-Text] <String> [<CommonParameters>]

ConvertTo-Base64 [-FilePath] <String> [<CommonParameters>]

Example

PS> ConvertTo-Base64 -Text 'Set-Location -Path "E:\Temp\Files\";Get-ChildItem'

UwBlAHQALQBMAG8AYwBhAHQAaQBvAG4AIAAtAFAAYQB0AGgAIAAiAEUAOgBcAFQAZQBtAHAAXABGAGkAbABlAHMAXAAiADsARwBlAHQALQBDAGgAaQBsAGQASQB0AGUAbQA=

PS> powershell.exe -NoProfile -EncodedCommand "UwBlAHQALQBMAG8AYwBhAHQAaQBvAG4AIAAtAFAAYQB0AGgAIAAiAEUAOgBcAFQAZQBtAHAAXABGAGkAbABlAHMAXAAiADsARwBlAHQALQBDAGgAaQBsAGQASQB0AGUAbQA="

    Directory: E:\Temp\Files


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        8/21/2016   5:54 PM              5 File_01.txt
-a----        8/20/2016  12:54 AM              9 File_02.txt
-a----        8/20/2016  12:08 AM             14 File_03.txt
-a----        6/24/2016   5:01 PM            120 File_04.zip
-a----        8/20/2016  12:54 AM             14 File_05.txt