注: PowerShellとの連携には、ShareGate MigrateのProまたはEnterpriseサブスクリプションが必要です。Essentialsプランでは利用できません。
パイピングを使うと、直前のコマンドの結果をそのまま使用できます。必要な記述量が減り、複数のコマンドを1行にまとめて書けるため、スクリプトを短くできます。
例
以下は、サイト コレクション内のリスト「Documents」に対するGet-Listコマンドを使ったパイピングの例です。
# Connect to the SharePoint site and retrieve the "Documents" list
$srcList = Connect-Site -Url "http://farm/sites/sitecollection" | Get-List -Name "Documents"
# List properties of the retrieved "Documents" list
Id : ab6a768d-3478-4302-8258-53f2c2637c12
Title : Documents
BaseType : Document Library
Source : /sites/sitecollection/
ContentApproval : False
RootFolder : /sites/sitecollection/Documents/
EnableAttachments : False
EnableVersioning : True
EnableMinorVersions : True
ForceCheckout : False
Site : http://farm/sites/sitecollection/
この記事はAIによって翻訳されています。ご不明な点がある場合は、英語の原文をご確認ください。
