header image

Archive for March, 2018

PowerShell join

Posted by: | March 31, 2018 Comments Off on PowerShell join |

I looked at PowerShell split a few posts back. This time I’ll look at the opposite action – PowerShell join. Lets look at a simple string PS> $str = ‘PowerShell for Windows and Linux’ and split it PS> $strs = -split $str PS> $strs PowerShell for Windows and Linux   You end up with an […]

under: PowerShell

Iron Scripter 2108

Posted by: | March 31, 2018 Comments Off on Iron Scripter 2108 |

Iron Scripter 2018 is the scripting competition we’re holding at the PowerShell Summit on 12 April 2018.   The task for the main event is still under wraps but even if you can’t make the Summit you can benefit from the competition.   I’ve posted 10 prequel puzzles on powershell.org. Each puzzle revolves around a […]

under: PowerShell, Summit

Windows server futures

Posted by: | March 29, 2018 Comments Off on Windows server futures |

A blog post – https://cloudblogs.microsoft.com/windowsserver/2018/03/29/windows-server-semi-annual-channel-update/ – has clarified Windows server futures.   Going forward the Semi-Annual Channel (SAC) releases – Server 1803 is due very soon  – will concentrate on containers (applications and hosts) and fast innovation application scenarios. Releases will be every 6 months with an 18 month lifetime.   The Long Term Servicing Channel (LTSC) […]

under: Windows Server

Installing Win32 OpenSSH

Posted by: | March 29, 2018 Comments Off on Installing Win32 OpenSSH |

I’ve had a number problems Installing Win32 OpenSSH https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH since it became available and required for SSH based remoting in PowerShell v6   Every time I install a new version the instructions have changed. Admittedly the installation is getting easier BUT as the project is still producing beta versions then installing over the top of an […]

under: PowerShell v6

Windows Server 2019 preview

Posted by: | March 29, 2018 Comments Off on Windows Server 2019 preview |

A Windows Server 2019 preview is available – https://cloudblogs.microsoft.com/windowsserver/2018/03/20/introducing-windows-server-2019-now-available-in-preview/ The build number is 17623 and its also the preview of the next Semi-Annual Channel release. GA is set for H2 2018 Server 2019 is a Long term Servicing Channel release meaning it’ll be available in GUI (desktop) and Server Core versions and a full life cycle […]

under: Windows Server 2019

PowerShell split

Posted by: | March 28, 2018 Comments Off on PowerShell split |

The PowerShell split operator is used to split strings based on a delimiter.   The default delimiter is white space PS> $str = ‘AA BB CC DD EE FF GG’ PS> -split $str AA BB CC DD EE FF GG   You can define a delimiter PS> $str = ‘AA-B-CC-DD-EE-FF-GG’ PS> $str -split ‘-‘ AA […]

under: PowerShell

PowerShell v6.1.0 preview 1

Posted by: | March 28, 2018 Comments Off on PowerShell v6.1.0 preview 1 |

The first preview release of PowerShell v6.1 is available at https://github.com/PowerShell/PowerShell/releases   There are a few breaking changes you should check out.   Most of the changes are minor engine updates and bug fixes.   There are no big new features in this preview release

under: PowerShell v6

PowerShell v6.0.2

Posted by: | March 17, 2018 Comments Off on PowerShell v6.0.2 |

PowerShell v6.0.2 is available from https://github.com/PowerShell/PowerShell/releases   The only real change is that .NET core 2.0.6 is used in this release to counter the Hash Collision vulnerability – https://github.com/PowerShell/Announcements/issues/4   A number of changes that affect the way the project builds and releases code have also been implemented – these SHOULD be transparent to the user […]

under: PowerShell v6

Set active hours

Posted by: | March 15, 2018 Comments Off on Set active hours |

Last time time you saw how to get the current active hours. This is how you set the active hours. $sb = { Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name ActiveHoursStart -Value 10 -PassThru Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name ActiveHoursEnd -Value 22 -PassThru } Get-ADComputer -Filter * -Properties OperatingSystem | where OperatingSystem -like “*Server*” | select -ExpandProperty Name | […]

under: PowerShell, Windows 10, Windows Server 2016

Get Active Hours

Posted by: | March 14, 2018 Comments Off on Get Active Hours |

Windows 10 and Server 2016 (and later) have the concept of active hours. These are the hours you define as working hours in effect. This is how you get active hours for a system $sb = { param([string]$computerName) $ahs = Get-Item -Path HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings $props = [ordered]@{ ComputerName = $computerName ActiveHoursStart = $ahs.GetValue(‘ActiveHoursStart’) ActiveHoursEnd = $ahs.GetValue(‘ActiveHoursEnd’) […]

under: PowerShell, Windows 10, Windows server 1709, Windows Server 2016

Older Posts »