Read computer status report with Powershell
With powershell, I want to read and export all status messages from a specific system or computer object.

I used a commandLet "Get-CMComponentStatusMessage" but don't understand how using it.

This is OK (Get-Date -year 2015 -month 06 -day 01)

Get-CMComponentStatusMessage -ViewingPeriod (Get-Date -year 2015 -month 06 -day 01) -ComponentName "Task Sequence Action"

This is Not OK Error on the gate-date format (Get-Date -year 2015 -month 06 -day 23)

Get-CMComponentStatusMessage -ViewingPeriod (Get-Date -year 2015 -month 06 -day 23) -ComponentName "Task Sequence Action"


Other

I want specified a computer name with -ComputerName but it return nothing. I need to create a filter with: Where-Object {$_.MachineName -eq "ComputerName"} 

Get-CMComponentStatusMessage -ViewingPeriod (Get-Date -year 2015 -month 06 -day 01) -ComponentName "Task Sequence Action" | Where-Object {$_.MachineName -eq "ComputerName"} 

Is it the solution or do you have a n other solution to do my function?



June 25th, 2015 9:45pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics