Hi,
I'm trying to start PowerShell using Start-Process. Task looks simple for sure.
Start-Process -FilePath C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ArgumentList "-NoExit","-command `"& { get-date } "
I can handle variables also,
Start-Process -FilePath C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ArgumentList "-NoExit","-command `"& { `$date = get-date; `$date } "
Main problem is that I would like to have "here" strings inside script block.
$str = @"
text
"@
But I was not able to find how to do this.
Any help is appreciated.
Krunoslav