PowerShell

Generate random numbers in PowerShell with Get-Random

Generate random numbers in PowerShell with Get-Random Have you ever wanted to generate random numbers for passwords, test data…. and wondered how you could easily generate them? Well I was confronted by the same situation on one of our servers where I needed some random numbers for inputting wait times to test an application but… Continue reading Generate random numbers in PowerShell with Get-Random

PowerShell

List Hotfixes installed with PowerShell with Get-Hotfix

Have you ever wondered what updates have been applied to your Windows operating system? Well a quick and easy way to do that is to use the PowerShell command Get-Hotfix. This will list out the description, the HotfixID and when it was installed. I used this on a few PCs where it appeared that updates… Continue reading List Hotfixes installed with PowerShell with Get-Hotfix

PowerShell

Powershell Alias List

Have you ever wandered whether you could speed up your script writing,shorten down your snippets or come across strange commands in PowerShell? Well PowerShell's Aliases would be the answer to all the above scenarios. I first came across them when I saw it in a friends script and could not ascertain what GDR was and… Continue reading Powershell Alias List

PowerShell

Output results from PowerShell to CSV or XML

Have you wanted to output results from PowerShell to CSV or XML? Well I am going to show you how. I have previously explained how to export results of PowerShell queries but did not include how to export the results to CSV or XML. The reason for that is that when you become familiar with… Continue reading Output results from PowerShell to CSV or XML

PowerShell

Open files using PowerShell Get-Content

Have you ever wanted to open a file and view its contents using PowerShell? Well I am going to show you how. I frequently output the results of PowerShell queries into files for later review but rarely used PowerShell to view the contents. This has been because I always had other programs readily available to… Continue reading Open files using PowerShell Get-Content

PowerShell

Simple way to output results to a file using PowerShell

Have you ever wanted to send the output of a PowerShell command to a file? Well I am going to show you how. When you run a PowerShell command like Get-Process, Get-Host…. It will return useful information but sometimes you want to save that information for future reference. You could cut and paste or take… Continue reading Simple way to output results to a file using PowerShell

PowerShell

List active process running using PowerShell

Have you ever wanted to quickly find the processes running using Powershell? Wanted an alternate to Task Manager? Well I am going to show you how. Whenever I get a call from someone about a performance issue on any of our SQL Servers I always usually have a quick glance of Task Manager so that… Continue reading List active process running using PowerShell

PowerShell

Get the Operating System Properties via PowerShell

Have you ever wanted to get all the operating system properties of a computer? Well I am going to show you a short PowerShell script which can get loads of information about the operating system. One of my colleagues was googling around for information about how to find the windows directory, number of users, last… Continue reading Get the Operating System Properties via PowerShell

PowerShell

Search PowerShell help using wildcards

Have you ever wanted to search for new commands or have difficulty remember syntax? Well I recently found the wildcard search function within the help system and I am going to show you how to use it. You could use the commands feature which is below and can be accessed via Add-ons > Commands Or… Continue reading Search PowerShell help using wildcards

PowerShell

Clearing the screen in PowerShell

A quick snippet for some newbie PowerShell developers whilst they start getting their teeth into the ISE is there are two easy ways of clearing the screen. I ahdnt thought about sharing this information but I saw a developer simply closing the ISE so that he could start afresh. I asked him why and he… Continue reading Clearing the screen in PowerShell