SCVMM 2016 UR5 で利用可能なコマンドレット (Get-SCScriptCommand) について

ブログ エントリ内にアフィリエイト広告が含まれています
スポンサーリンク

System Center 2016 – Virtual Machine Manager (SCVMM 2016) に触れる機会が多くなり、Virtual Machine Manager Command Shell を使った設定や、情報取得、および管理することが増えてきたので、備忘録として各コマンドレットの概要を日本語化 (意訳) しました。

ここでは Get-SCScriptCommand コマンドレットのヘルプ情報について、SCVMM2016 UR5 の Virtual Machine Manager Command Shell 上で「Get-SCScriptCommand」コマンドレットの -Full オプションを用いて実行した結果を元に記載しています。
※SCVMM 2016 UR5 で利用可能なコマンドレット一覧については、「System Center 2016 – Virtual Machine Manager で利用できるコマンドレットについて」を参照。

Get-SCScriptCommand コマンドレット

名前

Get-SCScriptCommand

概要

アプリケーション プロファイル、アプリケーションの展開、もしくはホスト プロファイルに対するスクリプト コマンドを取得します。

構文

Get-SCScriptCommand
-ApplicationDeployment <ApplicationDeployment>
[-VMMServer <ServerConnection>]
[<CommonParameters>]

Get-SCScriptCommand
-ApplicationProfile <ApplicationProfile>
[-VMMServer <ServerConnection>]
[<CommonParameters>]

Get-SCScriptCommand
-PhysicalComputerProfile <PhysicalComputerProfile>
[-VMMServer <ServerConnection>]
[<CommonParameters>]

説明

Get-SCScriptCommand コマンドレットは、アプリケーション プロファイル、アプリケーションの展開、もしくはホスト プロファイルに対するすべてのスクリプト コマンドを取得します。

パラメーター

-ApplicationDeployment <ApplicationDeployment>

アプリケーション展開オブジェクトを指定します。

必須 true
位置 named
既定値 None
パイプライン入力を許可する True (ByValue)
ワイルドカード文字を許可する false

-ApplicationProfile <ApplicationProfile>

アプリケーション プロファイル オブジェクトを指定します。

必須 true
位置 named
既定値 None
パイプライン入力を許可する True (ByValue)
ワイルドカード文字を許可する false

-PhysicalComputerProfile <PhysicalComputerProfile>

コンピューターに OS を展開する際に使用されるプロファイルを指定します。

必須 true
位置 named
既定値 None
パイプライン入力を許可する True (ByValue)
ワイルドカード文字を許可する false

-VMMServer <ServerConnection>

VMM サーバー オブジェクトを取得します。

必須 false
位置 named
既定値 None
パイプライン入力を許可する True (ByValue)
ワイルドカード文字を許可する false

<CommonParameters>

このコマンドレットは、次の共通パラメーターをサポートします: Verbose、Debug、ErrorAction、ErrorVariable、WarningAction、WarningVariable、OutBuffer, PipelineVariable、および OutVariable。詳細については、about_CommonParameters を参照してください。

入力

出力

  • ScriptCommand
    • このコマンドレットは、ScriptCommand オブジェクトを返します。

メモ

例 1 : アプリケーション プロファイルに関連付けられたすべてのスクリプト コマンド情報を取得する

コマンド
$AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
$ScriptCommand = Get-SCScriptCommand -ApplicationProfile $AppProfile
$ScriptCommand
コマンドの説明

最初のコマンドは、アプリケーション プロファイル オブジェクト “SvcWebAppProfile01” を取得し、そのオブジェクトを $AppProfile に格納します。

2 番目のコマンドは、$AppProfile に格納されたアプリケーション プロファイル オブジェクトに対するすべてのスクリプト コマンドを取得し、そのオブジェクトを $ScriptCommand 配列に格納します。

最後のコマンドは、$ScriptCommand 配列に格納されたすべてのスクリプト コマンド オブジェクトに関する情報を表示します。

例 2 : アプリケーション展開に関連付けられたすべてのスクリプト コマンド情報を取得する

コマンド
$AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
$AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile
$ScriptCommand = Get-SCScriptCommand -ApplicationDeployment $AppDeployment
コマンドの説明

最初のコマンドは、アプリケーション プロファイル オブジェクト “SvcWebAppProfile01” を取得し、そのオブジェクトを $AppProfile に格納します。

2 番目のコマンドは、$AppProfile に格納されたアプリケーション プロファイルに対するアプリケーション展開オブジェクトを取得し、そのオブジェクトを $AppDeployment 変数に格納します。

最後のコマンドは、$AppDeployment に格納されたアプリケーション展開オブジェクトに関連付けられたすべてのスクリプト コマンドを取得し、そのスクリプト コマンドを $ScriptCommand に格納します。

関連するリンク

  • Add-SCScriptCommand
  • Invoke-SCScriptCommand
  • Remove-SCScriptCommand
  • Set-SCScriptCommand

参考

タイトルとURLをコピーしました