@Tom-Elliott Tried running the script w/ psexec w/ all files in appropriate locations and it ran w/o an issue doing everything it was supposed to. Unfortunately FOG still doesn’t seem to want to copy those 2 files. GroupPolicy is a hidden folder, could that be causing an issue?
Posts made by VictorKrazan6267
-
RE: FOG/Powershell not copying to Win32/GroupPolicy/Adm
-
RE: FOG/Powershell not copying to Win32/GroupPolicy/Adm
@tom-elliott Yep, went to FOG/tmp to make sure that they were being extracted to ChromePowerShell. If i change -Destination to C:\Users<User>\Desktop the files will be copied to the desktop.
-
RE: FOG/Powershell not copying to Win32/GroupPolicy/Adm
@tom-elliott Whoops typo. Yes both are failing.
-
RE: FOG/Powershell not copying to Win32/GroupPolicy/Adm
@george1421 SYSTEM has full permissions. The files are going onto a laptop that will be going out to the field and techs don’t come into the offices often. I did try using $scriptPath, but It still wasn’t copying the files. Yes its in a powershell snapin pack.
-
FOG/Powershell not copying to Win32/GroupPolicy/Adm
Below is my script. Everything works except the Copy-Item line. I’ve tested copying the files to other locations and it works then. When it comes to copying the file to that location it just doesn’t want to do it. Other things I’ve tried, -path, move-item, took out all environmental variables.
#Powershell %~dp0 $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition #installs Chrome Start-Process $scriptPath\ChromeInstall.msi /q -wait -WindowStyle hidden #imports registry! Reg import $scriptPath\chrome_settings.reg #copies over .adm files copy-Item -LiteralPath 'C:\Program Files (x86)\FOG\tmp\ChromePowerShell\chrome.adm' -Destination 'C:\Windows\System32\GroupPolicy\Adm' -Force -Verbose -Recurse copy_item -LiteralPath 'C:\Program Files (x86)\FOG\tmp\ChromePowerShell\GoogleUpdate.adm' -Destination 'C:\Windows\System32\GroupPolicy\Adm' -Force -Verbose -Recurse #force GroupPolicy update Start-Process gpupdate /force -WindowStyle hidden #Remove-Item -path 'C:\Program Files (x86)\FOG\tmp\ChromePowerShell'
** mod edit to distinguish code **