Category: Powershell

Rename Computer PowerShell 3.0

Rename a Windows Machine Name with PowerShell v3 The purpose of this page is to give you basic examples of a new PowerShell 3 cmdlet called Rename-Computer. A Simple Example of PowerShell Renaming Computer Control Panel GUI Versus Rename-Computer Cmdlet PowerShell Script to Rename One Computer PowerShell Script to Rename …

Windows PowerShell Version Check

Check Your Version of PowerShell with $PSVersionTable PowerShell has a built-in variable called $PSVersionTable, it displays numeric information about the Version, Build and Compatibility. $PSVersionTable Detailed PowerShell Version Check $Host – PowerShell Variable Running PowerShell 4.0 as Version 2.0  ♣ $PSVersionTable This variable was first introduced in PowerShell version 2.0. …

PowerShell Logon Scripts

PowerShell Logon Scripts If you are thinking of using PowerShell for a logon script – think again.  Much as I loved grappling with old DOS batch files and perfecting the superior VBScript logon scripts, I admit there are better ways of achieving a task than a PowerShell logon script.  Whatever …

PowerShell Win32_NTLogEvent

Scripting WMI Win32_NTLogEvent with PowerShell The benefits of using either PowerShell or VBScript to interrogate the event logs is that you can get fine control of filtering for a particular error or warning. On this page I have chosen to ask Get-WmiObject to retrieve the WMI class Win32_NTLogEvent, rather than …

PowerShell and QADUser

PowerShell and QADUser A company called Quest provides an extra snap-In for PowerShell.  The idea is for these Active Directory cmdlets to work alongside the native PowerShell commands.  As a result we can examine users’ properties, and with care, change values and even reset their passwords. Topics for PowerShell’s QADUser …

Scripting PowerShell DNS with WMI

PowerShell – Scripting DNS with WMI Our mission on this page is to install the Root\MicrosoftDNS namespace.  PowerShell WMI DNS Topics How to Install Root\MicrosoftDNS Agony and Ecstasy of Dnsprov Download  ♣ Preparation With PowerShell’s Get-Help Before we use PowerShell’s DNS, let us investigate the master cmdlet Get-WmiObject.  In particular, we …

Windows PowerShell Cmdlets

Introduction to Windows PowerShell Cmdlets With PowerShell you have a choice, you can either type commands directly at the shell’s command line, or else you can store the same commands in a text file.  Naturally, you then call that script file, known as a cmdlet, from the PowerShell command line, …

PowerShell Else Statement

Introduction to PowerShell’s Else Construction PowerShell’s ‘Else’ is the safety valve for flow logic.  Following the main 'If' statement you often you have multiple 'ElseIf' constructions, with a final plain ‘Else’ statement. Topics for Windows PowerShell’s Else Statement Example 1: PowerShell ‘If’ On Its Own Example 2: PowerShell Else Example …

Top 10 PowerShell Parameters (Switches)

PowerShell’s Top Ten Parameters, or -Switches Most of PowerShell’s commands can be fine-tuned with -parameters, otherwise known as switches.  My aim of this page is to encourage you keep a notebook of such useful PowerShell parameters. Topics for PowerShell Parameters Guy’s Top Ten PowerShell -Parameters How to research PowerShell Parameters …