Can't think any way but with ksh/perl, so powershell is annoying.
Attempting to process through a list of names and execute a command in which the variable is combined/concatenated with another string.
Input:
PS C:\WINDOWS\SysWOW64\windowspowershell\v1.0> $fc_volumes | select-object -first 10
volume
------
dnvlxd531_archives
dnvux100_quorum
oraapps_quorum
dnv05_lun04
sdw_cl_dnv05_lun11_0
FCP_vol132
dnv05_lun37
dnv05_lun36
Attempted command and output:
PS C:\WINDOWS\SysWOW64\windowspowershell\v1.0> $fc_volumes | foreach-object { $_ } {dfm perf data retrieve -o dnvnaf005:/$_ -C volume:total_ops -V "Volume IOPs View" }
Error: Failed to get counter data
Reason: There is no object named 'dnvnaf005:/Microsoft.PowerShell.Commands.Internal.Format.FormatStartData'.
Error: Failed to get counter data
Reason: There is no object named 'dnvnaf005:/Microsoft.PowerShell.Commands.Internal.Format.GroupStartData'.
Error: Failed to get counter data
Reason: There is no object named 'dnvnaf005:/Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData'.
Error: Failed to get counter data
Reason: There is no object named 'dnvnaf005:/Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData'.
Error: Failed to get counter data
The parser is obviously seeing the formatted stream, but I can't seem to figure out how to have it use just the value, and not all the formating.
Thanks,
Mike