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.

Using alternate credentials for remoting

Using alternate credentials for remoting - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Using alternate credentials for remoting

- [Instructor] So one of the big things I get asked whenever I'm doing PowerShell and whenever we're talking about remoting is how do we kick off commands on another box, under a different set of credentials? So maybe we're logging into our workstation with our credentials, but when we need to kick off commands on our SQL servers, for example, we need to kick off those commands using either the SQL account or our administrative account, or some other account other than our normal account which we would normally use to access our box. And we can definitely do that. We have all those options when we're using PowerShell remoting. So we can use different credentials to specify what commands we're going to be using, and how we're going to connect to that remote machine. We can do that by simply passing in the username and password into a credential, and passing that into our PowerShell commands to create that session on the other side. So I'm going to do a quick example here, where I'm…

Contents