Questions tagged [winrs]

WinRS is the Windows Remote Shell, a system administration tool that allows remote shell access.

Useful links:

  1. WinRS on technet.
  2. WinRS on SS64 help pages.
22 questions
3
votes
1 answer

Can WinRS access UNC paths?

I'm using WinRS to run an executable on a remote machine. That executable, in turn, needs to access a UNC network share. I'm on a Windows network with AD, and running everything as a domain admin account (not a local account) that is a machine admin…
Arin
  • 1,373
  • 2
  • 10
  • 23
3
votes
2 answers

calling winrs multiple times from TeamCity

if I run 2 winrs commands in the same Team City Command Line like this: The build will hang. if I manually kill the winrs process on the build agent, the build will finish but will exit with code 1. if I run just one winrs command the build will…
CraftyFella
  • 7,520
  • 7
  • 47
  • 61
2
votes
1 answer

Katalon CLI Command Remote Execution Error

I am trying to run the CLI command generated by Katalon Remotely. But I am getting an error for it. Command - winrs -r: D:\Katalon_Studio_Windows_64-5.4.2\katalon -noSplash -runMode=console -projectPath="D:\Automation\QaAutomation.prj"…
2
votes
1 answer

Batch script stops executing after winrs command

I have a script that contains a call to winrs in order to remotely start the execution of a .exe on a user specified target machine. I want the following functionality: start script prompt user for name of target PC winrs into target PC executing…
2
votes
1 answer

PHP Function Timeout

I'm not an expert with PHP. I have a function which uses EXEC to run WINRS whcih then runs commands on remote servers. The problem is this function is placed into a loop which calls getservicestatus function dozens of times. Sometimes the WINRS…
Cormang
  • 21
  • 2
2
votes
1 answer

winrs reg query works but reg query hostname does not

I am trying to verify that the usbstor driver is set to disabled on a remote machine in my domain in a vbscript but I'm having issues. I've turned to troubleshooting from the command line. Using plain old reg query fails. reg query…
Tim
  • 2,701
  • 3
  • 26
  • 47
2
votes
1 answer

batch start winrs redirecting output

I have to execute a command on a cluster to kill a group of processes. start /wait winrs -r:NODENAME -u:USERNAME -p:PASSWORD taskkill /FI \"USERNAME eq USER" /f I can't redirect the output. I find on this site similar problems but the solution…
2
votes
2 answers

Why does PowerShell not work if I use WinRS?

I have a file "test.ps1" and its content is as below: $getRSDBName = { Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $rsdb = Get-SPRSDatabase return $rsdb } $rsdb = invoke-command -scriptblock…
1
vote
1 answer

How to execute commands using powershell after doing remote login using winrs

I am new to PowerShell scripting. So please pardon me if I am asking a silly question. I have a task to connect to the command prompt of a remote desktop and run a series of commands on the command line. I am using winrm to access the remote desktop…
RDX
  • 145
  • 3
  • 12
1
vote
1 answer

Running remote commands on Windows 10

Recently i was trying to research deeper into running remote commands from windows to windows. It can be easy with ssh, ftp - but I wanted it to run the commands without knowing the password either username, just local ip and computer name and maybe…
dheb
  • 11
  • 1
  • 3
1
vote
0 answers

Powershell remoting not working on same machine with hostname

Powershell Remoting failed with local server hostname, whereas works with remote server hostname. I am getting this error with local server hostname: The WInRM client sent a request to an http server and got a response saying the requested http…
1
vote
1 answer

Remote PowerShell script hangs when running `git push`

I've run Enter-PSSession successfully to connect to a remote server, and run several commands successfully too, like git add -u and git commit -m "xxx" etc. but when trying to push the code using git push command, the shell then blocked forever…
aaron
  • 1,951
  • 3
  • 27
  • 41
1
vote
0 answers

winrs using backtick in perl hangs

I ran the following winrs command using backtick (``) in perl script, $result = `winrs -r: d:\tmp\transfer_remove_file.bat` winrs windows is hangs after executing and it didn't return the output, after I close the window, I am able to…
Ganeshwari
  • 13
  • 3
0
votes
1 answer

Winrs works while pywinrm module returns "the specified credentials were rejected by the server" error

I have a setup where I can winrs to the remote machine successfully without issues. However when I use pywinrm, I get an error about credentials. Here is the authentication details of the remote windows the machine. How one would go debugging this…
0
votes
0 answers

Why does running winrs in the subshell change its behavior in respect to the user it uses?

test.bat @echo off for /f "delims=" %%i in ('winrs /r:REMOTE_MACHINE /u:DIFF_USER_ACCOUNT /p:PASS /noprofile "echo %PYTHONPATH%"') do set dest_dir=%%i echo %dest_dir% This script is meant to remote into the REMOTE_MACHINE and print out the contents…
ajoseps
  • 1,871
  • 1
  • 16
  • 29
1
2