Monthly Archives: November 2017

Get Folder sizes

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 … Continue reading

Posted in File system, Powershell | 2 Comments

Windows update module

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 cmdlets Get-WUAVersion … Continue reading

Posted in Windows 10, Windows Server 1709 | Leave a comment

Get an AD user’s manager

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 … Continue reading

Posted in PowerShell and Active Directory | 1 Comment

PowerShell v6: #5 Get-Uptime

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             … Continue reading

Posted in PowerShell v6 | Leave a comment

PowerShell v6: #4 profiles

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 ———–                —- … Continue reading

Posted in PowerShell v6 | Leave a comment

PowerShell v6: #3 Release Candidate

The PowerShell team have announced the availability of the PowerShell v6 release candidate. https://blogs.msdn.microsoft.com/powershell/2017/11/17/powershell-core-6-release-candidate/ A release candidate is just about done with only bugs to resolve – in other words about what you can expect in the final delivery. Some … Continue reading

Posted in PowerShell v6 | Leave a comment

Cannot verify the file SHA256 when installing package

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 – https://docs.microsoft.com/en-us/virtualization/windowscontainers/about/ – just gives options for Windows Server 2016 and Windows Server Insider Preview. … Continue reading

Posted in Containers, Windows Server 1709, Windows Server 2016 | 1 Comment

Windows update change in Server 1709

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 $result … Continue reading

Posted in Windows Server 1709, Windows Server 2016 | 1 Comment

When is PowerShell not 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 Windows 10.0.17035 Platform                       Win32NT … Continue reading

Posted in PowerShell v6 | 1 Comment

PowerShell version

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 … Continue reading

Posted in Powershell | Leave a comment