You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,19 +44,246 @@ If a new policy or feature is enabled in one tenant, comparing with a baseline t
44
44
45
45
46
46
47
-
# How - SPO Management Shell
48
-
49
-
You need to connect to both tenants using the Connect-SPOService cmdlet and get the properties using the Get-SPOTenant cmdlet.
50
-
51
-
52
-
53
-
# How - PnP Powershell
54
-
55
-
# How - CSOM
56
-
57
-
58
-
47
+
# Compare SharePoint tenant settings using SPO Management Shell
48
+
49
+
You need to connect to both tenants using the `Connect-SPOService` cmdlet and get the properties using the `Get-SPOTenant` cmdlet. Then compare all the properties. Two files will be genrated:
50
+
one - full list of all the compared SharePoint properties, called FullTenantComparison.csv
51
+
two - only the differences between the Microsoft 365 tenants, called TenantDifferences
52
+
53
+
```powershell
54
+
# Define a function to connect to a tenant and get properties
55
+
function Get-TenantProperties {
56
+
param (
57
+
[string]$AdminUrl
58
+
)
59
+
60
+
Write-Host "Connecting to $AdminUrl..." -ForegroundColor Cyan
Write-Host "Differences exported to TenantComparison_Differences.csv" -ForegroundColor Cyan
114
+
115
+
```
116
+
117
+
# Compare SharePoint tenant settings using PnP Powershell
118
+
119
+
You need to connect to both tenants using the `Connect-PnPOnline` cmdlet and get the properties using the `Get-PnPTenant` cmdlet. Then compare all the properties. Two files will be genrated:
120
+
one - full list of all the compared SharePoint properties, called FullTenantComparison.csv
121
+
two - only the differences between the Microsoft 365 tenants, called TenantDifferences
Write-Host "Full comparison exported to FullTenantComparison.csv" -ForegroundColor Green
181
+
182
+
183
+
```
184
+
185
+
# Compare SharePoint tenant settings using CSOM
186
+
187
+
188
+
First connect to both tenants and export the SharePoint tenant properties by loading `Microsoft.Online.SharePoint.TenantAdministration.Tenant` object for each Microsoft 365 tenant. Then compare all the properties. Two files will be genrated:
189
+
one - full list of all the compared SharePoint properties, called FullTenantComparison.csv
190
+
two - only the differences between the Microsoft 365 tenants, called TenantDifferences
191
+
192
+
193
+
```powershell
194
+
195
+
# Load required assemblies
196
+
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
197
+
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
0 commit comments