PowerShell for Windows Admins:

Powershell


May 10, 2017  3:39 AM

PowerShell v6 beta

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6 has reached a significant milestone – the release of the first PowerShell v6 beta version. There have been 18 releases of alpha code since August 2016 when the open source PowerShell v6 project started. There is no indication of how many beta releases there will be before...

May 9, 2017  3:23 AM

Are your domain controllers real?

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, CIM, Powershell

A question on the forum asked about discovering if domain controllers are physical or virtual machines. In other words Are your domain controllers real? This will do the job:

foreach ($domain in (Get-ADForest).domains) {
 Get-ADDomainController -filter * -server $domain |
 sort hostname...


May 1, 2017  3:33 PM

Positional parameters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Positional parameters have been around since the beginning of PowerShell. Positional parameters assume the parameter you mean from the position of the value in the command you supply. For instance you can do this:

Get-ChildItem -Path C:\test\ -Filter *.xml
Path and filter are the 2...


April 30, 2017  1:26 PM

ISE or VS code?

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

When PowerShell v2 shipped with the ISE it was seen as a great step forward. We now had a decent editor for creating PowerShell code and running that code. You could also invoke the debugger. Some extensions to ISE have occurred, most notably  Show-Command, but its essentially the same editor as...


April 28, 2017  2:22 PM

Mass dismount VHDs

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, Virtual Disk

I’m going to be creating, using and discarding a number of VHDs for my diskpart and PowerShell series. When I have a number of them mounted I want a quick way to dismount them. Assuming I consistently keep them in the same folder then this very nicely does the job Get-ChildItem -Path C:\test\...


April 28, 2017  1:20 PM

Diskpart and PowerShell–part 3: Initialize disk and create volume

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Disk storage, Powershell

Last time we created a virtual disk and mounted it. In this post we’ll initialize the disk and create a volume. Start by remounting the disk Get-VHD -Path C:\test\Test1.vhdx | Mount-VHD You can now initialize the disk: Initialize-Disk -Number 1 Create a partition: New-Partition...


April 27, 2017  1:44 PM

Diskpart and PowerShell–part 2: Create a virtual disk

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Disk storage, Powershell

Before we start digging into the diskpart/Storage module functionality we need a disk to practice on. I don’t recommend using your machine’s system disk – bad things will happen. The Hyper-V module has  a New-VHD cmdlet so lets use that to create a disk to play with. The great thing...


April 26, 2017  1:41 PM

DiskPart and PowerShell–part 1

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Disk storage, Powershell

An attendee at the Summit made the statement that the DiskPart utility didn’t have any equivalent in PowerShell. That’s not strictly true as the storage module provides a lot of functionality that maps to diskpart functionality. The module contents include: PS> Get-Command -Module...


April 16, 2017  6:51 PM

PowerShell Summit 2017 thoughts

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

2017 saw our largest Summit to date. 250 PowerShell fanatics (I use the word advisedly) descended on Bellevue Washington. The conversations had already started when I arrived at the hotel on the Friday night before the Summit! We had a planning meeting for Summit 2018 on the Saturday. Some good...


March 31, 2017  2:23 PM

PowerShell v6

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Tried PowerShell v6 yet? Its the open sourced latest version of PowerShell – runs on Windows, Linux (various flavours) and MacOS Its available from - 0 Comments     RSS Feed     Email a friend


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: