Hi guys, I am a PowerShell noob. I like to dip and dab in PowerShell, mainly automating simple tasks I’m to lazy to do in the gui.
I recently created a script which will remove and then automatically re-add a workstation to the domain. I have documented it on my blog https://sysadminguides.org/2017/04/15/remove-and-automatically-re-add-computer-from-domain-using-powershell-scripts/
I am wondering – is there an easy way to get my scripts/batch file onto the C drive of a workstation, without remoting onto the device itself and manually copying it.
Also is there a way to remotely execute the scripts through PowerShell?
In theory it was be really cool if I could remotely move them onto the C Drive, execute them and then remove them, all through PowerShell.
Any help would be greatly appreciated, what you guys can do here blows my mind. I am really glad I found this subreddit.
submitted by /u/pluto098
[link] [comments]
The post Query – get Powershell Scripts onto remote computer C:drive, without remoting on, using the gui and then execute. appeared first on How to Code .NET.