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)
551 questions
5
votes
3 answers

Allowing WinRM in the Windows Firewall

I am using windows 7 machine, installed windows power shell. How to ensure that the Windows Firewall is configured to allow Windows Remote Management connections from the workstation. For example: netsh advfirewall firewall set rule name="Windows…
Raju
  • 375
  • 1
  • 4
  • 15
5
votes
2 answers

WinRm - Cannot create a WinRM listener on HTTPS due to incorrect SSL certificate

I want to use WinRM with https transport. I've bought a Comodo certificate (the error states I cannot use a self-signed certificate) with the Subject matching my FQDN (Full computer name in System) of my Windows 10 computer (not domain joined): CN =…
RHAD
  • 1,317
  • 3
  • 13
  • 37
5
votes
1 answer

How do I edit text remotely in Windows

(Note, this question is also posted on technet) How can I remotely edit a text file in Windows? I am running and administering a number of Windows 7 workstations and Windows Server 2012 machines. I would like to be able to remotely edit text files…
laffoyb
  • 1,540
  • 3
  • 22
  • 35
5
votes
3 answers

What is the difference between PowerShell and cmd.exe command syntax?

I am running the following command in PowerShell: PS C:\Users\adminaccount> winrm s winrm/config/service @{AllowUnencrypted="true"; MaxConcurrentOperationsPerUser="4294967295"} Error: Invalid use of command line. Type "winrm -?" for help. Which…
Bunyk
  • 7,635
  • 8
  • 47
  • 79
5
votes
1 answer

Connect to remote server using winrm without adding the server to TrustedHosts

I have been struggling to deal with winrm and TrustedHosts but to no avail. After some experimenting I found out the this field of winrm/config/client is limited up to 1023 symbols which is way not enough especially if adding hosts by their ipv6. I…
Ivaylo Strandjev
  • 69,226
  • 18
  • 123
  • 176
5
votes
1 answer

Powershell winrm Trusted Hosts not working

I am trying to set up remote management on a few machines. I can successfully execute commands on the remote machine from my computer, but I don't want anyone to be able to do so. I have tried setting the trusted hosts on the remote computer, and…
navalhawkeye
  • 259
  • 3
  • 4
  • 13
4
votes
3 answers

Terraform stucks when instance_count is more than 2 while using remote-exec provisioner

I am trying to provision multiple Windows EC2 instance with Terraform's remote-exec provisioner using null_resource. $ terraform -v Terraform v0.12.6 provider.aws v2.23.0 provider.null v2.1.2 Originally, I was working with three remote-exec…
4
votes
0 answers

Change Remote PowerShell reconnection timeout

When I have a Remote PowerShell session opened and the TCP stops working (e.g. power shut/cable disconnected/...), the Invoke-Command or Remove-PSSession commands block for a few minutes trying to reconnect. I want to reduce this timeout to 5…
Axel Williot
  • 485
  • 6
  • 13
4
votes
1 answer

Ansible create a zip file backup on windows host

I want to zip the windows directory into zip file. archive function is not working. for windows I see win_unzip module, but I didn't find win_zip module. How do we take the backup of existing folder in windows? - name: Backup existing install…
sfgroups
  • 18,151
  • 28
  • 132
  • 204
4
votes
0 answers

stop\start app pool non admin user with powershell remote iis

I have a script that works remotely with administrator rights,but I want it to work from a domain user who is in the group IIS_USERS , but this user is non-admin user withowt admin rights. UAC disable. Invoke-Command -ComputerName "test-tp"…
4
votes
1 answer

Powershell Remoting and WinRM

New-PSSession does not work when using the HostName of a server, but does with the IP. Both local and remote machines are on the same domain. PS C:\Windows\system32> new-PSSession -ComputerName "SERVERNAME" new-PSSession : [SERVERNAME] Connecting…
ArcSet
  • 6,518
  • 1
  • 20
  • 34
4
votes
1 answer

Optional part in JAX-WS response message

TL;DR: How can I have an optional in the response for a wsdl service. I am: targeting an existing service writing a client to talk to the service implemented the service definition as a Java interface The problem: Depending on the…
Svet
  • 196
  • 1
  • 6
4
votes
1 answer

Stderr: VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)

PS C:\vagrant_projects> vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'opentable/win-2012r2-standard-amd64-nocm' is up to date... ==> default: Clearing any previously set forwarded ports... ==>…
pavan kumar
  • 102
  • 1
  • 2
  • 11
4
votes
3 answers

invoke-command doesn't seem to work - Did I use winrm.cmd to configure TrustedHosts correctly?

I am not sure if I used winrmcmd to configure TrustedHosts correctly I am running commands in PowerShell from host_computer (part of workgroup) $cred = Get-Credential -credential user Prompt appears, and I enter in password Then I execute a…
Glowie
  • 2,271
  • 21
  • 60
  • 104
4
votes
1 answer

Using Connect-WSMan gives error: It cannot determine the content type of the HTTP response from the destination computer

I am trying to connect to an Exchange server via a wsman connection using PowerShell. The client server in question is in a Workgroup, while the Exchange server is in its own domain. I use the following command to try to connect to the…
1 2
3
36 37