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 […]
Archive for March, 2018
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 […]
Windows server futures
Posted by: richardsiddaway | 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) […]
Installing Win32 OpenSSH
Posted by: richardsiddaway | 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 […]
Windows Server 2019 preview
Posted by: richardsiddaway | 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 […]
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 […]
PowerShell v6.1.0 preview 1
Posted by: richardsiddaway | 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
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 […]
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 | […]
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’) […]
Categories
- .NET
- Active Directory
- Architecture
- Azure
- Bash
- BITS
- Books
- CDXML
- CIM
- Cloud
- COM
- Containers
- Deep Dive
- Desired State Configuration
- DevOps
- DHCP
- DNS
- DSC
- European Summit
- Events
- Exchange
- File System
- Firewall
- General
- General IT Matters
- Hyper-V
- IIS
- Infrastructure
- IT Community
- IT Security
- Learning PowerShell
- Linux
- Math
- Microsoft
- Modules
- Nano Server
- Networking
- Office 2010
- Office 2013
- Open Source
- Opinion
- Outlook
- Philosophy
- PowerShell
- PowerShell 7
- PowerShell and .NET
- PowerShell and Active Directory
- PowerShell and CIM
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- PowerShell Basics
- PowerShell original
- PowerShell Summit
- PowerShell User Group
- PowerShell User Group 2
- PowerShell v2
- PowerShell V3
- PowerShell v4
- PowerShell v5
- PowerShell v6
- PowerShell.org
- PowerShellGet
- PowerShellV2
- PSAM
- Rant
- Registry
- Scripting
- Scripting Games
- Scripting Games 2104
- Security
- SQL Server
- Storage
- Strings
- Summit
- Technology
- Uncategorized
- Virtualization
- Windows 10
- Windows 2012 R2
- Windows 7
- Windows 8
- Windows 8 Server
- Windows 8.1
- Windows Server
- Windows server 1709
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- WMFv5
- WPF
- WSUS