繁体   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