View Single Post
Old 01-24-2008   #3 (permalink)
Marco Shaw [MVP]


 
 

Re: start-psjob - user credentials

Robin Moffatt wrote:
Quote:

> Got around it by using
> $server = New-Object 'Microsoft.sqlserver.management.smo.server'
> $server_path
> $server.ConnectionContext.LoginSecure = $false
> $server.ConnectionContext.login = $db_user
> $server.ConnectionContext.password = $db_pw
>
> I'd still like to understand how authentication under psjobs works
> though, if anyone can explain it.
I think the important concept here is that you've gone and created a new
object. The moment you create a object, you need to redefine your
credentials again.

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec