This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
We do not write scripts on resquest. You are expected to write your own scripts. And if you have problems with these scripts you can ask specific question about and we will try to answer.
Also find scripts here: PowerShell Gallery or here: TechNet Gallery - resources for IT professionals.
Learn PowerShell: Microsoft Virtual Academy - Getting Started with Microsoft PowerShell.
Script requests: Microsoft Technet Script Center - Requests.
Best regards,
(79,108,97,102|%{[char]$_})-join''
Invoke-Command -ComputerName PC1 {gpupdate}
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj134201(v=ws.11)