VMware Horizon Community
IKirill
Enthusiast
Enthusiast
Jump to solution

Horizon 7.8 - Post-synchronization script. Have error.

Hi!

I have Horizon 7.8.
I am try to use Post-synchronization script with linked clones vms.
On golden image (master image) i create POWERSHELL script.
I my case the full path is - C:\scripts\start.ps1
OK!

Now i enter the path in Post-synchronization script name:C:\scripts\start.ps1
next run recompose and have error:
View Composer agent initialization state error (19): Failed to execute postsync script (waited 0 seconds)

I am try to enter path like this
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe C:\scripts\start.ps1
same error!


I check vmware-viewcomposer-ga-new.log
No errors and no lines like "Failed to run PostSyncScript".
No word "PostSyncScript"

questions:
does powershell scipts support in Post-synchronization ?
how fix this error ?

Reply
0 Kudos
1 Solution

Accepted Solutions
IKirill
Enthusiast
Enthusiast
Jump to solution

SurajRoy

I couldn't get the Powershell script to work, but the BAT file works fine. It is enough just to register the Bat file with one line (for example, I have such a line C:\security\start-scr\start.bat). The issue is resolved.

View solution in original post

2 Replies
SurajRoy
Enthusiast
Enthusiast
Jump to solution

Does the PowerShell script work if we manually execute on the master image or on VDI machine?

Did you tried Windows Logon Task / Task scheduler?

Refer to https://www.tenforums.com/tutorials/173596-how-create-task-run-app-script-logon-windows-10-a.html

Reply
0 Kudos
IKirill
Enthusiast
Enthusiast
Jump to solution

SurajRoy

I couldn't get the Powershell script to work, but the BAT file works fine. It is enough just to register the Bat file with one line (for example, I have such a line C:\security\start-scr\start.bat). The issue is resolved.