Navigation: Configuring Hub Sites > Configuring Hub Sites Using PowerShell |
Using PowerShell, you can:
·register/unregister a modern team or communication site as a hub site
·edit hub site settings
·associate a site with a hub site
·change hub site associations
To access the PowerShell cmdlets for configuring hub sites:
Open a PowerShell or PowerShell ISE session and add the PowerShell snap-ins for the application framework.
The following cmdlets for configuring hubs are now available:
To connect to the SharePoint Online tenant:
Use the New-MLSharePoint Connection cmdlet or connect via the Content Matrix Console.
To display a list of sites in the tenant that are already registered as hub sites:
Run the Get-MLHubsites cmdlet and specify either the TenantConnectionID or TenantUrl.
To register a site as a hub site:
1.Select (from the PowerShell ISE Command Window) or enter Register-MLHubSite.
2.Provide the following information:
a)For HubName, enter the name that you want to assign to the hub.
b)Enter the SiteUrl of the modern teams or communication site that you want to register as a hub site.
c)For AuthorizedPeople, enter either the Display Name or email address of the user(s) or security group(s) authorized to you want to allow to associate sites with the hub. You can enter multiple users/groups as a comma-separated list.
NOTE: If you leave this field blank, all users will be able to associate their sites with the hub.
3.Enter either the TenantConnectionID or TenantUrl.
4.Run the cmdlet.
Example Scripts:
Register-MLHubSite -TenantConnectionId 555cff48-babd-000b-b000-12132f929d35 -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite" -HubName "Communication Hub" -AuthorizedPeople "devadminuser2@metalogixsoftware.onmicrosoft.com, Dev Admin User 1"
Register-MLHubSite -TenantUrl "https://metalogixsoftware-admin.sharepoint.com" -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite" -HubName "A" -AuthorizedPeople "devadminuser2@metalogixsoftware.onmicrosoft.com, Dev Admin User 1"
When a site is registered as a hub, the icon to the left of the site in the Content Matrix Console is changed to .
1.Select (from the PowerShell ISE Command Window) or enter Edit-MLHubSiteSetting.
2.Enter the SiteUrl of the hub site that you want to edit and either the TenantConnectionID or TenantUrl.
3.Enter the HubName and AuthorizedPeople with the appropriate values.
IMPORTANT: You will need to re-enter all AuthorizedPeople, even those that have not changed. If you leave this parameter blank, all users will be able to associate their sites with the hub.
4.Click [OK].
Example Scripts:
Edit-MLHubSiteSettings -TenantConnectionId 555cff48-babd-000b-b000-12132f929d35 -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite" -HubName "HR Hub" -AuthorizedPeople "devadminuser3@metalogixsotware.onmicrosoft.com"
To associate a site with a hub site:
1.Select (from the PowerShell ISE Command Window) or enter Join-MLHubSite.
2.Enter the HubSiteUrl of the hub site with which you want to associate the site.
3.Enter the SiteUrl of the modern team or communication site you want to associate.
4.Enter either the TenantConnectionID or TenantUrl.
5.Run the cmdlet.
Example Script:
Join-MLHubSite HubSiteUrl https://metalogixsoftware.sharepoint.com/sites/vlad_hubSite -TenantConnectionId 555cff48-babd-484b-b381-12132f929d35 -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite"
When a site is associated with a hub, the icon to the left of the site in the Content Matrix Console is changed to .
To change a hub association:
1.Select (from the PowerShell ISE Command Window) or enter Join-MLHubSite.
2.Enter parameters as you would if you were associating a site with a hub site, using the new HubSiteUrl.
NOTE: If you want to remove a hub association completely, enter a value of None for the HubSiteUrl. When the association is removed, the site theme and shared navigation of the last associated hub will be retained.
3.Run the cmdlet.
Example Script (to remove an association):
Join-MLHubSite HubSiteUrl none -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite" -TenantUrl "https://metalogixsoftware-admin.sharepoint.com"
1.Select (from the PowerShell ISE Command Window) or enter Unregister-MLHubSite.
2.Enter the SiteUrl of the hub site you want to unregister.
3.Enter either the TenantConnectionID or TenantUrl.
4.Run the cmdlet.
All sites associated with the hub site will be disassociated. However, these sites will retain the site theme and shared navigation previously inherited from the hub.
Example Script:
Unregister-MLHubSite -TenantConnectionId 555cff48-babd-484b-b381-12132f929d35 -SiteUrl "https://metalogixsoftware.sharepoint.com/sites/IB_Demo_STS3Source_RegisterAsHubSite"
After an initial migration is run, an incremental copy (also known as a delta migration) will copy any new and updated data from the source to the target.
There are three different methods to run an incremental copy from Metalogix Content Matrix:
·Incremental Copy Mode - Update Existing Objects option on the Migration Mode tab
The incremental copying option enables migrations that can preserve and update objects on the target of the migration. This mode is used when you just want to make sure nothing on the target gets overwritten. Only new objects that do not yet exist on the target are copied.
EXCEPTION: For lists and libraries with versioning enabled, any new versions that have been created since the initial migration will be copied to the target.
When this option is selected there are two options that are toggled. The first is the Preserve Item IDs option is enabled. The second is that the workflow copy options are turned off. This is because Incremental copies cannot be run on workflows.
·The Custom Copy option on the Migration Mode tab
The custom copy option allows you to run incremental copies for selected content. This option allows you to configure a mix of the Overwrite and the Incremental modes, meaning that incremental copies can be performed on select content in a migration, while allowing other content to be overwritten.
·The creation of an incremental job based on a previously run job
IMPORTANT: Preserving IDs on items/folders in Lists
When running an incremental copy the Preserve IDs on items/folders in Lists option must have been enabled in the original copy. This is so Metalogix Content Matrix can reference the item ID when looking to see if the items already exists on the target side. If this option was not selected, the incremental copy for SharePoint lists can return some strange results. Generally, in cases where this option was not selected, an incremental copy will create some duplicate content on the target for items it thinks are not in the list, even though they may be (but use a different item ID). The other possible consequence is that some data may be missing, because Metalogix Content Matrix may think that some data exists on the target, even though it may not (but the IDs may be in use). For more information on incremental copying and preserving IDs for SharePoint list items please see Preserving SharePoint List Item IDs When Migrating to SharePoint Online.
The preservation of Document ID/s is not an issue for incremental copying of SharePoint documents. Incremental copying for documents is referenced by the folder path/filename of the document instead of the item ID. Metalogix Content Matrix will look for the URL path of the document, and if found, will then compare the modified date between the original target document and the source document to see if any modifications have been made to the file. If any modifications are found, as compared to the target, these will be migrated to the target. If no file was found when looking back to the source/target URL path, then that document/folder will be added.
To perform an incremental copy using Migration mode:
2.On the Migration Mode tab, select Incremental copy.
When this option is selected:
§the Preserve Item IDs option is enabled, and
§the Workflow Copy Options is disabled. (Incremental copies cannot be run on workflows.)
Navigation: Incremental Migration > Creating an Incremental Migration from an Existing Job |
REMINDER: When running an incremental copy the Preserve IDs on items/folders in Lists option must be enabled so that Metalogix Content Matrix can determine if the item already exists or if it has been updated. (When copying documents the folder path and document name are used instead.)
To perform an incremental migration job from an existing job:
1.In the Job List, select the job(s) for which you want to perform an incremental migration. (Use [Ctr] click to select multiple jobs.)
2.Right-click and choose Create incremental job.
NOTE: The new job will use the same name as the initial job with " Incrementally" appended to the end of the name
Metalogix Content Matrix can generate PowerShell scripts to be used to migrate SharePoint content through the PowerShell command window. You can also use PowerShell to perform other actions, including:
·triggering a job in the Content Matrix Console to run
The Content Matrix PowerShell Console shortcut is added to the same Start Menu folder location where the to Metalogix Content Matrix Consoles are placed after installation. The same PowerShell console can be used for any edition, as long as the edition-specific snap-ins are used. You can also use a standard PowerShell console or PowerShell ISE.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center