Monthly Archives: November 2021

Add an alias to multiple users in 365

Adding an alias to multiple users in 365.  in the example below, all users that have a primary SMTP address that matches nsw.anonit.net will have the $($user.alias)@qld.anonit.net alias added.

Eg:

john.smith@nsw.anonit.net will have john.smith@qld.anonit.net alias added, whereas, jane.doe@vic.anonit.net will not have any alias added.

$users = Get-Mailbox | Where-Object{$_.PrimarySMTPAddress -match "nsw.anonit.net"}

foreach($user in $users){

    Write-Host "Adding Alias $($user.alias)@qld.anonit.net"

    Set-Mailbox $user.PrimarySmtpAddress -EmailAddresses @{add="$($user.Alias)@qld.anonit.net"}

}

Autodesk 2022 DWG Trueview via Intune

I was trying to deploy Autodesk DWG Trueview 2022 via Intune and failing.  All the details I could find pointed to using switches /W /Q /I for unattended install.

That was failing, but found that setup.exe -q worked.

The uninstall of MsiExec.exe /x {28B89EEF-4128-0409-0100-CF3F3A09B77D} /qn still looks to work ok.

 

references:

https://knowledge.autodesk.com/support/dwg-trueview/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-install-DWG-Trueview-silently-enforcing-a-restart.html

https://forums.autodesk.com/t5/installation-licensing/silent-install-assistance-for-dwg-2022/td-p/10190457

https://silentinstallhq.com/autodesk-dwg-trueview-2021-silent-install-how-to-guide/

 

Adding owners to 365 security groups

I needed to add an owner to multiple 365 security groups.  I had the security groups in a csv with a column for name.

You will need to connect-azuread prior to running the following:

$GroupName = import-csv groups.csv
$UserUPN = "anonit@anonit.net"
$AADUser = Get-AzureADUser -Filter "UserPrincipalName eq '$UserUPN'"
foreach ($object in $groupname)
{
  Add-AzureADGroupOwner -ObjectId (Get-AzureADGroup -SearchString $object.name).ObjectId -RefObjectId $AADUser.ObjectId
}