Category: PowerShell

PowerShell Scripts

[PS] Get-MyUpTime

Uptime of Windows boxes An cmdlet that is still missing in WMF5 as a default command. So I decided to write a function for it. This script determines the version of the WSMAN : 2.0 Windows 7,2008,2008R2 3.0 Windows 8 and higher Because the WSMAN v2.0 is not CIM capable only WMI Get-help Get-MyUpTime -Full […]

Powershell Remoting

How to PowerShell remoting using invoke-command. Ok in my time for a customer I got a challenge presented. Join computers to the domain without the native Active directory commands, only allowed to use the Quest Active Roles commands. Well let me explain the scenario. Scenario: The computer OU is restricted for creation of computer accounts, […]

Get-Help SYNOPSIS

To make your script more understandable and provide a professional help of your script, you can add help to your script. Add the following lines to the top of your script or add these lines to a function for extra explanation of the function. Run your script once and then type the following command : […]

Test-port

Well I needed to check if a specific port was reachable on a set of servers. This script is created for checking if a specific port is accessible or not. Parameters used : -server <server1,server2> : Provide server(s) to check -port <port> : Provide the port to check -list <list.csv> : Also a list of […]

PowerShell cheatsheets

On the internet I found some useful Powershell cheatsheets for you to use as reference. Here is a summary of cheatsheets I found so far PowerShell v4 Desired State Configuration Cheat Sheet by Microsoft Powershell 4 QuickRef by Microsoft PowerShell 3.0 Quick References Guide by PowerShell Magazine Mastering PowerShell by Dr. Tobias Weltner PowerShell 2.0 One Cmdlet […]