PowerShell モジュールのインストール

Migrate for Compute Engine では、カスタム モジュールのコマンドを使用して PowerShell からアクションをスクリプト化できます。このドキュメントでは、PowerShell モジュールの組み込みヘルプのインストールと使用について説明します。

モジュールのインストール

  1. ダウンロード ページから Migrate for Compute Engine PowerShell モジュール インストーラをダウンロードするか、Migrate for Compute Engine Manager を開き、ホームページの [PowerShell module download] アイコンをクリックします。
  2. インストール ファイルを実行し、ウィザードの指示に従います。Velostrata エンドユーザー サービス契約に同意し、インストール場所を選択します。

  3. 次の PowerShell モジュールがインストールされます。

    • Velostrata.PowerShell
    • Velostrata.Runbook
  4. これで、以下を使用して Migrate for Compute Engine Manager に接続できるようになりました。

PS C:\Users\Demo> Import-Module Velostrata.PowerShell
PS C:\Users\Demo> Connect-VelostrataManager

Migrate for Compute Engine Managaer の IP の入力を促すスクリプトが表示されます。ユーザー名を求められた場合は、apiuser を使用します。パスワードは、Migrate for Compute Engine Manager の作成時に設定したパスワードです。

PowerShell のヘルプを参照する

PowerShell モジュールは、Get-Help コマンドを介してヘルプを提供します。

PS C:\Users\Demo> Get-help Connect-VelostrataManager

NAME
    Connect-VelostrataManager

SYNOPSIS
    This cmdlet establishes a connection to a Velostrata Manager Server
system.

    Connect-VelostrataManager [-Server] <String> [-Username] <String>
[-Password] <SecureString> [-Port [<Int32>]]

SYNTAX
    Connect-VelostrataManager [-Server] <String> [-Port <Int32>] [-Username]
<String> [-Password] <SecureString>  [<CommonParameters>]

DESCRIPTION
    The cmdlet starts a new session or re-establishes a previous session with
Velostrata Manager Server using the specified parameters.
    When you attempt to connect to a server, the server checks for valid
credentials and then sets the relevant PSVariables.
    Once the user is authenticated successfully, the session remains in effect
until the PowerShell session is closed or a new Migrate for Compute Engine Manager session is established.
    Note: You can have only one active connection to a Migrate for Compute Engine Manager server
per PowerShell local session.

REMARKS
    To see the examples, type: "get-help Connect-VelostrataManager -examples".
    For more information, type: "get-help Connect-VelostrataManager -detailed".
    For technical information, type: "get-help Connect-VelostrataManager -full".
    For online help, type: "get-help Connect-VelostrataManager -online"