2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Azure 仮想マシンを PowerShell で操作する

Last updated at Posted at 2016-02-24

Azure仮想マシン環境を PowerShell で操作する Tips をメモ。

仮想マシンをリストアップする

PS C:\WINDOWS\system32> Get-AzureVM

仮想マシンを起動する

PS C:\WINDOWS\system32> Start-AzureVM -Name computerName -ServiceName serviceName

OperationDescription OperationId                          OperationStatus
-------------------- -----------                          ---------------
Start-AzureVM        12345678-1001-2002-3003-999cb67d1b9b Succeeded

仮想マシンを停止する

ゲストOS内からシャットダウンしても課金はされたままなので、ポータルサイトから明示的にシャットダウンするか、このコマンドレットで停止するべし。

PS C:\WINDOWS\system32> Stop-AzureVM -Name computerName -ServiceName serviceName

確認
The specified virtual machine is the last virtual machine in this deployment. Continuing will result in a new IP address for your deployment. To shut down without losing the
deployment IP use -StayProvisioned.
[Y] はい(Y)  [N] いいえ(N)  [S] 中断(S)  [?] ヘルプ (既定値は "Y"): Y

OperationDescription OperationId                          OperationStatus
-------------------- -----------                          ---------------
Stop-AzureVM         12345678-1001-2002-3003-999cb67d1b9b Succeeded
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?