From the course: PowerShell for SQL Server Administration

Unlock the full course today

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

Starting a remote session

Starting a remote session - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Starting a remote session

- [Instructor] Once you've got remoting enabled on all your older boxes, you can go ahead and start looking at the remoting options. The first thing we're going to do as we fire up a remote session is we need to start that remote session on the remote machine and get into a session. So, to enter a session, we use the Enter-PSSession cmdlet that drops it into the existing remote session on that remote machine. So, we fire up PowerShell, and we type in our Enter-PSSession cmdlet, and we tell it what computer we want to actually go to. Now, this is going to drop us into whatever the existing session on that machine is. If there isn't one, it'll go ahead and create a remote session for us. Once we're on that machine, we can then kick off a set of commands on that box. In this case, let's just look at a quick dir of the c:Windows/NTDS folder. We're just going to filter that down based on the *.dit file extension. So we can see here, there's a single file in that folder. We can see when…

Contents