SecuringUs†

Thoughts & ideas.

Oct 1, 2020

Re-installing the SCCM client

1. Delete the computerobject of the problematic workstation from SCCM via the SCCM console 2. Stop the Windows Management Instrumentation service 3. Stop the SMS Agent Host service 4. Uninstall the CCM Client

Sep 29, 2020

Using Powershell to assign phone numbers to MS Teams users.

Install the Skype for Business Online, Windows Powershell module. Connect to Skype Online. Import-Module SkypeOnlineConnector $cred = Get-Credential $session = New-CsOnlineSession -Credential $cred -Verbose Import-PSSession -Session $session The Microsoft 365 Domestic Calling Plan & Microsoft

Sep 29, 2020

Apply mailbox retention policy in bulk.

Get-Mailbox -Filter { WindowsEmailAddress -like "*@≤domain-name≥" } | Set-Mailbox -RetentionPolicy "≤Policy-Name≥" This command retrieves all mailboxes that have the retention policy applied. Get-Mailbox -ResultSize unlimited | Where-Object {$_.RetentionPolicy -eq "≤Policy-Name≥"} | Format-Table

Sep 29, 2020

Powershell on MacOS

Powershell on MacOS

Install pre-requisites: xcode-select –install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install openssl Install Powershell Core: brew cask install powershell After the installation,

Sep 27, 2020

Azure s2s VPN configuration.

Azure s2s VPN configuration.

Create the resource group: $Location = "CanadaCentral" $RG = New-AzResourceGroup -Name "resource-group-name" -Location $Location Create the subnets and virtual network. For VPN connections, there must be a subnet within the virtual

Sep 27, 2020

List the permissions on an Azure role

az role definition list --name "<role-name>" --output json | jq '.[] | .permissions[0].actions' Get-AzRoleDefinition -Name "<role name>" | Select Actions | ConvertTo-Json To get the most current

Sep 19, 2020

Azure - Manage Secrets

az keyvault create \ --resource-group <your-unique-resource-group-name> \ --location centralus \ --name <your-unique-vault-name> Each secret in a vault has a unique URL, and secret values are retrieved with HTTP GET requests. Add the

Sep 15, 2020

Create shared mailbox & delegate rights.

New-Mailbox –Name "John, Doe" -Shared -PrimarySmtpAddress ***shared-mailbox-email*** Add-MailboxPermission "John, Doe" -User userUPN -AccessRights FullAccess –InheritanceType all Add-RecipientPermission "John, Doe" -Trustee userUPN -AccessRights SendAs -confirm:$False set-mailbox -Identity

Sep 15, 2020

Disable inactive AD accounts

Search-ADAccount -UsersOnly -AccountInactive -SearchBase "OU-disginguishedName" -TimeSpan "30" | Disable-ADAccount Create a scheduled task to run the powershell script... <Exec> <Command>powershell.exe</Command> <