What is the Deal with PowerShell?
What's the deal with PowerShell?
Here is the VBScript code to list services:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery("Select * from Win32_Service")
For Each objService in colServiceList
wscript.echo objService.name
Next
Here is the script to do the same thing in PowerShell:
Get-Service
Which would you rather memorize?