This script Demonstrates how to create a hidden window while launching an instance of Notepad.
([wmiclass]"Win32_Process").Create("notepad")
How Much easier can it get?
([wmiclass]"Win32_Process").Create("notepad")
How Much easier can it get?
How many times have you been asked to find out what account is being used for a
specific process or service?
I can count about a hundred.
Well, in two lines you can dazzle your boss or client with this gem:
$process = Get-CimInstance -Class Win32_Process
$process | Invoke-CimMethod -MethodName GetOwner