Questions tagged [winrm]

Windows Remote Management server

Purpose of WinRM

Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems, from different vendors, to interoperate.

The WS-Management protocol specification provides a common way for systems to access and exchange management information across an IT infrastructure. WinRM and Intelligent Platform Management Interface (IPMI), along with the Event Collector are components of the Windows Hardware Management features.

Usage

You can use WinRM scripting objects, the WinRM command-line tool, or the Windows Remote Shell command line tool WinRS to obtain management data from local and remote computers that may have baseboard management controllers (BMCs). If the computer runs a Windows-based operating system version that includes WinRM, the management data is supplied by Windows Management Instrumentation (WMI).

You can also obtain hardware and system data from WS-Management protocol implementations running on operating systems other than Windows in your enterprise. WinRM establishes a session with a remote computer through the SOAP-based WS-Management protocol rather than a connection through DCOM, as WMI does. Data returned to WS-Management protocol are formatted in XML rather than in objects.

The Intelligent Platform Management Interface (IPMI) WMI provider is a standard WMI provider with classes that obtain BMC sensor data from computers with appropriate hardware. IPMI data can be accessed using the WinRM scripting API, the WMI Scripting, or COM APIs.

Basic Configuration:

First, to make WinRM work on the server we need the Windows Firewall to be enabled. Once that is done, open a command prompt and run the following command:

winrm quickconfig

This command performs configuration actions to enable this machine for remote management, which includes:

  1. Starts the WinRM service
  2. Set the WinRM service type to auto start
  3. Create a listener to accept requests on any IP address Enable
  4. firewall exception for WS-Management traffic (for http only)
462 questions
86
votes
5 answers

How to add more than one machine to the trusted hosts list using winrm

To run powershell commands on a machine from a remote machine we have to add the remote machine to the trusted hosts list of the host machine. I am adding machine A to machine B's trusted hosts using the following command : winrm set…
cmm user
  • 1,936
  • 6
  • 32
  • 47
27
votes
4 answers

Powershell remoting - Policy does not allow the delegation of user credentials

I'm new to powershell and I'm having troubles using credentials delegation. I have the following script: $session = New-PSSession myserver -Authentication CredSSP -Credential DOMAIN\Administrator Invoke-Command -Session $session -ScriptBlock {
ChrisB
  • 757
  • 2
  • 7
  • 16
21
votes
5 answers

Send files over PSSession

I just burned a couple of hours searching for a solution to send files over an active PSSession. And the result is nada, niente. I'm trying to invoke a command on a remote computer over an active session, which should copy something from a network…
kalbsschnitzel
  • 797
  • 1
  • 7
  • 28
19
votes
1 answer

Why Local Users and Groups is missing in Computer Management on Windows 10 Home?

I'm using Windows 10 Home. While troubleshooting some issue with WinRM, I figured out "Local Users and Groups" item is missing in my System Tools. Computer Management >> System Tools >> "Local Users and Groups" missing.
Sakthivel
  • 413
  • 1
  • 4
  • 12
18
votes
2 answers

Connecting to remote server failed using WinRM from PowerShell

I am trying to run powershell code from my computer to vm on my computer, but i keep getting this error: Connecting to remote server failed with the following error message : The WinRM client cannot process the request. If the authentication …
woolford
  • 207
  • 1
  • 6
  • 12
15
votes
1 answer

WinRM cannot process the request - fails only over a specific domain

Some of ours servers (W2K8 R2) were moved to the cloud last week, once done that my powerswhell script started to fail (was working fine before), the exception is thrown on the line where the connection is trying to be established, $ExSession =…
g3n1t0
  • 151
  • 1
  • 1
  • 3
15
votes
6 answers

Configure and listen successfully using WinRM in powershell

I'm testing WinRM connection using Command Prompt on my local and remote machine and my question is devided into two parts. PART I I tested TCP/IP connectivity by using ping command to ping : IP Address of local computer and remote computer, default…
sanya
  • 233
  • 2
  • 3
  • 9
14
votes
1 answer

"The SSL certificate contains a common name (CN) that does not match the hostname." in VSTS Deployment

I am using VSTS to deploy to an Azure VM. In my release definition, I receive the following error when trying to copy files over: The SSL certificate contains a common name (CN) that does not match the hostname. For more information, see the …
srbrills
  • 1,273
  • 2
  • 13
  • 29
12
votes
2 answers

ssl: auth method ssl requires a password

While trying to connect to a windows VM through Ansible I get this issue: TASK [setup] ******************************************************************* <10.xx.xx.xx> ESTABLISH WINRM CONNECTION FOR USER: winad-admin on PORT 5986 TO…
Ajov Crowe
  • 399
  • 1
  • 7
  • 17
11
votes
4 answers

vagrant up fails with cannot load winrm

I am trying to run a Vagrant box with SQL Server for local development. I am running Fedora 23. The box in question is this. vagrant up fails with the following error message: /usr/share/vagrant/plugins/communicators/winrm/shell.rb:9:in…
lalo
  • 457
  • 5
  • 16
9
votes
1 answer

"Access denied" on Remote winrm

I created a Windows VM on Windows Azure with winrm over SSL set. But, I can't connect it using a powershell script. When I'm running the following: ​Enter-PSSession -ConnectionUri https://myniceapp.cloudapp.net:5986 -Credential…
Guy Korland
  • 7,479
  • 12
  • 48
  • 94
9
votes
1 answer

Checks about WinRM service in remote machine

I have seen great article PowerShell 2.0 remoting guide: Part 8 – remoting scenarios and troubleshooting http://www.ravichaganti.com/blog/?p=1181 I have this issue: I have two computers in domain, in network. First Test OK: Remoting to a computer in…
Kiquenet
  • 13,271
  • 31
  • 133
  • 232
8
votes
0 answers

How to do "first login" style things via WinRM

So I'm working on a Chef cookbook for Windows, meaning it is generally executed on a Windows Server instance (2012r2 in this case). Specifically I am installing MSYS2 which uses Cygwin under the hood. I noticed that package installs were very slow…
coderanger
  • 44,716
  • 4
  • 39
  • 59
7
votes
2 answers

Create a Windows AMI with packer and ansible on AWS

I want to create an aws windows AMI with packer and ansible. I have tried many configuration, but I have still a problem of connection to the instance. Here is my packer conf : { "builders": [{ "type": "amazon-ebs", "access_key": "{{user…
elhostis
  • 967
  • 11
  • 28
7
votes
2 answers

Increasing stack size with WinRM for ScriptMethods

We are currently refactoring our administration scripts. It had just appeared that a combination of WinRM, error handling and ScriptMethod dramatically decreases available recursion depth. See the following example: Invoke-Command -ComputerName .…
Pavel Mayorov
  • 407
  • 1
  • 10
  • 19
1
2 3
30 31