Back in July I mentioned the using ? instead of Where-Object was a pet peeve. I’ve been asked a few times since for other pet peeves. The order of peevishness changes over time but these three will probably be always near the top. In no particular order. Peeve – the use of aliases […]
Archive for August, 2019
Foreach-Object -parallel
Posted by: richardsiddaway | August 30, 2019 Comments Off on Foreach-Object -parallel |The introduction of Foreach-Object -parallel in PowerShell v7 preview 3 brings some much needed parallelisation options back into PowerShell. PowerShell workflows are available in Windows PowerShell but are quirky (to be kind) and can be difficult to use. Workflows were removed in PowerShell v6.0 In PowerShell v7 preview 3 Foreach-Object receives a –parallel […]
Testing Windows activation
Posted by: richardsiddaway | August 29, 2019 Comments Off on Testing Windows activation |Testing Windows activation from PowerShell involves a little dive into CIM (WMI). At its simplest a function like this function test-activation { $ta = Get-CimInstance -ClassName SoftwareLicensingProduct -Filter “PartialProductKey IS NOT NULL” | Where-Object -Property Name -Like “Windows*” if ($ta.LicenseStatus -eq 1) {$true} else {$false} } Checks the SoftwareLicensingProduct class for instances with a […]
Get-AdUser in PowerShell Core
Posted by: richardsiddaway | August 29, 2019 Comments Off on Get-AdUser in PowerShell Core |There has been a problem with Get-ADUser in PowerShell core such that Get-ADUser -Identity Richard -Properties * Throws an error. The problem is in .NET Core and affects a small number of properties including ProtectedFromAccidentalDeletion The underlying .NET Core issue has been fixed and PowerShell v7 preview 3 on Windows 10.0.18362 will […]
Windows Terminal v0.4.2382.0
Posted by: richardsiddaway | August 28, 2019 Comments Off on Windows Terminal v0.4.2382.0 |Windows Terminal v0.4.2382.0 has ben released to the Microsoft store. if you have Windows Terminal installed it should automatically update for you. Copying out of a window using the keyboard shortcuts now works – thank you – that makes the whole thing much more usable. I can’t seem to find a way to […]
Experimental features
Posted by: richardsiddaway | August 23, 2019 Comments Off on Experimental features |PowerShell core has recently. v6.2, had the concept of experimental features added. An experimental feature is new or changed functionality that may be a breaking change or about which the PowerShell team want feedback before finalising the code. My PowerShell v6.2.2 instance has the following experimental features PSImplicitRemotingBatching PSUseAbbreviationExpansion PSCommandNotFoundSuggestion PSTempDrive of which I’ve […]
PowerShell v7 preview 3
Posted by: richardsiddaway | August 21, 2019 Comments Off on PowerShell v7 preview 3 |PowerShell v7 preview 3 is now available from https://github.com/PowerShell/PowerShell/releases Breaking changes seem to be confined to non-Windows platforms with the removal of the kill alias on Stop-Process and support for pwsh as a login shell The big new item is the –parallel parameter on Foreach-Object – more on this later. In this preview version […]
Out-GridView is back
Posted by: richardsiddaway | August 15, 2019 Comments Off on Out-GridView is back |Out-GridView is finally back in PowerShell core – https://devblogs.microsoft.com/powershell/out-gridview-returns/. The project is hosted on github – https://github.com/powershell/GraphicalTools Install the module from the gallery – PS> Install-Module -Name Microsoft.PowerShell.GraphicalTools Currently, Out-GridView is the only command in the module though adding Show-Command and Show-Object are planned. The module works cross-platform not just Windows. […]
Just seen a question about PowerShell v2. PowerShell v2 was a huge step forward when it appeared in October 2009 as part of Windows 7 / Server 2008 R2 Windows 7 support finishes 14 January 2020 Windows Server 2008 R2 support finishes 14 January 2020 That’s less than 6 months. PowerShell v2 […]
Test if a transcript is running
Posted by: richardsiddaway | August 9, 2019 Comments Off on Test if a transcript is running |PowerShell has the ability to create a transcript of the commands you run at the console and the results displayed in the console. But how can you test if a transcript is running? It used to be that you could only have a single transcript running but Windows PowerShell v5.1 and PowerShell v6.x and later […]
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