Articles of winrm

PowerShell命令检查pipe理员权限总是让我错误,当我RDP到它,真正的时候,我使用WinRM

我试图通过Ansible脚本检查我的远程Windows服务器2012 R2机器的pipe理员权限给当前用户。 我发现以下命令来检查互联网上的pipe理员权限: ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) 现在有几个关于这个问题: 1)当我使用pipe理员帐户将RDP传送到任何系统时,该命令给出'假'作为输出。 但是当我通过Ansible运行它时(Ansible使用winRM来从中央服务器发起命令),同样的命令返回“真”。 2)是否有更好的命令(CMD或PowerShell)来检查当前用户是否具有pipe理权限?

W2K12R2上的服务器pipe理器WinRM插件可能已损坏或丢失

今天我被这个臭名昭着的2012R2错误彻底击败了: Server Manager could not start the task due to the following error: Failed to open the runspace pool. The Server Manager WinRM plug-in might be corrupted or missing. 我已经多次尝试在 这里和这里提出的每个解决scheme。 没有运气。 事件日志中没有单个错误。 因为我可以添加 – 删除angular色与Powershell或完全擦拭这台机器。 我仍然在寻找这个简单问题的正常解决scheme。 进一步的testing表明,我的错误是可重复的。 我已经testing了处女默认完全更新的Windows Server 2012 R2标准安装,并能够重现它。 本声明之后出现问题: winrm invoke Restore http://schemas.microsoft.com/wbem/wsman/1/config/plugin @{} 全部细节如下。 有任何想法吗? 域控制器从win2008 R2升级到2012R2后,一切工作完美无缺。 [dcdiag / fix […]

为什么我在Exchange 2010 SP1中导入PST文件时遇到拒绝访问?

我正尝试使用Exchange 2010 SP1中的New-MailboxImportRequest cmdlet直接从远程计算机上的原始位置导入.PST文件。 如果文件位于文件共享位置,则不会导入文件,但是我不明白为什么我无法从远程硬盘驱动器上的其他位置导入文件(如果使用的是DomainAdmin级别的凭据)。 这是我的powershell: [PS] C:\ Windows \ system32> New-MailboxImportRequest -Mailbox [email protected] -FilePath'\ Win7-Test-1 \ c $ \ pst_files \ test1.pst' 无法打开PST文件'\ Win7-Test-1 \ c $ \ pst_files \ test1.pst'。 错误详细信息:访问path“\ Win7-Test-1 \ c $ \ pst_files \ test1.pst”被拒绝。 + CategoryInfo:NotSpecified:(0:Int32)[New-MailboxImportRequest],RemotePermanentException + FullyQualifiedErrorId:C1C65BA8,Microsoft.Exchange.Management.RecipientTasks.NewMailboxImportRequest [PS] C:\ Windows \ system32> 我已经证实,我可以使用相同的PowerShell提示符做一个简单的远程目录目录,所以不知道是什么问题。 [PS] C:\ Windows \ […]

Powershell远程会话和访问networking资源

看来我无法访问远程Powershell会话中的networking资源。 这是使用Powershell v2。 本地和远程计算机都在同一个域中。 作为一个例子,如果我在MachineA上并通过Enter-PSSession MachineB连接到MachineB,然后从那里执行类似gci \\MachineA\SomeShare ,我得到一个错误:“找不到path'\\ MachineA \ SomeShare',因为它不存在”。 如果我直接从MachineB执行相同的命令,我会得到我期望的结果。 我试图将“SomeShare”的“读取”权限授予“所有人”,并直接授予远程机器的机器账号。 这没有什么区别。 是否有configuration更改,我可以让这个工作?

允许域用户运行winrm命令

目前我在一个EC2实例(Windows 2008 R2)上configuration了AD / Kerberos,并创build了几个用户。 每个用户都有pipe理员权限。 当我们作为非域pipe理员login时,我可以成功执行winrm命令。 但是,当我login作为域用户(谁拥有pipe理员权限),我不能运行winrm命令: C:\Users\domain-username>winrm get winrm/config/service/auth WSManFault Message = Access is denied. Error number: -2147024891 0x80070005 Access is denied. 我检查WinRM的组策略编辑器没有发现任何相关的。 我不知道我错过了什么。

Windows WMI获取快照EnabledState

我正在尝试使用WMI获取虚拟机快照的EnabledState。 那就是我尝试获取拍摄快照时虚拟机当前的EnabledState。 到目前为止,我知道如何列出机器的所有快照。 为此我使用: winrm e wmi/root/virtualization/* -filter:"select * from Msvm_VirtualSystemSettingData where SettingType = 5" 这提供了许多关于快照的信息,但是它并没有给我虚拟机的启用状态。 任何想法我怎么能得到的?

Microsoft Exchangepipe理控制台,启动失败

启动Exchangepipe理控制台时出现错误 [###################] Connecting to remote server failed with the following error message : The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually re turned by a HTTP server that does not support the WS-Management protocol. For more information, see […]

用winrm / wsman列出所有的WMI类

有没有办法通过一个winrm命令从系统中获取所有的WMI信息? 我可以运行诸如winrm enum wmicimv2 / win32_computersystem这样的命令,它会给我提供如下信息: Win32_ComputerSystem AdminPasswordStatus = 3 AutomaticManagedPagefile = true AutomaticResetBootOption = true AutomaticResetCapability = true BootOptionOnLimit = null BootOptionOnWatchDog = null BootROMSupported = true BootupState = Normal boot … 但有没有办法获得所有的WMI类的列表,除了像事先get-wmiobject -list? 这也将有助于编译一个在戴尔生命周期控制器上监控的东西列表,因为我似乎无法find这些CIM类的列表。

使用WS-Management从Windows PC获取IPv6路由表

我必须使用WS-Management从Windows PC中获取IPv6路由表。 我在linux上使用wsman作为客户端。 我发现Win32_IP4RouteTable WMI类是IPv4,但看起来像WMI不支持IPv6。 有没有办法做到这一点?

无法通过winrm安装Office 2010

我试图安装Microsoft Office 2010,我已经创build了一个MSP和config.xml文件,所以我可以使用以下命令从Powershell执行此操作: Start-Process "C:\temp\Office2010\x86\setup.exe" -ArgumentList "/config `"Config.xml`" /adminfile `"custom.MSP`"" -Wait -NoNewWindow 这完美的作品。 等待setup.exe完成后,安装Office。 但是使用以下命令从远程机器运行相同的命令: Invoke-Command -computer computer -Credential user -ScriptBlock { Start-Process "C:\temp\Office2010\x86\setup.exe" -ArgumentList "/config `"Config.xml`" /adminfile `"custom.MSP`"" -Wait -NoNewWindow} 我知道命令正在执行,因为安装程序正在创build一个日志文件,但日志只是突然停止https://gist.github.com/smudgerdan/62a5e44300a9590d6174 有什么意思,winrm不会等待setup.exe来完成? 我如何通过winrm安装Office 2010?