First of all thank you for this creat script!
I have created an user GPO which executes the Profile Cleanup Script. Depending on the parameters that I provide, the script is not automatically executed when you log in. Manually, however, it works without errors.
In this case the script is executed, but the log files is empty and 1KB. As each line to delete must be confirmed:
\share\NETLOGON\fslogix_ProfileCleanup\Remove-ProfileDataSigned.ps1 -Targets "\share\NETLOGON\fslogix_ProfileCleanup\targets.xml" -LogPath D:\FSLogix -Verbose
In this case the script is not executed (see paramenter confirm:$false):
\share\NETLOGON\fslogix_ProfileCleanup\Remove-ProfileDataSigned.ps1 -Targets "\share\NETLOGON\fslogix_ProfileCleanup\targets.xml" -LogPath D:\FSLogix -Confirm:$False -Verbose
The same command with parameter confirm:$false works fine, when exectued manually. Then the logfile is shows all deleted files.
We are using Windows Server 2019 Active Directory and Terminal Servers.
Have you got an idea why the script can't be executed over GPO with paramenter confirm:$false?
Thank you and Regards,
Roberto