I encoded a command, because it has curly brackets, that I want to paste into a website. The issue I am having is when I try to use the SendWait command I keep coming up with a EncodedCommand Error. How would I go about pasting the encoded command into a website.
Here is the code:
start-process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -ArgumentList 'https://www.memonotepad.com/'
Start-Sleep -Seconds 3
$command = @'
Hello {Number 1},
Hello {Number 2},
Hello "Number 3",
Hello "Number 4",
'@
$bytes = [System.Text.Encoding]::Unicode.GetBytes($command)
$encodedCommand = [Convert]::ToBase64String($bytes) | clip.exe
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("$command")
I want to be able to paste this data into that memo pad website as is inside the single quotation. Would I have to decode it first or is there another method.
Please Help, thank you!