question

anil40 avatar image
anil40 asked

PowerShell SQL Job output error ,PowerShell SQL job output error

Hello

I am running a PowerShell SQL job to synch logging between the nodes of High availability environment. The command is - C: \Windows\System32\WindowsPowerShell\v1 .0 \PowerShell.exe - Command "Copy-DbaLogin -Source XXXDC1SQL2 -Destination XXXDC2TSQL2". Th job completes successfully but output is " Executed as user: NGH-AD\XXXXXXX The step did not generate any output. Process Exit Code 0. The step succeeded."

On running the same in PowerShell "Copy-DbaLogin -Source XXXDC1SQL2 -Destination XXXDC2TSQL2" the output is available.

I have checked permission as SQL server service account is sysadmin on both SQL nodes and is in administrator group of the servers.

What I am missing?

SQL server 2019 with OS 2019

Regards

Anil

,

sql serverpowershell
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.