Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

use outputlog

Hi,

I can run a PS command as Deploy (thank you), but I would like to use output of the command.

Collect it and mailing it in one mail.

And depends on output see the computers in a Dynamic collection.

Does it possible somehow or I can use PDQ to run PS command only.

 

Thank you for your help.

BR,

Laszlo

 

1

Comments

4 comments
Date Votes
  • Laszlo,

    What is the PowerShell command that you are trying to run against your computers? Depending on what information you are gathering with PowerShell this could be very simple or very difficult.

    1
  • For example:

    to get disk error from event viewer:

    Get-EventLog -LogName system -InstanceId 51

    Get-EventLog -LogName system -InstanceId 7

     

     

    1
  • Laszlo,

    It looks like you can get event viewer data through WMI, so you might be able to configure a WMI scanner with the info that you want and then filter your dynamic collection based on that data. Here is the SQL query from my test WMI scanner searching for EventCode 7 or EventCode 51:

    select * from win32_NTLogEvent where (EventCode=7 or EventCode=51)

    I had to substantially increase the WMI Timeout in order to make this work. I'm also not getting any results from my test collection, but I'm pretty sure that's because none of these test computers have had those errors.

    1
  • Hi,

    (There was a night here) So, I have test it now. And of course it is working well.

    Many thanks for your fast and usefull help.

     

    BR,

    Laszlo

    1