我是 Microsoft Azure 新预览门户用户。我正在考虑运行 Microsoft Windows Server 2012 R2 Datacenter。我将使用我的虚拟机来支持 Boinc Grid 项目。
我已将 Microsoft Windows Server 添加到我的 Microsoft Azure。但是,我无法连接到 Microsoft Azure 的远程桌面。它使登录失败。我已经尝试了我的 Microsoft Azure 密码和 Windows Server 帐户的密码。但是,并没有改变...
我没有尝试在 Microsoft PowerShell 上进行连接。我已经记录了我的协议、私有端口和网站名称。如果他们需要,我可以给他们。
你能帮我连接远程桌面吗?
顺便说一句,我的虚拟机网站是;
boincgrid.cloudapp.net
等待您的帮助,度过美好的 Ideaflow 日子。
在使用@Tom Van Gramberen 的指导后于 22.6.2019 编辑
我已经听从了你的指示。但是,我一步堆叠;
我完成了http://blogs.technet.com/b/keithmayer/archive/2014/04/03/microsoft-azure-virtual-machines-reset-forgotten-admin-password-with-windows-powershell.aspx中的所有说明. 但是,在连接到我的 Microsoft Azure 虚拟机后,我无法获取 AzureVM...
我在 PowerShell 中的输出是;
PS C:\> Get-Module Azure
PS C:\> Set-ExecutionPolicy RemoteSigned
PS C:\> Import-Module Azure
PS C:\> Add-AzureAccount
PS C:\> Get-AzureSubsription | Format-Table -Property SubsriptionName
Get-AzureSubsription : The term 'Get-AzureSubsription' is not recognized as the name of a cm
dlet, function, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-AzureSubsription | Format-Table -Property SubsriptionName
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AzureSubsription:String) [], CommandNotF
oundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\> Get-AzureSubscription | Format-Table -Property SubscriptionName
SubscriptionName
----------------
Pay-As-You-Go
Pay-As-You-Go
Pay-As-You-Go
Pay-As-You-Go
Pay-As-You-Go
Pay-As-You-Go
Pay-As-You-Go
PS C:\> $subsription = "Pay-As-You-Go"
PS C:\> Select-AzureSubscription -Default $subscription
Select-AzureSubscription : Cannot validate argument on parameter 'SubscriptionName'. The arg
ument is null or empty. Provide an argument that is not null or empty, and then try the comm
and again.
At line:1 char:35
+ Select-AzureSubscription -Default $subscription
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Select-AzureSubscription], ParameterBinding
ValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.WindowsAzure.Comma
nds.Profile.SelectAzureSubscriptionCommand
PS C:\> Select-AzureSubscription -Default $subscription
Select-AzureSubscription : Cannot validate argument on parameter 'SubscriptionName'. The arg
ument is null or empty. Provide an argument that is not null or empty, and then try the comm
and again.
At line:1 char:35
+ Select-AzureSubscription -Default $subscription
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Select-AzureSubscription], ParameterBinding
ValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.WindowsAzure.Comma
nds.Profile.SelectAzureSubscriptionCommand
PS C:\> $subscription = “ENTER YOUR SUBSCRIPTION NAME HERE”
Select-AzureSubscription –Default $subscription
Select-AzureSubscription : The subscription named 'ENTER YOUR SUBSCRIPTION NAME HERE' cannot
be found. Use Set-AzureSubscription to initialize the subscription data.
At line:3 char:1
+ Select-AzureSubscription –Default $subscription
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Select-AzureSubscription], Exception
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscripti
onCommand
PS C:\> $subscription = “Pay-As-You-Go”
Select-AzureSubscription –Default $subscription
PS C:\> $adminCredentials = Get-Credential -Message "Message new Admin credentals"
PS C:\>
Get-AzureVM |
Where-Object -Property Status -EQ "ReadyRole" |
Out-GridView -Title "Select a VM …" -PassThru |
ForEach-Object {
$VM = Get-AzureVM -Name $_.Name -ServiceName $_.ServiceName
If ($VM.VM.ProvisionGuestAgent) {
Set-AzureVMAccessExtension -VM $VM `
-UserName $adminCredentials.UserName `
-Password $adminCredentials.GetNetworkCredential().Password `
-ReferenceName "VMAccessAgent" |
Update-AzureVM
Restart-AzureVM -ServiceName $VM.ServiceName -Name $VM.Name
} else {
Write-Output "$($VM.Name): VM Agent Not Installed"
}
}
PS C:\> Get-AzureVm -ServiceName "boincgrid" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
PS C:\> Get-AzureVm -ServiceName "boincgrid" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus";
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
PS C:\> Get-AzureVm -ServiceName "boincgrid" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
PS C:\> Get-AzureVm -ServiceName "boincgrid" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus";
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
PS C:\> Get-AzureVm -ServiceName "boincgrid" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"}
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
PS C:\> Get-AzureVm -ServiceName "boincgrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
WARNING: No deployment found in service: 'boincgrid'.
PS C:\> Get-AzureVm -ServiceName "VIRTUAL MACHINES" -Name "BoincGrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
Get-AzureVm : BadRequest: The hosted service name is invalid.
At line:1 char:1
+ Get-AzureVm -ServiceName "VIRTUAL MACHINES" -Name "BoincGrid" | Format-Table -au ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzu
reVMCommand
PS C:\> Get-AzureVm -ServiceName "VIRTUAL MACHINE" -Name "BoincGrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
Get-AzureVm : BadRequest: The hosted service name is invalid.
At line:1 char:1
+ Get-AzureVm -ServiceName "VIRTUAL MACHINE" -Name "BoincGrid" | Format-Table -aut ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzu
reVMCommand
PS C:\> Get-AzureVm -ServiceName "Virtual Machine" -Name "BoincGrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
Get-AzureVm : BadRequest: The hosted service name is invalid.
At line:1 char:1
+ Get-AzureVm -ServiceName "Virtual Machine" -Name "BoincGrid" | Format-Table -aut ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzu
reVMCommand
PS C:\> Get-AzureVm -ServiceName "VIRTUAL MACHINE" -Name "boincgrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
Get-AzureVm : BadRequest: The hosted service name is invalid.
At line:1 char:1
+ Get-AzureVm -ServiceName "VIRTUAL MACHINE" -Name "boincgrid" | Format-Table -aut ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzu
reVMCommand
PS C:\> Get-AzureVm -ServiceName "Boincgrid" -Name "boincgrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
WARNING: No deployment found in service: 'Boincgrid'.
PS C:\> Get-AzureVm -ServiceName "boincgrid" -Name "boincgrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
WARNING: No deployment found in service: 'boincgrid'.
PS C:\>
我的虚拟机和云服务名称是 BoincGrid。
我已经在 Microsoft Developer Network 中编辑了他们给定的命令...
他们的示例命令是:
Get-AzureVm -ServiceName "MySvc1" ' | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
我编辑的命令是;
Get-AzureVm -ServiceName "boincgrid" -Name "boincgrid" | Format-Table -auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus"
输出是;
警告:在服务中找不到部署:“boincgrid”。
我无法连接我的虚拟机...
等待您的帮助,度过美好的 Ideaflow 日子。