Hello, I am working on a powershell script that looks for a certain folder and if it isn't there it installs a program.
When I run it on a local machine it works fine. When I put it on the server and tie it to a group policy that runs at login or startup it doesn't work.
I was wondering if it was something in the script or whether it was something wrong with group policy. Please have a look at the script and tell me if you see anything that would prevent it from running properly when it isn't run locally.
$Path = "$env:COMPUTERNAME C:\Program Files\SAAZOD" $path2 = "$env:Computername C:\Program Files (x86)\SAAZOD" If((Test-Path -path $Path) -or (Test-Path -Path $path2) -eq $true) {exit} Else {invoke-command { & \actsmartsbs\Applications\AmericanComputer_6201_DPMA_SILENT_526.exe}}
Thanks