Hi,
I would like extract part of the information contained in a column "Notes" my script is
Get-Cluster -Name "XXX" | Get-VM | Select-Object Name ,Notes
Name Cluster Notes
VM1 Cluster1 Application 1 backup date
I would like to list
Name Cluster Notes
VM1 Cluster1 Application 1
For this i try to use regex but the result don't match
(Get-VM).Notes[0][0]
Anyone can help me ?
Thank you very much for your replys
Then you could do something like this
Get-VM |
Select Name,@{N='Note';E={$_.Notes.Split("`n")[0]}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
How is that info entered in the Notes field?
Is that a multi-line entry?
And do you only want to extract the 1st line?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello Luc,
Yes there are multi-line entry. and i would like extrat the first line.
the colomun is like below
Name Apply
Last Backup
Last run time
etc...
Thank you 🙂
Then you could do something like this
Get-VM |
Select Name,@{N='Note';E={$_.Notes.Split("`n")[0]}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes it's done
Thank you again 🙂