12/06/2020

Create a File Template & Open With VSCode

At some point you write, or start writing many, many scripts, some are one line, some are much much bigger. In either case, copying and pasting relevant data into each newly created script is tedious and time-consuming.
12/04/2020

Run As Administrator

Today we continue our series that answers common questions, or questions that have been asked about/of PowerShell. Today we are talking about Run As Administrator. What […]
12/04/2020

Move Files to Unknown Directory

I have text files in C:\scripts\test. I want to move them into a new directory that is somewhere inside C:\scripts\plots\blob\ inside another directory. Is this possible with PowerShell?
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.