-
When you run get-process you will see a number of entries named svchost. These are processes that host services. In task manager on Windows 7 and below all we see is the svchost entry. In the Windows 8 family we see the services running in a particular...
-
Tripped over an interesting problem I want to use the [wmiclass] accelerator because I need to find the key of a WMI class (code borrowed from PowerShell team blog – to be returned when I’ve finished with it) $t = [WMIClass]$class $t.properties...
-
A simple query that demonstrates how to query for multiple values. We want to stop the running services that are running where the names a like BITS and WinRm Get-WmiObject -Class Win32_Service -Filter "State='Running' AND Name LIKE '...
-
We cam use the [wmiclass] to create a process but it doesn’t allow us to set the credentials. We can get round that by using a bit of .NET code. [wmiclass] is as accelerator for System.Management.ManagementClass so we go back to basics function new-process...
-
Using select-object (aliased to select in common usage) to reduce the number of properties passing into further processing is a common aspect of using PowerShell. However, its not the only place we can do it. Consider this scenario. We need to test the...
-
One of the major errors I see PowerShell newcomers performing is copying script structures and syntax of VBScript into PowerShell. Let me give you an example This piece of VBScript is borrowed from the Windows 2000 scripting guide strComputer Read...
-
Do you know which accounts are used to start the services running on your machines? if you need this information try: Get-WmiObject -Class Win32_Service | select Name, DisplayName, StartName For a remote machine this becomes Get-WmiObject -Class Win32_Service...