4

I'm using Parallels on my Mac to run the Windows 8.1 operating system. Parallels has a quirk that resets the screen resolution to the highest level every time it is restarted. Thus, I'd like to write a short Powershell script that will automatically sets my screen resolution to the one I prefer. The problem is, using either the Set-ScreenResolution or the Set-DisplayResolution gives me the following error:

Set-DisplayResolution : The term 'Set-DisplayResolution' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Set-DisplayResolution + ~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Set-DisplayResolution:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Any idea why this is happening?

I'm using Windows 8.1 64 bit. The version of my Powershell is 4.0. I'm using Parallels 9 as my virtual machine on the Yosemite operating system (mac).

1 Answer 1

7

Get-DisplayResolution and Set-DisplayResolution are only available on Server Core.

Web search points to this article showing how to call the appropriate user32 functions from PowerShell. It can hopefully point you in the right direction.

Sign up to request clarification or add additional context in comments.

2 Comments

and finally available in the powershell gallery gallery.technet.microsoft.com/ScriptCenter/…
@Bernhard, the link is dead, but the PowerShell Gallery now offers a community-contributed module with such commands, DisplaySettings (repo).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.