• Time for cube calculation

    My recent post on spheres got me wondering about the time for cube calculation. Defining a variable PS> $r = 2.37 I can calculate the cube by multiplying $r by itself 3 times or by using the Power function on the Math class. Starting with the... Read the full text.
    • 29 Jan 2020
  • Spheres

    Continuing my series of functions that can be used for geometric calculations its time for a quick look at spheres. Remember in all of these functions that PI is set as a constant when the module is loaded: New-Variable -Name pi -Value ([math]::PI... Read the full text.
    • 29 Jan 2020
  • Recent releases

    Recent releases of interest include: PowerShell v7 Release Candidate 2. No significant changes from RC 1 – see https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-rc.2 Windows Terminal v0.8.10261. Bug fixes – see https://github.com... Read the full text.
    • 28 Jan 2020
  • Circles

    One of my all time favourite films is “The Thomas Crown Affair” – the original NOT the remake. The films theme tune – Windmillls of your Mind – with its focus on circles got me thinking about geometrical calculations in general and circles in particular... Read the full text.
    • 28 Jan 2020
  • VScode improvement

    VScode is the recommended editor for PowerShell Core as its multi-platform. Personally, I’ve preferred the Windows PowerShell ISE as its more closely aligned with the code I create and the work I do. The latest VScode improvement means I’m beginning... Read the full text.
    • 31 Dec 2019
  • Clear the trusted host list

    The final option in administering the trusted host list is to clear the entire list. The following function will clear the trusted host list function clear-trustedhost { [CmdletBinding()] param ( [string]$computername = $env:COMPUTERNAME ) if... Read the full text.
    • 31 Dec 2019
  • Remove a trusted host

    Continuing our collection of routines to manage the trusted hosts this time we’ll look at how to remove a trusted host function remove-trustedhost { [CmdletBinding()] param ( [string]$trustedhost, [string]$computername = $env:COMPUTERNAME ) ... Read the full text.
    • 30 Dec 2019
  • Add a trusted host

    Last time I showed how to read the trusted host list - this is how you add a trusted host function add-trustedhost { [CmdletBinding()] param ( [string]$trustedhost, [string]$computername = $env:COMPUTERNAME ) if (Test-Connection -ComputerName... Read the full text.
    • 29 Dec 2019
  • Trusted hosts

    You can use trusted hosts in WSMAN based PowerShell remoting to authenticate computers where Kerberos isn’t available. The WSMAN configuration is available through the WSMAN PowerShell drive or you can use the WSMANInstance cmdlets – available in Windows... Read the full text.
    • 28 Dec 2019
  • Keep it Simple

    One of the principles I’ve always tried to stick with when writing code – in PowerShell or any other language – is Keep it Simple. Keeping code simple makes it easier to understand, easier to debug and easier to maintain. My definition of simple... Read the full text.
    • 28 Dec 2019
  • What do you use PowerShell for?

    What do you use PowerShell for? Personally, I’ve always used it as a tool to automate the administration of Windows systems. I’ve created and managed systems. Managed the OS and file system. Administered Exchange, Active Directory and SQL Server... Read the full text.
    • 27 Dec 2019
  • Season’s Greetings

    Season’s Greetings from PowerShell (77,101,114,114,121,32,67,104,114,105,115,116,109,97,115,32,97,110,100,32,97,32,72,97,112,112,121,32,78,101,119,32,89,101,97,114 | foreach {[char][byte]$psitem}) -join '' Read the full text.
    • 24 Dec 2019
  • PowerShell remoting

    PowerShell remoting must be every administrators favourite feature. The fact that you can connect to to multiple machines and get your tasks done just makes life so much easier. PowerShell remoting originally appeared in PowerShell v2. In v1 Get... Read the full text.
    • 24 Dec 2019
  • PowerShell cmdlets

    Continuing my series of the features in PowerShell we shouldn’t forget – we get to PowerShell cmdlets. The PowerShell cmdlet ecosystem has grown from the 137 cmdlets in PowerShell v1 to who knows how many are available to windows PowerShell v5.1... Read the full text.
    • 19 Dec 2019
  • PowerShell Pipeline

    With PowerShell v7 getting close to being finished I thought it might be time to look at some of the longstanding PowerShell features that may get taken for granted with the concentration on newer features. Starting point is the PowerShell Pipeline.... Read the full text.
    • 18 Dec 2019
  • PowerShell v7 Release Candidate 1

    PowerShell v7 Release Candidate 1 is here. No major new features. The following features have moved out of being experimental: PSCoalescingOperators PSErrorView PSForEachObjectParallel PSPipelineChainOperators PSTernaryOperator PSUpdatesNotification... Read the full text.
    • 17 Dec 2019
  • Get-Counter

    The Get-Counter cmdlet returns in PowerShell v7 preview 6. Its only Get-Counter though the Import/Export-Counter cmdlets aren’t available. Get-Counter isn’t experimental feature so its available as soon as you install preview 6. PS> Get-Command Get... Read the full text.
    • 30 Nov 2019
  • Clipboard cmdlets

    The clipboard cmdlets return in PowerShell v7 preview 6 Get-Clipboard and Set-Clipboard are back and according to the release notes work cross platform. PS> Get-Command Get-Clipboard -Syntax Get-Clipboard [-Raw] [<CommonParameters>] PS> Get... Read the full text.
    • 26 Nov 2019
  • Clear-RecycleBin

    The Clear-RecycleBin cmdlet returns in PowerShell v7 preview 6 on Windows PS> Get-Command Clear-RecycleBin -Syntax Clear-RecycleBin [[-DriveLetter] <string[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] To use PS> Clear-RecycleBin ... Read the full text.
    • 25 Nov 2019
  • Fibonacci series

    Today’s date 23 November is 1123 id written as month then day. Those numbers are the start of the Fibonacci series. So as its Fibonacci day here’s a quick PowerShell function to create a Fibonacci series. function new-fibonacci { param ( [int]... Read the full text.
    • 23 Nov 2019
  • PowerShell v7 preview 6

    PowerShell v7 preview 6 has arrived - https://github.com/PowerShell/PowerShell/releases Its the last preview, as the Release candidate should appear next month, so this version is a good indication of what’ll be available in PowerShell v7. Test... Read the full text.
    • 22 Nov 2019
  • Get-DnsServerResourceRecord

    You saw how to discover the zones on a DNS server in the first post in this series. Now its time to discover the records in a zone. For that you need Get-DnsServerResourceRecord. The syntax is: Get-DnsServerResourceRecord [-ZoneName] <string> ... Read the full text.
    • 21 Nov 2019
  • Searching Active Directory by email address

    I was asked recently about searching Active Directory by email address and returning the first and last names of the users. First off I needed to populate the first and last name and email fields as they weren’t set in my test domain Get-ADUser ... Read the full text.
    • 21 Nov 2019
  • DNS zones

    I’m working through the commonly used DNS server cmdlets to determine if everything works in PowerShell core. First up is the cmdlet to get the DNS zones on your DNS server. PS> Get-DnsServerZone | Format-List -Property ZoneName, ZoneType, IsAutoCreated... Read the full text.
    • 20 Nov 2019
  • Get-Hotfix

    Get-Hotfix returns to PowerShell in PowerShell v7 preview 5 – at least on Windows. PS> Get-Command Get-HotFix -Syntax Get-HotFix [[-Id] <string[]>] [-ComputerName <string[]>] [-Credential <pscredential>] [<CommonParameters>] Get-HotFix [-Description... Read the full text.
    • 19 Nov 2019