Tips and Tricks

Tips and Tricks
Colyn Via
PowerShell for Admins

The Ternary Cometh

Developers are likely to be familiar with ternary conditional operators as they’re legal in many languages (Ruby, Python, C++, etc). They’re also often used in coding interviews to test an applicant as they can be a familiar source of code errors. While some developers couldn’t …

Colyn Via
PowerShell for Admins

A Peculiar Parse

 One of the best enhancements to Powershell was the inclusion of custom classes in v5. We originally wrote scripts, then we wrote cmdlets, followed by modules, and now we’ve graduated, with Class. I recently decided I wanted to write some code that would build a website. What better way to do …

Mark Roloff
PowerShell for Admins

ICYMI: PowerShell Week of 17-May-2019

Topics include working with the Graph API, Chocolatey, jazzing up your functions with pipeline support, and shrinking VMDKs. Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff. How to shrink VMDK with a couple of PowerShell scripts? by Kevin Soltow on May 8th Not just a set of …

Mark Roloff
PowerShell for Admins

Phenomenal number of ACLs, itty-bitty living space

I recently had a need to backup file and folder ACLs for a client that would then need to restore them to their original objects following a hardware upgrade that would wipe them out. Easy enough, but the catch was that there was 1.5 million of them. Fortunately, getting ACLs in PowerShell is easy. …

pwshliquori
Tips and Tricks

Hear, Hear for Here-Strings

Running commands in PowerShell that require a format that will not run natively in PowerShell could be a difficult task, or can it? PowerShell provides a way to store, for example, a JSON as a string, enter here-string. A here-string is a single or double quoted string in which the quotation marks …