PowerShell Q&A Series

03/08/2021

Randomly Generate a Passphrase Using PowerShell

The fun part for me is working with an array. In writing this I have added almost 1000 words to this. Now, I am not going to post the entire array for this project, however I will give you a great starting point and you can add as many as you like. To start I created a variable named $namelist. I know original. It looks like so:
12/14/2020

Create Multiple Variables Using An Array Operator

This command does all the work for us in creating the variable assigning the name, and value. We use the New-Variable command with -Name using the inline variable...
12/11/2020

Creating New Firewall Rules Using PowerShell

The two above commands are the same as the one-line commands. Well, there are two differences. We are using the modifier -InterfaceType to specify the wireless interface. We are also using the tilde (`) to define line breaks in the console. The interpreter still sees this as one line, the difference is it's much easier to read like this, that is if you are human.
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/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?