Relative Content

Tag Archive for windowspowershell

I couldn’t shutdown Vemem

enter image description here
It used 3GB of my memory, but my virtual machine was shut down and the memory was not recycled.

get disk information using PowerShell

I’m trying to query disk information on Windows using PowerShell. I need to return Drive Letter, friendly name and PNPDeviceID. I’ve written the following but in some scenarios the wrong PNPDeviceID is returned for SD cards, it seems Win32_DiskDrive finds the generic storage device rather than the accutal device ID of the SD Card. Is there a way for me to get all the information I need without using Win32_DiskDrive

Powershell not recognizing commands when run as system

I need to run PowerShell or PowerShell_ISE as the local System account, but when running under that account, none of the standard commands are recognized. Some examples are Get-Localgroup. In the included screenshot, the window on the right is with my regular account, and on the left is with system account. How can I get PowerShell to recognize these commands under the system account? In the interim, I am going to see if I can leverage ServiceUI to try and bring PowerShell if that helps. What is odd, is that typically, unless I am wrong, processes running under the system account, run in session 0. When I look at the task manager it is running under session 4. Not sure if that matters, but thought to mention it.