зеркало из https://github.com/Azure/vagrant-azure.git
Fix check winrm running.
Add guest port to create new ps session.
This commit is contained in:
Родитель
4de68d3124
Коммит
4597e0bd58
|
@ -2,7 +2,6 @@
|
|||
# Copyright (c) Microsoft Open Technologies, Inc.
|
||||
# All Rights Reserved. Licensed under the Apache 2.0 License.
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
module VagrantPlugins
|
||||
module WinAzure
|
||||
module Communicator
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
# Copyright (c) Microsoft Open Technologies, Inc.
|
||||
# All Rights Reserved. Licensed under the Apache 2.0 License.
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
param (
|
||||
[string]$guest_ip = $(throw "-guest_ip is required."),
|
||||
[string]$username = $(throw "-guest_username is required."),
|
||||
[string]$password = $(throw "-guest_password is required.")
|
||||
[string]$password = $(throw "-guest_password is required."),
|
||||
[string]$guest_port = $(throw "-guest_port is required")
|
||||
)
|
||||
|
||||
# Include the following modules
|
||||
|
@ -14,7 +16,7 @@ $presentDir = Split-Path -parent $PSCommandPath
|
|||
. ([System.IO.Path]::Combine($presentDir, "utils\create_session.ps1"))
|
||||
|
||||
try {
|
||||
$response = Create-Remote-Session $guest_ip $username $password
|
||||
$response = Create-Remote-Session $guest_ip $guest_port $username $password
|
||||
if (!$response["session"] -and $response["error"]) {
|
||||
Write-Host $response["error"]
|
||||
return
|
||||
|
|
Загрузка…
Ссылка в новой задаче