From the course: PowerShell for SQL Server Administration

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Invoking a remote command

Invoking a remote command - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Invoking a remote command

- {Instructor] So one of the things I get asked a decent amount is how do we have multiple people all running PowerShell at the same time if we only have one PowerShell session on the remote box, and the answer is that's simple. You just create additional sessions on the remote machine. So you don't have to have just that one session for a server. So everything we've talked about so far has been based on the assumption that we enter an existing session, and we only have one user at a time trying do things. So on the flip side of that if we have multiple people that all need their own session on that server, with their own set of credentials, need to be able to allow multiple people to work at the same time. We can create multiple sessions on a remote machine. So up until now, we used Enter-PSSession to simply enter the existing session but, if that's already in use, we need to create a new session. So we can do that through the New-PSSession command line. What that's going to do is…

Contents