Running commands through cmd/powershell on another network computer with user already logged

1

I have a small network with a around 35 PC's connected, mixed win10/7.

I am out of the country and in need to take care of things, so I'm logged in the server with my admin account. This account has access to all of the other PC's on the network, but some users are not logged out and I can't connect through RDP since we have this 1 user logged in limit.

How can I run a shell on each of these user's station to execute what I need to?

I've tried PsExec (similar question topic) but it is returning "Access denied" but I have access I can log in via RDP as well if wasn't for this connection limit. I do not have physical access to the machines until 25/10!!

HorgeHossas

Posted 2016-09-02T19:55:56.207

Reputation: 11

What server are you on? If it's Win Server 2008, you might be able to increase the number of connections for RDP since you're on the server. https://technet.microsoft.com/en-us/library/cc753380(v=ws.11).aspx

– ScotT – 2016-09-02T20:21:13.397

I am on Win 2008. But this affects the other network stations? I thought it was only for the server. I'll try it. – HorgeHossas – 2016-09-02T20:54:49.897

Did not work. Same thing! It says that user is connected. If I click "YES" the user which it is not there, will not answer the dialog box, so I can't connect right? Or if unanswered, I'll login? – HorgeHossas – 2016-09-02T20:59:31.020

Answers

1

PowerShell v3.0+ offers the Enter-PSSession cmdlet:

NAME
    Enter-PSSession

SYNOPSIS
    Starts an interactive session with a remote computer.


SYNTAX
    Enter-PSSession [-ComputerName] <String> [-ApplicationName <String>] [-Authentication {Default | Basic | Negotiate
    | NegotiateWithImplicitCredential | Credssp | Digest | Kerberos}] [-CertificateThumbprint <String>]
    [-ConfigurationName <String>] [-Credential <PSCredential>] [-EnableNetworkAccess] [-Port <Int32>] [-SessionOption
    <PSSessionOption>] [-UseSSL] [<CommonParameters>]

So at it's most basic: Enter-PSSession RemoteComputerName, it will open an interactive PS prompt on the remote computer named "RemoteComputerName".

Ƭᴇcʜιᴇ007

Posted 2016-09-02T19:55:56.207

Reputation: 103 763