Tern around: Concise PowerShell Ternary Operators
Information

Tern around: Concise PowerShell Ternary Operators

I’m writing this down because…

Mark me! A fun drinking game for all! 🍻 : Outlander

I will forget it.

I was reviewing someone else’s code that was largely full of common if/then statements and then stumbled across a solitary instance of a ternary statement.

It took me a while to decipher since the ternary evaluation happened as an argument for a cmdlet–definitely limiting its readability. … [ Continue reading ]

Requiring multifactor authentication for all Teams users not on trusted networks
Configuration

Requiring multifactor authentication for all Teams users not on trusted networks

 

This week, I’m exploring some of the basics of Conditional Access and using it with Microsoft Teams.

In the “legacy” world (the term we attach to most things that aren’t bleeding edge these days), we typically saw organizations build the high, high walls and dig the deep, deep moats (and occasionally fill them with alligators) to keep the bad guys out.… [ Continue reading ]

Export Credential Manager to PowerShell
Information

Export Credential Manager to PowerShell

If you ever find yourself in a sticky wicket and need to extract usernames and passwords from Credential Manager (usually because you forgot them), you can use this handy-dandy little function from PowerShell:

function ExportCredMan
{
    # Dump local passwords from credential manager
    [void][Windows.Security.Credentials.PasswordVault,
[ Continue reading ]
Exchange Online Protection (EOP) Best Practices and Recommendations
Configuration

Exchange Online Protection (EOP) Best Practices and Recommendations

Yes. I said it.

Someone needed to put a line in the sand and today, that person is me.  I’m going to say these are some best practices.

But of course, your mileage may vary, depending on your type of organization (users at a local bank or city government will have different threats presented to them than an engineering firm with international customers, for example). … [ Continue reading ]

Searching the Office 365 Unified Audit Log for Specific Activities, Sites, and Users
Scripting

Searching the Office 365 Unified Audit Log for Specific Activities, Sites, and Users

Last week, I was working with a large government customer in a consolidated tenant (read: all agencies in a single, centrally-managed tenant).  One of the questions that was presented was how to search and filter the audit log for entries relating to the following categories:

  • Files shared by an agency or department’s users
  • Files accessed in an agency’s SharePoint site collection

To that end, I based together this script. … [ Continue reading ]