首页 > 解决方案 > powershell 在不同的服务器上运行时给出不同的结果

问题描述

'get-wmiobject -class win32_share' 在从 Windows 2k12 R2 远程运行和从 Windows 2k8 R2 本地运行时给出不同的结果

我有一个托管在 Windows 2k8 R2 上的文件服务器。我正在运行 command( get-wmiobject -class win32_share) 以在本地生成文件共享,并且它提供了正确的数据。但是当我get-wmiobject -class win32_share -computername <<server_name>>从 Windows 2012 R2 服务器运行 command() 时,它提供了更多的共享。

get-wmiobject -class win32_share

get-wmiobject -class win32_share -computername <<server_name>>

标签: powershellpowershell-2.0powershell-remoting

解决方案


推荐阅读