Hi
I want to extract only the first line of the annotations note of a vm.
Wat i have tried
$vm = get-vm windows1
$vm.description | select -first 1
But i keep getting the full description that look like this
Microsoft exchange server
support : 24x7
OTAP : Production
Status: In Production
Try something like this
$vm = get-vm windows1
$vm.description -split '["\n\r"|"\r\n"|\n|\r]' | select -First 1
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try something like this
$vm = get-vm windows1
$vm.description -split '["\n\r"|"\r\n"|\n|\r]' | select -First 1
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks again Luc!
That was what I was looking for