Tags » Powershell-basics

PowerShell file extensions

There are a number of file extensions associated with PowerShell. If you’re not aware of them they may cause you problems. You’ll commonly find these PowerShell file extensions: … 142 more words

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 period then you can use Start-Sleep… 181 more words

Powershell Basics

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 until a specific criterion is met or while a specific criterion is true. 198 more words

Powershell Basics

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. 340 more words

Powershell Basics

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 esoteric and unexpected. 384 more words

Powershell Basics

Passing parameters to a script block

Passing parameters to a scriptblock seems to be an issue at the moment.

Consider a simple scriptblock

Invoke-Command -ScriptBlock {Get-Process}

How can you modify that to parameterise the processes that are returned. 131 more words

Powershell Basics

Shortcut for Directory - PowerShell

It’s been for a while since I started using PowerShell for some operations. It might seem complicated at the beginning but if you be patient and keep learning, it makes so many tasks easy for you, especially for .NET developers. 223 more words

Command Line