PowerShell SnippetRace 39-2021

UPN change, exiting, long-runners, functions

Events

  • June 20-23 2022 – European PowerShell Conference in VIENNA psconf.eu
  • April 25-29 2022 – PowerShell+DevOps Global Summit poweshell.org

Snippets

Change UPN Suffix for all on-premise users

Patrick Grünauer wrote an article on this topic. Short, easy and great to replicate. Read his blog here.

Exit, break, return and more

Exiting from something, based on a certain situation is essential to every script of module. Learn on exit, exit codes and more from Bill Kindle.

Show progress of long-running tasks

Long-runners can be annoying, so there is a function out there called Show-Progress. Dive into it and learn what it does.

Manage your functions 2.0

A must-read and must-try from Jeffrey Hicks for people which write a lot of PS code. New-PSFunctionInfo, Get-PSFunctionInfo, … please give this a try !

Hav fun learning – Roman …

Photo by Ilya Ilford on Unsplash