PowerShell RunAs DifferentUser


hi ,

i make script copy jar file domain users . , deploy group policy , saw script doesn't work because  domain users aren't administrator on local computer run script manualy , gived domain admin account , script work . thing must make " run "  if there idea issue please tell me .

script :

function bitk  {return [intptr]::size -eq 8  }  if (bitk -like "true")  {     copy-item \\x.x.x.x\dogan\xx.jar "c:\program files (x86)\x\x"  }  else  {  copy-item \\x.x.x.x\dogan\xx.jar "c:\program files\x\x"  }  

thanks ,

regards.

: )) found way issue .. :)) group policy ..

"user configuration > preferences > windows settings > files  "

i added new object , selecet "replace " show souce , destination , it's finish : )))

thanks ..



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2