4
4

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.

hyper-Vに登録した仮想環境を起動してリモートデスクトップ接続するバッチ

Posted at
仮想マシン起動リモート接続.bat
@powershell -NoProfile -ExecutionPolicy Unrestricted "$s=[scriptblock]::create((gc \"%~f0\"|?{$_.readcount -gt 1})-join\"`n\");&$s" %*&goto:eof

# Hyper-v 仮想マシン起動
$VMname = "XP"
Start-VM -NAME $VMname

# 起動した仮想マシンにリモートデスクトップで接続
$server = "XXX.XXX.XXX.XXX"
$RDPPort = 3389
Invoke-Expression "mstsc /v:$server"
4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?