I'm running the following command that returns a long list of virtual machines:
$vms = Get-AzureRmVM -status | select name,@{ n='IP Address'; e={"IP removed"}}, @{ n='OsType';
e={$_.StorageProfile.OsDisk.OsType}}, powerState
$vms
When I pipe into replace, there is literally no data left..
$vms = Get-AzureRmVM -status | select name,@{ n='IP Address'; e={"IP removed"}}, @{ n='OsType';
e={$_.StorageProfile.OsDisk.OsType}}, powerState | replace "VM Running", "poweredOn"
$vms
I get nothing back.