Category: Powershell

PowerShell Invoke-WebRequest Cmdlet

Introduction to Invoke-WebRequest Invoke-WebRequest is an interesting PowerShell 3.0 cmdlet; it enables us to extract useful information from web pages. Examples of Invoke-WebRequest List the Links on a Web Page Research Properties of Invoke-WebRequest Example 1: Convert Miles to Feet Example 2: Find Lucky Numbers  ♣ List the Links on …

PowerShell Files – Home Page

Windows PowerShell Files The biggest danger when you employ PowerShell to manipulate files is ‘over-think’.  Just keep in mind that PowerShell opens and closes files automatically.  My point is there is no need to waste time looking for non-existent file-open, or file-save commands. PowerShell File Topics PowerShell supports a rich …

PowerShell and QADGroup

PowerShell and QADGroup 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 groups in general, and add members in particular.  Incidentally, all the PowerShell and QAD nouns are …

PowerShell Splatting – Hashtable for Parameters

How PowerShell Splatting Works Splatting is more than just a neat way of formatting cmdlets with multiple parameters, it teaches us about PowerShell functions and hashtables. Topics for PowerShell’s Functions Introduction to PowerShell Splatting Troubleshooting PowerShell Splatting The Problem that PowerShell Splatting Cures Splatting and WMI Queries  ♣ Introduction to …

PowerShell Get-Hotfix

Introduction to Get-Hotfix Get-Hotfix is a useful PowerShell 2.0 cmdlet for researching Microsoft updates and patches. Examples of Get-Hotfix List the Updates and Service Packs Research Get-Hotfix's Parameters Another Useful Parameter is -Computer Alternative to Get-HotFix:- Win32_ReliabilityRecords  ♣ List the Updates and Service Packs Let us see Get-Hotfix in action, …

PowerShell New-AdUser

Windows PowerShell New-AdUser Cmdlet The emphasis on this page is on getting started, learning how to create a script that generates new accounts in Active Directory. Once you have mastered the basics of New AdUser then you can expand your horizons with Import-CSV, or copying existing users with the -Instance …

PowerShell Mandatory Parameters

Investigating PowerShell Parameters On this page I will explain parameter concepts, which are useful to the intermediate PowerShell script writer.  For example, mandatory (required) and named parameters. Recap on the Basics of PowerShell Parameters Mandatory PowerShell Parameters Research PowerShell’s Mandatory Parameters Named PowerShell Parameters PowerShell Function Parameters  ♦ Mandatory PowerShell …