Hello everyone I have a problem with powershell if anyone could explain why I am receiving an error it would be greatly appreciated.
Trying to assign a simple string...
powershell $stringAssign = 'random string here'
= : The term '=' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Also tried putting it inside of a function, but it shows different error this time and a command I didn't even run...
powershell function DoStuff{$stringAssign = '3c68746d6c20786d6c6e733d22687474703a2f2f777777'}
At line:1 char:17 function DoStuff -encodedCommand JABzAHQAcgBpAG4AZwBBAHMAcwBpAGcAbgAg ... ~ Missing function body in function declaration.
Please anyone that can explain what is going on here and why an error is happening when trying to assign a simple string, it would be greatly appreciated.