New answers tagged powershell
1
For those like me who got here from Google: pscp now has a -hostkey option which can be used like this:
pscp -P 22 -hostkey "ssh-ed25519 255 aa:bb:cc..." ...
This eliminates the need for an interactive PuTTY session to store the host key. Here's what the documentation has to say:
-hostkey key
Specify an acceptable host public key. This option may ...
1
xp_cmdshell is not PowerShell.
If you run: xp_cmdshell 'whoami.exe'; you will discover that you are nt service\mssqlserver and not Administrator.
xp_cmdshell is impersonating that user (which is a service in our case).
So the solution of the problem should be to impersonate an Administrator.
But you cannot do that.
I have tried using Proxy Credentials:
EXEC ...
Top 50 recent answers are included
Related Tags
powershell × 338sql-server × 231
sql-server-2012 × 44
sql-server-agent × 33
sql-server-2016 × 29
sql-server-2008-r2 × 18
smo × 18
sql-server-2008 × 15
scripting × 14
sql-server-2014 × 13
dbatools × 13
t-sql × 12
availability-groups × 12
permissions × 10
windows-server × 10
restore × 9
ssis × 8
jobs × 8
ssas × 8
sqlcmd × 8
oracle × 7
backup × 7
security × 7
replication × 6
installation × 6