FAQs: Azure AD and connecting machines to OMS workspaces via PowerShell
September 6, 2017
![Clouds in a dark sky Clouds in a dark sky](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt7fcac562d7ddab90/662773e49c7a4b06d370dc07/clouds-in-a-dark-sky-97453640_3.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
Three times a week (Monday/Wednesday/Friday), John Savill tackles your most pressing IT questions.
Read through the FAQ archives, or send him your questions via email.
Q. How can I add a new OMS workspace to an already deployed agent automatically?
Q. How can I view the members of a group in Azure AD with PowerShell?
Q. When using Azure AD what is the logon experience for the end user?
----------
Q. How can I add a new OMS workspace to an already deployed agent automatically?
Dept - OMS
A. The easiest way to add a new workspace to a machine that already has the agent, for example an Azure VM, is to use the PowerShell below after replacing the workspace ID and key with your own.
$WorkspaceID = 'ID'
$WorkspaceKey = 'KEY'
# Load agent scripting object
$AgentCfg = New-Object -ComObject AgentConfigManager.MgmtSvcCfg
# Add new OMS Workspace
$AgentCfg.AddCloudWorkspace($WorkspaceID,$WorkspaceKey)
Restart-Service HealthService
# Get all configured OMS Workspaces
$AgentCfg.GetCloudWorkspaces()
Q. How can I view the members of a group in Azure AD with PowerShell?
Dept - Azure
A. Using the AzureAD module its easy to view the members of a group:
install-module azuread #if not already installed
Connect-AzureAD
$TAGroup = Get-AzureADGroup -SearchString "Tech Architects"
$TAs = Get-AzureADGroupMember -ObjectId $TAGroup.ObjectId
foreach($TA in $TAs)
{
#Perform some action
Q. When using Azure AD what is the logon experience for the end user?
Dept - Azure AD
A. The logon experience varies depending on the type of client, the clients machine, the clients location and the authentication method being used for Azure AD.
Below I've tried to document the core experience for the user.
If using federation for a domain joined machine then for most times you should not get prompted for username/password when using a web-based service providing the client is internal and not going through the WAP and the ADFS URL is added to Trusted Intranet Zones.
If using password hash or pass-through authentication then the user will be prompted for the username/password as they will be directed to the Azure login page where they can enter their credentials (same sign on).
If you also deploy seamless SSO (https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-sso) with the password hash/pass-through authentication then if you are domain joined and on the corporate network (or connected via VPN/DirectAccess to allow connectivity to domain controllers) then the user won’t get prompted for username/password
If you are Azure AD joined then it will be SSO since you are actually logging on as the Azure AD account. Note if you are domain joined you cannot also Azure AD join however the device can be registered in Azure AD which enables use of conditional access policies.
About the Author
You May Also Like