Jump to content

How to handle Poweshell result with autoit


blumi
 Share

Recommended Posts

  • Moderators

Must it be in PS, since you're running it in AutoIt anyway? Natively, you would do something like this:

#include <MsgBoxConstants.au3>

Local $sString = ""
Local $oWMI = ObjGet("winmgmts:\\.\root\Microsoft\Windows\DeviceGuard")
Local $oItems = $oWMI.ExecQuery("SELECT * FROM Win32_DeviceGuard")
    For $sItem In $oItems
        For $sProperty In $sItem.Properties_
            $sString &= $sProperty.Name & ": " & $sProperty.Value & @CRLF
        Next
    Next

MsgBox($MB_SYSTEMMODAL, "DeviceGuard Class Names and Values", $sString)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • 2 weeks later...

I would pipe your powershell wmi queries through bash so you can 'cowsay | lolcat' the output to the console, and obfuscate the whole command just to be a dick about it.

 

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...