Skip to main content

11 posts tagged with "powershell"

View All Tags

· 5 min read
Robert Thomas

Whether it be a large group or one that has restricted users, you may need to limit who can send to these mail enabled security groups. In addition, you may even want to enable moderation to allow specific users to approve/deny messages from reaching the members.

The good news is that all this can be done by using AD and Exchange to enable group moderation.

· One min read
Robert Thomas

Every command you type into a PowerShell console is recorded in a single file in the current user's app data directory. This is useful when you need to refer back to a command you entered but it can be security risk if you've entered sensitive data in plain text (like passwords or user data). In those cases try to use secure objects like PSCredential for usernames and passwords.

· 3 min read
Robert Thomas

I have quite a few databases in Azure and use PowerShell from time to time to connect and execute queries on them. This is pretty straight forward and normally works as intended. However, sometimes I get the following exception:

Unable to load adalsql.dll (Authentication=ActiveDirectoryPassword). Error code: 0x2. For more information, see http://go.microsoft.com/fwlink/?LinkID=513072

· One min read
Robert Thomas

Recently I needed to get a bunch of groups from Exchange by their ExternalDirectoryObjectId property. There are many ways to do this and one of the easiest would be to just get the Name (or other unique identifier) by looking up the group in AAD via MSOL PS. However, you can use the -Filter parameter for Get-DistributionGroup cmdlet and specify the id:

Get-DistributionGroup -Filter { ExternalDirectoryObjectId -eq $group.ExternalDirectoryObjectId }