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
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
  • 23,209
  • 28
  • 81
  • 141
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
  • 297
  • 1
  • 7
  • 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
  • 321
  • 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,371
  • 2
  • 34
  • 50
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,358
  • 6
  • 35
  • 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
  • 4,047
  • 3
  • 15
  • 10
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
  • 9,581
  • 5
  • 20
  • 26
-1
votes
1 answer

getting error when using ansible Kerberos

I create 2 servers, windows and Linux. Linux is for ansible runner machine, windows as host machine. Through the Linux ansible machine, login to host windows machine and install tools. In Linux ansible machine installed all tools, windows host…
subbareddy
  • 11
  • 1
-1
votes
1 answer

Winrm basic: the specified credentials were rejected by the server error

Trying to connect to a windows host from a Linux Zorin control Host by using Ansible. Installed winrm in the windows machine and set all the required authentication methods to True. Configuration of winrm in the Window Host PS C:\WINDOWS\system32>…
SKumar
  • 71
  • 1
  • 4
-1
votes
1 answer

Python winrm node definition

Actually I'm using rundeck WinRM overthere plugin to get Windows connection and command excutions, using this node definition template
cviper40
  • 1
  • 2
-1
votes
1 answer

Python to restart WinRM

I am trying to restart WinRM with python. I tried different combination of quotes, single, double or no quotes and nothing works, getting "returned non-zero exit status 1" (pyenv) C:>python Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020,…
irom
  • 3,316
  • 14
  • 54
  • 86
-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
  • 3,921
  • 8
  • 49
  • 99
-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
  • 13
  • 1
  • 3
1 2 3
36
37