Created
April 16, 2020 04:44
-
-
Save mrbodean/cc55d33c37a9ce0cf2e8851c2fc30223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TypeQuery = sc.exe query winmgmt|Select-String -Pattern "TYPE" -SimpleMatch | |
$type = $TypeQuery.ToString().Trim().Split(':')[1].trim().split(' ')[0] | |
$type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment