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
0
votes
1 answer

Chef/Ruby: Bad HTTP response returned from server (401). (WinRM::WinRMHTTPTransportError)Ruby:

Note: I'm using Active Directory authentication - there's no way around this. I'm trying to use the following script: require 'winrm' IP=ARGV[0] USER=ARGV[1] endpoint = "http://#{IP}:5985/wsman" winrm = WinRM::WinRMWebService.new endpoint,…
MrDuk
  • 12,340
  • 13
  • 55
  • 113
0
votes
1 answer

unbable to connect with winrs when using elastic ip

I am trying to connect to my amazon EC2 server using winrs. I set an Amazon elastic ip to the server. I am able to connect using the regular ip (ipconfig) but not using the elastic ip. I also see the listener does not state the elastic ip in the…
Erik Sapir
  • 20,791
  • 27
  • 73
  • 130
0
votes
0 answers

Using Nginx to front "Windows Remote Management" web services

I want NGINX to front requests that will backend proxy WinRM / WSMAN requests. Nginx should listen on port 80 and backend proxy to port 5985. nginx config: server { listen 80; server_name wsman.example.com; index …
0
votes
1 answer

knife winrm to windows machine fails with Connection Refused

I am trying to use knife to bootstrap a windows machine. When running the command 'knife bootstrap windows winrm' i receive the following error: ERROR: Network Error: Connection refused - connect(2) (http://:5985) What might be the problem?
Erik Sapir
  • 20,791
  • 27
  • 73
  • 130
0
votes
1 answer

connecting from powershell 2.0 to local exchange 2007

I'm trying to connect from my PowerShell to Exchange 2007 (both are on the same computer). What am I missing? My code: Set-ExecutionPolicy RemoteSigned $cred = Get-Credential $Session = New-PSSession -ConfigurationName…
woolford
  • 207
  • 1
  • 6
  • 12
0
votes
1 answer

WQL query Win32_NtLogEvent on WinRM using group by

I need a query that returns the SourceName, Logfile, EventIdentifier, Type, NumberOfEvents from Win32_NTLogEvent where NumberOfEvents is the number of events that share common SourceName, LogFile and EventIdentifier (I am not sure about Type). I…
James Bond
  • 13
  • 1
  • 1
0
votes
1 answer

C# check if two computers are in a trusted domain (or: decide which authentication mechanism for winrm connection)

I want to connect via winrm to other computers. I got only the FQDN of the destination computer which i want to connect. I have no information of the destination whether it is in a trusted Domain. So the basic question is how do i now which…
d.g
  • 281
  • 1
  • 3
  • 11
0
votes
1 answer

Unable to open Remote Exchange (2010 and 2013) PSSession from a different domain (WinRM) error. Please advise?

I am trying to open a remote exchange PS session and its failing and giving a WinRM error. Please note that i am able to open normal PS session, but not with exchange configuration. So is it possible to manage an exchange server from any machine…
Dreamer
  • 3,174
  • 2
  • 29
  • 43
0
votes
1 answer

Security of running PowerShell command remotely?

I'm new to PowerShell. I'm looking to run PowerShell command on a remote PC running Windows 7. On the remote PC, I ran the following PowerShell commands: Enable-PSRemoting -Force Set-Item WSMAN:\localhost\client\trustedhosts…
Umber Ferrule
  • 3,306
  • 6
  • 32
  • 38
0
votes
1 answer

Using PHP Exec() command to run WINRS / WINRM cmd

Platform Details: IIS7, PHP5, Windows Server 2008 Server Name: server1 I'm attempting to use php's exec() function to execute a .bat file which has the following command: winrs -r:server2 "C:\custom_functions.bat" However, when I execute that…
mraliks
  • 3,897
  • 3
  • 13
  • 9
0
votes
2 answers

Changing linux network connection type

I've tried Set-WSManQuickConfig command in Powershell, but it could not configure the firewall: Set-WSManQuickConfig : WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the…
Lgn
  • 7,751
  • 5
  • 18
  • 26
-1
votes
1 answer

Why do I get exceptions when trying to use .Net PowerShell Runspace to connect to my local Windows 10 machine?

I'm trying to use PowerShell through .Net to connect to and and run some scripts on my local machine. I'm using Visual Studio 2019. I keep getting exceptions when I attempt to open my Runspace. Consider the following code snippet: private…
JohnB
  • 2,895
  • 4
  • 34
  • 55
-1
votes
2 answers

How to setup winrm AllowUnencrypted="true" and auth @{Basic="true"} in terraform

I was trying to enable winRm from terraform. But winRM additional settings like winrm set winrm/config/service @{AllowUnencrypted="true"} winrm set winrm/config/service/auth @{Basic="true"} are not able to add properly in tf file.
-1
votes
1 answer

Terraform - Azure Windows VM winrm connection issue

I want to create windows azure VM, copy some file and run some simple command on that VM using terraform script. Problem is : I am able to create VM but not able to connect via winrm. provider "azurerm" { subscription_id =…
-1
votes
1 answer

winrm or requests is not installed: No module named winrm

I have a small simple setup consisting of Jenkins & Ansible 2.7.8 running on Ubuntu 18.04.2 LTS (192.168.0.202): config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/jon/.ansible/plugins/modules',…
Jon
  • 1
  • 1
  • 1
1 2 3
30
31