Anyone knows how, in PowerCLI, set a multiline note on a VM ?
Target goal is to do something like that in VM note:
2020-01-14 - Torrent - Doing something awesome
2019-12-31 - Noobs - Doing blabla
I don't know which chars or which way I have to use to create this new line
I tried before posting and that's not worked, with simple quote...
With double, that's good
By the way, I need to read this new line fron Read-Host command, and that's not working :
Have you any idea how can I force interpretation of input string ?
Yes, when you populate the variable with Read-Host, the string you enter (with the backtick-n) is not expanded.
You will have to force that expansion.
Get-VM -Name MyVM |
Set-VM -Notes $ExecutionContext.InvokeCommand.ExpandString($answer) -Confirm:$false