Wednesday, September 20, 2023

Get extension properties synced from on-premises to Azure AD

Module: AzureAD


Description
The Get-AzureADExtensionProperty cmdlet gets a collection that contains the extension properties registered with Azure Active Directory (Azure AD) through Azure AD Connect. You can get extension properties that are synced with on-premises Azure AD, those that are not synced with on-premises Azure AD, or both types.

Example:
Get extension properties synced from on-premises Azure AD


PS: Get-AzureADExtensionProperty -IsSyncedFromOnPremises $True


Wednesday, September 21, 2022

Database availability group server cannot be removed from database

I was decommissioning the old Exchange 2013 environment with Database Availability Group.

I got an error when removing the Exchange servers from the DAG: 

Error: “Database availability group server EXCHANGESERVER cannot be removed from database availability group DAG since it is currently set for datacenter activation mode and it requires at least two mailbox servers.”
I tried again in PowerShell

Remove-DatabaseAvailabilityGroupServer -Identity <DAGName> 
-MailboxServer <ExchangeServer>

Tuesday, September 20, 2022

Помилка при видаленні Exchange сервера з Database Availability Group

Виводив з експлуатації старе середовище Exchange 2013 з багатьма Database Availability Group.

Отримав повідомлення про помилку під час видалення Exchange серверів з DAG:


Error: “Database availability group server EXCHANGESERVER cannot be removed from database availability group DAG since it is currently set for datacenter activation mode and it requires at least two mailbox servers.”

Я спробував ще раз у PowerShell

[PS]Remove-DatabaseAvailabilityGroupServer -Identity <DAGName> 
-MailboxServer <ExchangeServer>


Sunday, April 3, 2022

Basic PowerShell Commands

Get Execution Policy

Get-ExecutionPolicy

Set Execution Policy to Unrestricted

Set-ExecutionPolicy Unrestricted

Show PowerShell Version

$PSVersionTable

Get help for a command
Use this to get the help information for a command
Get-Help <cmdlet-name>

Search Get Help
Use this to search the help files. This is useful if you don’t know the command or want to see if one exists.
Get-Help *keyword*

Get Installed Modules
Use this command to display all the installed modules on a computer 
Get-InstalledModule

List All Available Modules
This will list all available modules on the computer.
Get-Module -ListAvailable

Get Installed Modules
Use this command to display all the installed modules on a computer
Get-Module -ListAvailable

Display available commands
This will display all commands that are available based on the modules that are loaded.
Get-Command