header image

Archive for July, 2018

PowerShell ThreadJobs

Posted by: | July 24, 2018 Comments Off on PowerShell ThreadJobs |

PowerShell Jobs were introduced in PowerShell v2. While remoting got the attention in that release PowerShell Jobs are at least as important. PowerShell v6.1 preview 4 has introduced a new addition to the options for jobs – PowerShell ThreadJobs. The real change is the addition of the Start-ThreadJob cmdlet. All other aspects of managing ThreadJobs are […]

under: PowerShell v6

Update-Help difference

Posted by: | July 23, 2018 Comments Off on Update-Help difference |

Between Windows PowerShell v5.1 and PowerShell v6.x I’ve noticed an Update-Help difference.   In Windows PowerShell v5.1 I can just do this: Update-Help -Force from an elevated prompt.   In PowerShell v6.0 and V6.1 previews I have to give the UI culture I want Update-Help -UICulture en-US –Force   All instances – PowerShell v5.1, v6.0.3 […]

under: PowerShell v5, PowerShell v6

Measure-Object Enhancement

Posted by: | July 23, 2018 Comments Off on Measure-Object Enhancement |

PowerShell v6.1 preview 4 brings a Measure-Object enhancement. Measure-Object has been around since PowerShell v1. It enables you to measure the properties of an object and easily perform a number of calculations. PS> Get-ChildItem -File | Measure-Object -Property Length Count : 6 Average : Sum : Maximum : Minimum : StandardDeviation : Property : Length […]

under: PowerShell v6

New releases of PowerShell v6.x

Posted by: | July 20, 2018 Comments Off on New releases of PowerShell v6.x |

New releases of PowerShell v6.x are available. First off v6.0.3 is available. This is a servicing release to update PowerShell v6.0 to use .Net 2.0.8. The primary point of this release is to update to fix the vulnerability discussed in Microsoft Security Advisory CVE-2018-8356: .NET Framework Security Feature Bypass Vulnerability. You ae recommended to upgrade […]

under: PowerShell v6

UK PowerShell conference

Posted by: | July 17, 2018 Comments Off on UK PowerShell conference |

There’s a one day PowerShell conference in October in London – https://powershell.org/2018/07/17/psdayuk-2018-the-uk-powershell-conference/ It’s rumoured I may be there and speaking

under: PowerShell

Windows Server 2008 EoL

Posted by: | July 11, 2018 Comments Off on Windows Server 2008 EoL |

Windows Server 2008 EoL on 14 January 2020   Windows Server 2008 and 2008 R2 will be end of life and no longer supported from 14 January 2020 – https://cloudblogs.microsoft.com/windowsserver/2018/07/10/its-sunset-time-for-windows-server-2008-and-2008-r2/   There’s plenty of time to think about migrating off of the 2008 family but don’t leave it to the last minute.   Server 2008 had […]

under: Windows Server 2008, Windows Server 2008 R2

Windows activation

Posted by: | July 9, 2018 Comments Off on Windows activation |

Windows activation is usually straight forward. Put in the license key during installation, ensure the machine can connect to the Internet and wait a bit. Windows is activated.   Except today I was rebuilding some VMs and the activation didn’t work. I got a message about not being able to connect to the activation servers. […]

under: PowerShell

CPU intensive processes

Posted by: | July 9, 2018 Comments Off on CPU intensive processes |

How do you find the most CPU intensive processes? If you want to know the processes that are taking most CPU on your system right now then use Get-Process PS> Get-Process | sort CPU -Descending | select -First 10   Will display the 10 processes that are running and are using the most CPU – […]

under: PowerShell

PowerShell not equal

Posted by: | July 5, 2018 Comments Off on PowerShell not equal |

The Powershell not equal operator is –ne. This how you use it. When dealing with numbers: PS> $a = 3 PS> $b = 5 PS> $a -ne $b True   When dealing with strings you have a bit more choice: PS> $a = ‘abcd’ PS> $b = ‘efgh’ PS> $a -ne $b True   By […]

under: PowerShell

Variable squeezing

Posted by: | July 4, 2018 Comments Off on Variable squeezing |

When you’re developing code interactively how often do you set a variable and then display it to test the result? You can do that in one go using variable squeezing. Normally you’d do: PS> $test = 1 PS> $test 1   Set the variable and display the contents as two separate actions. By enclosing the […]

under: PowerShell

Older Posts »