PowerShell | Zak Emerick's IT Blog

My IT blog for random ideas and solutions.


Powershell: Get-RemoteUsers

Below is a Powershell function that I wrote to solve an issue of resolving remote/local users before a software application was deployed. So many times do I need to know if an user is logged in before I make any changes. There are few easy ways to retrieve the ‘remote’ users on a remote system….

Read More

Powershell: Random String Generator

The script below will generate a random string using the character set and length that you specify. Right now the character sets are pretty limited, but can be easily adjusted. I plan on adding the ability to pass a character set to the function from the pipeline. Right now though, it is sufficient. It’s also…

Read More

Powershell: Typist

[CmdletBinding()] <# .SYNOPSIS Replaces key input with sections from a file. .DESCRIPTION Will read from a text file of your choosing and replaces your keystrokes with random sections of the file. Just a novelty script. .EXAMPLE This param is required. Powershell.exe -file Typist.ps1 -FilePath CodeFile.cs .EXAMPLE The maximum parameter will determine the the ceiling of…

Read More

PowerShell: Move Computers in Active Directory based on CSV file

Since I work in education we have to deal with new students coming in every year. At the high school level, in particular, we have to deal with internet permission slips. Since every student has an Active Directory user account we have to move the students from the ‘blocked’ OU to the ‘unblocked OU. With…

Read More