PowerShell Q&A Series

12/02/2020

Gathering CPU Information from the local machine

Maybe we need to know the current-voltage or the current clock speed. We can find both from the original command. Using $cpu.CurrentClockSpeed gives us the clock speed of the processor as we ran the initial command and not what it shows currently. $cpu.CurrentVoltage will give us just that, the current-voltage being used by the processor at the time of the initial command being run.
12/02/2020

Rename Files With PowerShell

he first line tells PowerShell that the variable $files is going to host the list of files that we need to loop through. The next line begins to define the foreach statement by saying for each $file in $files.
12/01/2020

Query Windows Device for Memory Statistics

To start resolving this we will create a new variable and filter out some of the data from the $RAM variable. To do that we use [math]::Round which tells PowerShell that we are asking it to, one, do math. Two, round the data in the following brackets. We then take the $RAM variable and Dot(.) source it for the TotalVisibleMemorySize, and do it all down to the 1MB size.
12/01/2020

Gathering Local System Information

Using Powershell to gather system information within seconds and output to console, Out-GridView, or to a variable, text file, or XLSX file...
11/26/2020

Search for locked AD accounts

You can search and unlock AD accounts with a one line command. Let's begin! You will need to install the Active Directory Module....
11/25/2020

Windows Update Repair and Restore

More specifically, what is the problem? In my experience, it is one of two issues. Either no connection to the WSUS server, or the Windows Update Service on the computer in question is hosed and needs rebuilt.