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.
How to interrupt [IO.Directory]::GetFiles() in powershell?
I’m using the following to quickly find specific files from powershell CLI.
How can I recurse all folders and replace a multi line string with a single line replacement using Powershell?
I used sed to accomplish this but it changed all the line endings in my files and I think it would be good for me to learn how the same thing can be accomplished in Powershell, anyway.
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
Group Policy doesn’t copy folders, only files
I try copy all files and floders but it copies files only. I need folders also.
Group Policy can’t copy folders only files
I try copy all files and floders but it copies files only. I need folders also. Any ideas ?
Powershell smb share returns error 5 while creating
I’m trying to use these code to create a new SMB share locally:
Trouble detecting how long a computer has been idle in PowerShell
I found this article (Get idle time of machine) about getting the idle time of a computer using PowerShell.
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.
How to pass variable from local to remote session
I need get $a and $b in remote session