簡體   English   中英

無法在具有Windows Powershell遠程功能的Windows Server Azure VM上運行任何程序,沒有錯誤

[英]Can not run any program on windows server Azure VM with windows powershell remote, No error

我想使用Windows Powershell Remote從Windows機器在Azure Windows服務器上遠程運行某些程序。 它已配置,我可以執行復制,刪除,添加和獲取進程等操作。但是我無法在遠程Azure VM上運行任何程序,例如.cmd,.txt等。 我沒有任何錯誤。

我嘗試執行Invoke-item,Invoke-process...。 如果您能幫助我,我將不勝感激。

BR,

根據我的知識,我們無法使用invoke-item在Powershell遠程會話中打開文件。
當我們運行Invoke-Item "c:\\test1.txt" ,我們無法在powershell會話中打開此txt文件( 無交互 ),但是此過程在后台運行,我們可以使用gps來獲取它,如下所示: 在此處輸入圖片說明

根據您的描述,我們可以在Powershell遠程會話中運行.cmd ,如下所示:

PS C:\Users\Administrator> Enter-PSSession -ComputerName 40.71.248.64 -Credential jason
[40.71.248.64]: PS C:\Users\jason\Documents> cd c:\
[40.71.248.64]: PS C:\> .\test.cmd

C:\>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : jason
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : ym3volvuiu2uvkfm320g2dyokd.bx.internal.cloudapp.net

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : ym3volvuiu2uvkfm320g2dyokd.bx.internal.cloudapp.net
   Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
   Physical Address. . . . . . . . . : 00-0D-3A-19-04-EA
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9c7d:4c97:bcfc:2914%18(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.0.4(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, June 28, 2017 12:12:27 AM
   Lease Expires . . . . . . . . . . : Saturday, August 4, 2153 2:19:12 PM
   Default Gateway . . . . . . . . . : 10.0.0.1
   DHCP Server . . . . . . . . . . . : 168.63.129.16
   DHCPv6 IAID . . . . . . . . . . . : 301993274
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-20-E4-AC-C2-00-0D-3A-19-04-EA
   DNS Servers . . . . . . . . . . . : 168.63.129.16
   NetBIOS over Tcpip. . . . . . . . : Enabled

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM