Skip to content

Commit 8028309

Browse files
authored
Merge pull request #183849 from ShawnJackson/reference-powershell
edit pass: reference-powershell
2 parents cebbe8b + 3cd2514 commit 8028309

File tree

1 file changed

+74
-60
lines changed

1 file changed

+74
-60
lines changed

articles/active-directory/cloud-sync/reference-powershell.md

Lines changed: 74 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'AADCloudSyncTools PowerShell Module for Azure AD Connect cloud sync'
2+
title: 'AADCloudSyncTools PowerShell module for Azure AD Connect cloud sync'
33
description: This article describes how to install the Azure AD Connect cloud provisioning agent.
44
services: active-directory
55
author: billmath
@@ -13,111 +13,125 @@ ms.author: billmath
1313
ms.collection: M365-identity-device-management
1414
---
1515

16-
# AADCloudSyncTools PowerShell Module for Azure AD Connect cloud sync
16+
# AADCloudSyncTools PowerShell module for Azure AD Connect cloud sync
1717

18-
The AADCloudSyncTools module provides a set of useful tools that you can use to help manage your Azure AD Connect Cloud Sync deployments.
18+
The AADCloudSyncTools module provides a set of useful tools that can help you manage your deployments of Azure Active Directory Connect (Azure AD Connect) cloud sync.
1919

2020
## Prerequisites
21-
The following prerequisites are required:
2221

23-
- All the prerequisites for this module can be automatically installed using `Install-AADCloudSyncToolsPrerequisites`
24-
- This module uses MSAL authentication, so it requires MSAL.PS module installed. To verify, in a PowerShell window, execute `Get-module MSAL.PS -ListAvailable`. If the module is installed correctly you will get a response. You can use `Install-AADCloudSyncToolsPrerequisites` to install the latest version of MSAL.PS
25-
- Although the AzureAD PowerShell module is not a prerequisite for any functionality of this module it is useful to be present, so it is also automatically installed when using `Install-AADCloudSyncToolsPrerequisites`.
26-
- Installing modules from PowerShell Gallery requires TLS 1.2 enforcement. The cmdlet `Install-AADCloudSyncToolsPrerequisites` sets TLS 1.2 enforcement before installing all the prerequisites. To ensure that you can manually install modules, set the following in the PowerShell session before using `Install-Module`:
22+
You can automatically install all the prerequisites for the AADCloudSyncTools module by using `Install-AADCloudSyncToolsPrerequisites`. You'll do that in the next section of this article.
23+
24+
Here are some details about what you need:
25+
26+
- The AADCloudSyncTools module uses Microsoft Authentication Library (MSAL) authentication, so it requires installation of the MSAL.PS module. To verify the installation, in a PowerShell window, run `Get-module MSAL.PS -ListAvailable`. If the module is installed correctly, you'll get a response. If necessary, you can use `Install-AADCloudSyncToolsPrerequisites` to install the latest version of MSAL.PS.
27+
- Although the Azure AD PowerShell module is not required for any functionality of the AADCloudSyncTools module, it is useful. So it's automatically installed when you use `Install-AADCloudSyncToolsPrerequisites`.
28+
- Installing modules from the PowerShell Gallery requires Transport Layer Security (TLS) 1.2 enforcement. The cmdlet `Install-AADCloudSyncToolsPrerequisites` sets TLS 1.2 enforcement before installing all the prerequisites. To ensure that you can manually install modules, set the following in the PowerShell session before using the cmdlet:
29+
2730
```
2831
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2932
```
3033

3134

3235
## Install the AADCloudSyncTools PowerShell module
33-
To install and use AADCloudSyncTools module use the following steps:
34-
35-
1. Open Windows PowerShell with administrative privileges
36-
2. Type or copy and paste the following: `Import-module -Name "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Utility\AADCloudSyncTools"`
37-
3. Hit enter.
38-
4. To verify the module was imported, enter or copy and paste the following: `Get-module AADCloudSyncTools`
39-
5. You should now see information about the module.
40-
6. Next, to install the AADCloudSyncTools module pre-requisites run: `Install-AADCloudSyncToolsPrerequisites`
41-
7. On the first run, the PoweShellGet module will be installed if not present. To load the new PowershellGet module close the PowerShell Window and open a new PowerShell session with administrative privileges.
42-
8. Import the module again using step 2.
43-
9. Run `Install-AADCloudSyncToolsPrerequisites` to install the MSAL and AzureAD modules
44-
11. All prerequisites should be successfully installed
45-
![Install module](media/reference-powershell/install-1.png)
46-
12. Every time you want to use AADCloudSyncTools module in new PowerShell session, enter or copy and paste the following:
47-
```
48-
Import-module "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Utility\AADCloudSyncTools"
49-
```
50-
51-
52-
## AADCloudSyncTools Cmdlets
36+
37+
1. Open Windows PowerShell with administrative privileges.
38+
2. Run `Import-module -Name "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Utility\AADCloudSyncTools"`.
39+
3. To verify that the module was imported, run `Get-module AADCloudSyncTools`.
40+
41+
You should now see information about the module.
42+
4. To install the AADCloudSyncTools module prerequisites, run `Install-AADCloudSyncToolsPrerequisites`.
43+
5. On the first run, the PowerShellGet module will be installed if it's not present. To load the new PowerShellGet module, close the PowerShell window and open a new PowerShell session with administrative privileges.
44+
6. Import the module again by running `Import-module -Name "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Utility\AADCloudSyncTools"`.
45+
7. Run `Install-AADCloudSyncToolsPrerequisites` again to install the MSAL and Azure AD modules.
46+
47+
All prerequisites should now be installed.
48+
49+
![Screenshot of the notification in the PowerShell window that says the prerequisites were installed successfully.](media/reference-powershell/install-1.png)
50+
8. Every time you want to use the AADCloudSyncTools module in a new PowerShell session, run the following command:
51+
52+
```
53+
Import-module "C:\Program Files\Microsoft Azure AD Connect Provisioning Agent\Utility\AADCloudSyncTools"
54+
```
55+
56+
57+
## AADCloudSyncTools cmdlets
58+
5359
### Connect-AADCloudSyncTools
54-
Uses the MSAL.PS module to request a token for the Azure AD administrator to access Microsoft Graph
5560

61+
This cmdlet uses the MSAL.PS module to request a token for the Azure AD administrator to access Microsoft Graph.
5662

5763
### Export-AADCloudSyncToolsLogs
58-
Exports and packages all the troubleshooting data in a compressed file, as follows:
59-
1. Sets verbose tracing and starts collecting data from the provisioning agent (same as `Start-AADCloudSyncToolsVerboseLogs`)
60-
<br>You can find these trace logs in the folder `C:\ProgramData\Microsoft\Azure AD Connect Provisioning Agent\Trace` </br>
61-
2. Stops data collection after 3 minutes and disables verbose tracing (same as `Stop-AADCloudSyncToolsVerboseLogs`)
62-
<br>You can specify a different duration with `-TracingDurationMins` or completely skip verbose tracing with `-SkipVerboseTrace` </br>
63-
3. Collects Event Viewer Logs for the last 24 hours
64-
4. Compresses all the agent logs, verbose logs and event viewer logs into a compressed zip file under the User's Documents folder
65-
<br>You can specify a different output folder with `-OutputPath <folder path>` </br>
64+
65+
This cmdlet exports and packages all the troubleshooting data in a compressed file, as follows:
66+
67+
1. Sets verbose tracing and starts collecting data from the provisioning agent (same as `Start-AADCloudSyncToolsVerboseLogs`). You can find these trace logs in the folder *C:\ProgramData\Microsoft\Azure AD Connect Provisioning Agent\Trace*.
68+
2. Stops data collection after three minutes and disables verbose tracing (same as `Stop-AADCloudSyncToolsVerboseLogs`). You can specify a different duration by using `-TracingDurationMins` or completely skip verbose tracing by using `-SkipVerboseTrace`.
69+
3. Collects Event Viewer logs for the last 24 hours.
70+
4. Compresses all the agent logs, verbose logs, and Event Viewer logs into a .zip file in the user's *Documents* folder. You can specify a different output folder by using `-OutputPath <folder path>`.
6671

6772
### Get-AADCloudSyncToolsInfo
68-
Shows Azure AD Tenant details and internal variables state
73+
74+
This cmdlet shows Azure AD tenant details and the state of internal variables.
6975

7076
### Get-AADCloudSyncToolsJob
71-
Uses Graph to get AD2AAD Service Principals and returns the Synchronization Job information.
72-
Can be also called using the specific Sync Job ID as a parameter.
77+
78+
This cmdlet uses Microsoft Graph to get Azure AD service principals and returns the sync job's information. You can also call it by using the specific sync job ID as a parameter.
7379

7480
### Get-AADCloudSyncToolsJobSchedule
75-
Uses Graph to get AD2AAD Service Principals and returns the Synchronization Job's Schedule.
76-
Can be also called using the specific Sync Job ID as a parameter.
81+
82+
This cmdlet uses Microsoft Graph to get Azure AD service principals and returns the sync job's schedule. You can also call it by using the specific sync job ID as a parameter.
7783

7884
### Get-AADCloudSyncToolsJobSchema
79-
Uses Graph to get AD2AAD Service Principals and returns the Synchronization Job's Schema.
85+
86+
This cmdlet uses Microsoft Graph to get Azure AD service principals and returns the sync job's schema.
8087

8188
### Get-AADCloudSyncToolsJobScope
82-
Uses Graph to get the Synchronization Job's Schema for the provided Sync Job ID and outputs all filter group's scopes.
89+
90+
This cmdlet uses Microsoft Graph to get the sync job's schema for the provided sync job ID and outputs all filter groups' scopes.
8391

8492
### Get-AADCloudSyncToolsJobSettings
85-
Uses Graph to get AD2AAD Service Principals and returns the Synchronization Job's Settings.
86-
Can be also called using the specific Sync Job ID as a parameter.
93+
94+
This cmdlet uses Microsoft Graph to get Azure AD service principals and returns the sync job's settings. You can also call it by using the specific sync job ID as a parameter.
8795

8896
### Get-AADCloudSyncToolsJobStatus
89-
Uses Graph to get AD2AAD Service Principals and returns the Synchronization Job's Status.
90-
Can be also called using the specific Sync Job ID as a parameter.
97+
98+
This cmdlet uses Microsoft Graph to get Azure AD service principals and returns the sync job's status. You can also call it by using the specific sync job ID as a parameter.
9199

92100
### Get-AADCloudSyncToolsServicePrincipal
93-
Uses Graph to get the Service Principal(s) for AD2AAD and/or SyncFabric.
94-
Without parameters, will only return AD2AAD Service Principal(s).
101+
102+
This cmdlet uses Microsoft Graph to get the service principals for Azure AD and/or Azure Service Fabric. Without parameters, it will return only Azure AD service principals.
95103

96104
### Install-AADCloudSyncToolsPrerequisites
97-
Checks for the presence of PowerShellGet v2.2.4.1 or later and Azure AD and MSAL.PS modules and installs these if missing.
105+
106+
This cmdlet checks for the presence of PowerShellGet v2.2.4.1 or later, the Azure AD module, and the MSAL.PS module. It installs these items if they're missing.
98107

99108
### Invoke-AADCloudSyncToolsGraphQuery
100-
Invokes a Web request for the URI, Method and Body specified as parameters
109+
110+
This cmdlet invokes a web request for the URI, method, and body specified as parameters.
101111

102112
### Repair-AADCloudSyncToolsAccount
103-
Uses Azure AD PowerShell to delete the current account (if present) and resets the Sync Account authentication with a new synchronization account in Azure AD.
113+
114+
This cmdlet uses Azure AD PowerShell to delete the current account (if present). It then resets the sync account authentication with a new sync account in Azure AD.
104115

105116
### Restart-AADCloudSyncToolsJob
106-
Restarts a full synchronization.
117+
118+
This cmdlet restarts a full synchronization.
107119

108120
### Resume-AADCloudSyncToolsJob
109-
Continues synchronization from the previous watermark.
121+
122+
This cmdlet continues synchronization from the previous watermark.
110123

111124
### Start-AADCloudSyncToolsVerboseLogs
112-
Modifies the 'AADConnectProvisioningAgent.exe.config' to enable verbose tracing and restarts the AADConnectProvisioningAgent service
113-
You can use -SkipServiceRestart to prevent service restart but any config changes will not take effect. You can find these trace logs in the folder C:\ProgramData\Microsoft\Azure AD Connect Provisioning Agent\Trace.
125+
126+
This cmdlet modifies *AADConnectProvisioningAgent.exe.config* to enable verbose tracing and restarts the AADConnectProvisioningAgent service. You can use `-SkipServiceRestart` to prevent service restart, but any configuration changes will not take effect. You can find these trace logs in the folder *C:\ProgramData\Microsoft\Azure AD Connect Provisioning Agent\Trace*.
114127

115128
### Stop-AADCloudSyncToolsVerboseLogs
116-
Modifies the 'AADConnectProvisioningAgent.exe.config' to disable verbose tracing and restarts the AADConnectProvisioningAgent service.
117-
You can use -SkipServiceRestart to prevent service restart but any config changes will not take effect.
129+
130+
This cmdlet modifies *AADConnectProvisioningAgent.exe.config* to disable verbose tracing and restarts the AADConnectProvisioningAgent service. You can use `-SkipServiceRestart` to prevent service restart, but any configuration changes will not take effect.
118131

119132
### Suspend-AADCloudSyncToolsJob
120-
Pauses synchronization.
133+
134+
This cmdlet pauses synchronization.
121135

122136
## Next steps
123137

0 commit comments

Comments
 (0)