Articles

PowerShell articles, tutorials, and guides from community experts.

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 care less about ternary operators, there’s been a cult following waiting for them to show up in Powershell. That day is almost upon us. Any Powershell developer can easily be forgiven for scratching their heads and wondering what a ternary is.

Missy Januszko
Announcements

Be a Speaker at PowerShell and DevOps Global Summit 2020!

We are so excited for the 2020 PowerShell and DevOps Global Summit! We’re about halfway through the CFP season and are still looking for your awesome submissions. If you are hesitating, please don’t… think seriously about submitting a topic or two. To help you, we’d like to give you some ideas about what makes a submission stand out (and what doesn’t). Something Unique… We’re looking for a new spin or twist on an old (or new) topic.

tobor79
PowerShell for Admins

A Better Way To Search Events

I have put together a security script to use as an alerting system. Using a CSV file containing information on which users are assigned which computer, the event logs are searched to discover when a user signs into a device outside their normal assignments. The final result of that script can be viewed HERE if interested. I will do my best to provide unique real world search queries for my examples.

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 that than by creating a class just for me? That’s rhetorical by the way. My early class code looked like this:

Robin Dadswell
PowerShell for Admins

ICYMI: PowerShell Week of 16-August-2019

Topics include Azure setups, AD reporting, IF statements Out-GridView and other new features coming in PowerShell 7. Special thanks to James Petty, Mark Rollof, Prasoon Karunan V and Robin Dadswell Pragmatic PowerShell Scripting - Reporting on AD Groups by Chris Sharp on 11th August Learn how Chris approached a requirement to pull various reports from AD using PowerShell and a useful Excel module. Powershell: Everything you wanted to know about the IF statement