Powershell script to change screen Orientation
I wrote a script to change primary screen orientation to portrait. my screen is 1920X1200 It runs and no error reported. But the screen does not rotated as i expected. The code was modified from Set-ScreenResolution (Andy Schneider). Does anybody can help me take a look? Some reference site: Set-ScreenResolution : http://gallery.technet.microsoft.com/ScriptCenter/2a631d72-206d-4036-a3f2-2e150f297515/ C code for change oridentation (MSDN) Changing Screen Orientation Programmatically : http://msdn.microsoft.com/en-us/library/ms812499.aspx My Code: Function Set-ScreenOrientation { $pinvokeCode =