12/09/2020

PowerShell Backup GPO Settings

The if statement says if the directory of $path is not there, then make a new directory with the details from $path. That way we can save the files to the directory and easily look them up later. We are also verifying no data is being overwritten by doing this.
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.