PowerShell for Windows Admins:

November, 2017


November 29, 2017  10:21 AM

Get Folder sizes

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

One problem that comes up quite often is how do you get folder sizes. One option is use Measure-Object but the problem with that approach is that its going to be a pretty slow process if you have a lot of folders. PowerShell doesn't have a method of directly getting the folder size and you have to...

November 28, 2017  10:25 AM

Windows update module

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Windows 10, Windows Server

A Windows Update module is available on Windows versions 1709 and later. This includes Windows 10 Fall Creators Update, Windows Server 1709 and Windows Insider previews (Server and Client) post the 1709 release. The module supplies the following...


November 27, 2017  12:10 PM

Get an AD user’s manager

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

Interesting question on the forum about finding the manager for a given user in AD – assuming the Manager field is populated of course. If you’ve not worked with the AD cmdlets this is a good introduction to some of their quirks. This is how you get an AD user’s manager. You need the...


November 23, 2017  11:04 AM

PowerShell v6: #5 Get-Uptime

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

One new feature of PowerShell v6 (its actually been available since alpha 13 but I’d missed it) is the Get-Uptime cmdlet

PS C:\scripts> Get-Uptime

Days              : 0
Hours             : 2
Minutes           : 57
Seconds           : 6
Milliseconds      : 0
Ticks             :...


November 23, 2017  9:09 AM

PowerShell v6: #4 profiles

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Windows PowerShell (v1-v5.1) has always used profiles to configure your PowerShell session. You need execution policy set to something other than restricted so that the profile script can run. You can have up to 4 profiles:

Description                   Path
 -----------                 ...


November 20, 2017  1:05 PM

PowerShell v6: #3 Release Candidate

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The PowerShell team have announced the availability of the PowerShell v6 release candidate. 0 Comments     RSS Feed     Email a friend


November 18, 2017  9:08 AM

Cannot verify the file SHA256 when installing package

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
containers, Windows Server 2016

I’m doing some work requiring containers and decided to use Server 1709 as it has some significant changes when compared to Server 2016. The documentation - 0 Comments     RSS Feed     Email a friend


November 17, 2017  12:01 PM

Windows update change in Server 1709

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Windows Server 2016

When Windows Server 2016 was introduced a very nice CIM class was provided to work with Windows Updates. If you wanted to scan for available updates you could do something like this:

$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession...


November 14, 2017  8:59 AM

When is PowerShell not PowerShell?

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

When is PowerShell not PowerShell? When its PowerShell v6. This applies to beta 9 and later Check a v6 instance

PS C:\Program Files\PowerShell\6.0.0-beta.9> $PSVersionTable

Name Value
 ---- -----
 PSVersion 6.0.0-beta.9
 PSEdition Core
 GitCommitId v6.0.0-beta.9
 OS Microsoft...


November 14, 2017  8:45 AM

PowerShell version

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Depending on the version of Windows you’re running you could be using PowerShell version 1 through version 5.1 (admittedly I suspect there are very few people, if any, still running PowerShell v1). This is complicated by the various versions of Windows Management Framework that are available for...


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: