Hi all,
I have the below code to get the alarm de finitions that are enabled and I want to split the name/string from the second empty space until the end:
Get-AlarmDefinition | where-Object {$_.Enabled -eq 'True'} | Select-Object name, @{N="Short Name";E={ $_.Name.Split('')[2]}} | Export-Csv $outfile -NoTypeInformation -UseCulture
The alarms are for example:
Type:3 Team:Ops Virtual machine reboot or shut down (IP:192.168.0.1)
but I'm getting just:
Virtual
How can I split from the second empty space until the end of the string to get it like:
Virtual machine reboot or shut down (IP:192.168.0.1)
Thanks.