Zum Hauptinhalt springen

Add-SiteCollectionAdministrator

Hinweis: Für die PowerShell-Integration ist ein ShareGate Migrate Pro- oder Enterprise-Abonnement erforderlich. Sie ist im Essentials-Plan nicht verfügbar.

Befehl

Add-SiteCollectionAdministrator

Beschreibung

Dieser Befehl fügt Ihrem Benutzerkonto beim Verbinden mit einer Site automatisch die Rechte eines Websitesammlungsadministrators hinzu.

Hinweise:

Beispiele

Websitesammlungsadministratorrechte für eine Site hinzufügen

# Connect to the SharePoint site using the specified URL
$site = Connect-Site -Url "http://myfarm1/sites/mysite"
# Add a Site Collection Administrator to the specified SharePoint site
Add-SiteCollectionAdministrator -Site $site

Websitesammlungsadministratorrechte für eine Site über die Zentraladministration hinzufügen

# Connect to the SharePoint Central Administration site
$centralAdminSite = Connect-Site -Url "http://myfarm1:5000"

# Add a Site Collection Administrator to the specified SharePoint site
Add-SiteCollectionAdministrator -CentralAdmin $centralAdminSite -SiteUrl "http://myfarm1/sites/mysite/"

Websitesammlungsadministratorrechte für eine Site aus einem Mandanten hinzufügen

# Connect to the tenant using the specified domain and browser
$tenant = Connect-Tenant -Domain "mytenant" -Browser

# Add a Site Collection Administrator to the SharePoint site
Add-SiteCollectionAdministrator -CentralAdmin $tenant.Site -SiteUrl "https://mytenant.sharepoint.com/sites/mysite/"

OneDrive for Business bereitstellen und befüllen

# Connect to the SharePoint admin site using browser authentication
$tenant = Connect-Site -Url "https://mytenant-admin.sharepoint.com" -Browser

# Get the OneDrive URL for the specified user, provisioning it if it doesn't exist
$oneDriveUrl = Get-OneDriveUrl -Tenant $tenant -Email "[email protected]" -ProvisionIfRequired

# Add a site collection administrator for the user's OneDrive
Add-SiteCollectionAdministrator -CentralAdmin $tenant.Site -SiteUrl $oneDriveUrl

# Connect to the user's OneDrive using stored credentials
$oneDrive = Connect-Site -Url $oneDriveUrl -UseCredentialsFrom $tenant

# Get the "Documents" list from the OneDrive site
$dstList = Get-List -Name "Documents" -Site $oneDrive

# Import documents from a shared network drive to the OneDrive "Documents" list
Import-Document -SourceFolder "\\mysharedrive\documentsToImport\" -DestinationList $dstList

# Remove the site collection administrator from the user's OneDrive
Remove-SiteCollectionAdministrator -CentralAdmin $tenant.Site -SiteUrl $oneDriveUrl

Syntax

Add-SiteCollectionAdministrator
-Site <Site>

Add-SiteCollectionAdministrator
-CentralAdmin <Site>-SiteUrl <String>

Parameter

-CentralAdmin <Site>

Gibt die Farm- oder Mandanten-Site für die Transformation an.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

CentralAdmin

Aliase

None

-Site <Site>

Gibt die zu transformierende Site an.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

(All)

Aliase

None

-SiteUrl <String>

Gibt die zu transformierende Site an.

Erforderlich?

True

Standardwert

None

Pipelineeingabe zulässig?

True (ByValue, ByPropertyName)

Platzhalterzeichen zulässig?

False

Parametersatzname

CentralAdmin

Aliase

None

Dieser Artikel wurde mit künstlicher Intelligenz übersetzt. Bei Unklarheiten konsultieren Sie bitte die englische Originalversion.

Hat dies deine Frage beantwortet?