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.

PowerShell Scanner Profile

Hi All,

I've tried to search to see if anyone has asked the question before on here and through google and found nothing so I apologise if this has been asked before;

Is there any way to have a Scan Profile that grabs data from a PowerShell command (single and multi-line)?

I want to grab the WoL data of active Ethernet adapters using the Get-NetAdapter command, which I'm using to return the DeviceID to further get more settings via WMI MSPower_DeviceWakeEnable.

When I have the status of the WoL of the defined NIC, I then was going to use that as part of a Dynamic Collection, so I can ascertain when and if these settings are dropped when a Service Pack or other otuside influence resets them.

1

Comments

9 comments
Date Votes
  • This is something I've been thinking about as well.

    Off the top of my head, one way to implement this would be to create a script that has what all the WoL settings should be, and checks against the current settings of the target. If the settings don't match, output what has changed to a text file on the local machine. Create a package in Deploy with that script and run it on a schedule (or however you want).

    Then you would be able to add a file scan to any scan profile checking for that file. If it exists, it gets put into a collection for "WoL misconfigured" and you'd be able to follow up from there. You could then have a different package (or just a separate step dependent on targets in the new collection) to reapply the desired WoL configs.

    I haven't sat down and really thought it out, so it's very possible there are much more simple and elegant solutions than mine.

    0
  • This is something we are definitely looking into. I have no ETA on when/if it will be implemented.

    0
  • That would be a suitable work around in this case, thanks for your idea.

    0
  • It would certainly prove to be an immensely powerful tool. WMI only gets you so far, but I doubt there isn't much you couldn't pull using Powershell!

    0
  • This would be pretty generally useful.

    0
  • @William Baldwin Did you ever go further with this?  How did it work out?

    0
  • We're actually building the PowerShell Scanner right now! If you would like to join the private beta, sign up here: https://forms.gle/nFFVqfy2PqYrqP2h6

    0
  • I saw your notices about that beta... can you share what the scanner does / use case?

     

     

    0
  • It allows you to create your own scanner by writing a PowerShell script to gather any information you want. It parses the objects the script outputs to the pipeline and formats them into a table. This screenshot is from an internal alpha version.

    0