Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Windows 8.1 AutoRotate Powershell Script

$
0
0

Hello,

I'm trying to write a script that will turn on and off the autorotate feature on the Windows 8.1 Tablet.  I have the commands below that seem to work, but since I'm modifying registry keys, the script must always be run as an administrator.  Is there another way to go about this that doesn't require admin rights?  Thanks in advance for you assistance!

$regKey = "HKLM:\software\microsoft\windows\CurrentVersion\AutoRotation"
set-itemproperty -path $regkey -name enable -value (0or1)




Viewing all articles
Browse latest Browse all 15028

Trending Articles