PowerShell Basics

PowerShell pause

PowerShell pause – how can you pause a PowerShell script? Two ways come to mind. First if you just want the script to pause for a specified time...

read more

PowerShell for loop

Loops are a construction seen in most scripting and programming languages. A loop is used to repeat a set of statements a set number of times or...

read more

Create a directory

PowerShell enables you to work with the file system on your machine – one question that often comes up is how to create a directory. When working...

read more

PowerShell foreach

PowerShell has a number of ways to perform a loop – I recently counted seven distinct methods. If you can’t list them all don’t worry one is very...

read more

using help proactively

I was reading a thread on the forum about using a particular cmdlet and it occurred to me that the person posing the question hadn’t actually looked...

read more

Update-Help errors

Updatable help brings the benefit of up to date help with typos fixed and new edge cases described. The down side is that it sometimes fails:  ...

read more

Months

It would be nice to be able to do this: PS>  Get-Date -Day 25 -Month December -Year 2016 Get-Date : Cannot bind parameter 'Month'....

read more

WMI Filters

A common mistake with WMI/CIM filters is: PS>  Get-WmiObject -Class Win32_LogicalDisk -Filter "DeviceId=C:" Get-WmiObject :...

read more
1 2 3 6