again, I have problems to shutdown my DS after Backup from the scheduled Backup-Task.
In the past I called my compiled WScript.exe-File from Reflects VBScript-Backup-Script to start-up or shutdown my DS. Under Reflect v6 it works fine; under v7 not, equal if the script is running under the User Accounts "Admin" or "SYSTEM".
Because the trouble, I changed some details to reduce PLink-parameters and then tested with PowerShell.
First I created with PuTTYgen Key-files created, sudoers permissions seted,... and a working ssh-session in PuTTY defined; so, if I start the PuTTY-session "ShdSessionDS" with User "ShdUser", so I can perform the command "sudo /sbin/shutdown -P +3 DS-Shutdown after Backup.".
After this I have created a Reflect-Scheduled-Backup-Job for testing (standard under Windows 7) and let generating a PowerShell-Script (see: attachment).
Then I added to this script the, outside of Reflect working, lines in "function DSShutdown()". But no success! Neither under the accounts of "Admin" nor "SYSTEM".
Then I copied this script into the PowerShell-ISE and comment out the Backup-line: "$iExitCode = Backup;" for testing (without a Backup) – no success, too. But the "function DSShutdown()" alone is working!
So I comment out the line "Elevate;" and the shutdown of my DS was performed!
At this point, I have actually no ideas to solve this problem.
But it would be very helpful, because I do inside my originally script a lot of things more; like starting the DS and shutdown the DS in some circumstances only, writing a own log file and so on.
One possible important remark: If I start the script (from attachment) manually from "Scheduled Backups" I see under "Last Results" for a few seconds then message: "0x41325 Error" (User Accout = Admin).
Thanks for any help!
Best regards, Joachim.
Environment: Reflect v7.1.3317, Windows 7, x64, Ultimate.