steviecoaster / PSSysadminToolkit

A collection of Powershell scripts to make life as a sysadmin just a tiny bit more bearable
MIT License
209 stars 31 forks source link

Add Invoke-Elevation.ps1 #3

Open steviecoaster opened 6 years ago

steviecoaster commented 6 years ago

-scriptblock {} - checks remote execution of powershell status on a server (execution policy, and remote execution settings) (prob a cmd regedit temp fix), allows remote execution, then reestablishes the original status to the server.

Idea credit: Reddit user /u/ElBoracho

steviecoaster commented 6 years ago

Changing the name of this to Set-RemoteExecutionPolicy. Elevation doesn't reflect what the function will actually do.

steviecoaster commented 6 years ago

Added here: bec3a95

This is a very beta implementation, no testing has been done yet.