Thanks for the reply, Yes Jenkins has full administrative rights on the system. When I remote into the machine using the Jenkins credentials, I have no problem accessing any of the desired files. I am leaning more toward the possibility of it being a compatibility issue. It seems there might be a 64-bit and 32-bit powershell version on windows from what i have been reading... does anyone have any more insight to this?
On Monday, September 12, 2016 at 4:41:11 PM UTC-6, aaron.t...@total.care wrote: > > As the title states, when i run this powershell script locally it runs > just fine, but when i try to run it through as a Jenkins job it fails and > says that the path can not be found because it does not exist, clearly the > path exists as it can be ran locally. > The code is as follows: > >> $FilePath = C:\Windows\System32\inetsrv\config\applicationHost.config >> >> $Line2Edit = '<section name="httpLogging" overrideModeDefault="Deny" />' >> >> $AppendAllow = '<section name="httpLogging" overrideModeDefault="Allow" >>> />' >> >> >> >> (Get-Content $FilePath) -replace $Line2Edit , "$AppendAllow" | >> >> Set-Content $FilePath >> >> When I log in on the local machine as Jenkins i am able to successfully > run the command in powershell also. > > Any help would be greatly appreciated! > Thanks. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/37df7068-b507-45be-8b13-ea6f1bb352f8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.