Hello,
I am trying to:
$MS_table | Where-Object {($_.SystemName -eq '010.000.000.032')} | Select-Object {($_.ManagedSystemID)}
and my table looks like:
![]()
I have no idea why I am not getting output ![]()
Hello,
I am trying to:
$MS_table | Where-Object {($_.SystemName -eq '010.000.000.032')} | Select-Object {($_.ManagedSystemID)}
and my table looks like:
![]()
I have no idea why I am not getting output ![]()
Wo0k45h,
Welcome to the forum. ![]()
What would be the desired output then? It seems you have an output when you say
BTW: Your Select-Object should more likely look like this:
Select-Object -Property ManagedSystemID
Or if you just want the ID as a string:
Select-Object -ExpandProperty ManagedSystemID
Hey,
this table that I posted is my input in $ms_table. I shoul put it before the code ![]()
I want to search the table which is in $ms_table by the SystemName and get proper ManagedSystemID as a variable.
The table is bigger:

I just uploaded the piece of it ![]()
Ah … ok … so this should be enough actually:
$MS_table |
Where-Object { $_.SystemName -eq '010.000.000.032' } |
Select-Object -Property ManagedSystemID
Tried it already, didn’t work for me ![]()
You could try t o use -like instead of -eq and add * in front and at the end of the string. … like so:
$MS_table |
Where-Object { $_.SystemName -like '*010.000.000.032*' } |
Select-Object -Property ManagedSystemID
Which command is providing the table output ? Are you able to get only ManagedSystemID without Where-Object ?
Can you do a $MS_table | Get-Member and share output ?