メインコンテンツにスキップ

Import-PermissionLevelMapping

注: PowerShellとの連携には、ShareGate MigrateのProまたはEnterpriseサブスクリプションが必要です。Essentialsプランでは利用できません。

コマンド

Import-PermissionLevelMapping

説明

アクセス許可レベルのマッピングをファイルからインポートするコマンドです。

ファイルからマッピングをインポートする

# Import permission level mappings from the specified file
$mappingSettings = Import-PermissionLevelMapping -Path "C:\MyMappings\MyPermissionLevelMappingsFileName.sgrm"

# Display the imported mappings
$mappingSettings
# Output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings : Approve -> Approve
# Contribute -> Contribute
# Design -> Design
# Full Control -> Full Control
# My Custom Permission -> <NO DESTINATION>
# Read -> Read
# View Only -> View Only
# SiteTemplateMappings :
# SensitivityLabelMappings :

ファイルのマッピングとマージする

# Map "My Custom Permission" to "Full Control"
$mappingSettings = Set-PermissionLevelMapping -Source "My Custom Permission" -Destination "Full Control"

# Import additional permission level mappings from the specified file, merging with the current settings
$mappingSettings = Import-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName.sgrm"

# Display the final permission level mappings
$mappingSettings
# Output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings : Approve -> Approve
# Contribute -> Contribute
# Design -> Design
# Full Control -> Full Control
# My Custom Permission -> Full Control
# Read -> Read
# View Only -> View Only
# SiteTemplateMappings :
# SensitivityLabelMappings :

構文

Import-PermissionLevelMapping
-Path <String>
[-MappingSettings <MappingSettings>]

パラメーター

-MappingSettings <MappingSettings>

マッピング設定を指定します。このコマンドを使用すると、既存のマッピング設定オブジェクトに複数のマッピング設定を追加できます。詳細については、複数のマッピング ファイルを同時に使用するを参照してください。

必須かどうか

False

既定値

None

パイプライン入力を許可するか

True (ByValue, ByPropertyName)

ワイルドカード文字を許可するか

False

パラメーターセット名

(All)

エイリアス

None

-Path <String>

以前にShareGateからエクスポートしたファイル パスを指定します。

必須かどうか

True

既定値

None

パイプライン入力を許可するか

False

ワイルドカード文字を許可するか

False

パラメーターセット名

(All)

エイリアス

PSPath

この記事はAIによって翻訳されています。ご不明な点がある場合は、英語の原文をご確認ください。

こちらの回答で解決しましたか?