Set-DisplayResolution

Set-DisplayResolution

Changes the display resolution for a Server Core server.

Syntax

Parameter Set: __AllParameterSets
Set-DisplayResolution [-Width] <Object> [-Height] <Object> [-Force] [ <CommonParameters>]

Detailed Description

The Set-DisplayResolution cmdlet changes the display resolution for Windows Server® 2012 in Server Core mode. Specify both the width and the height in pixels. Unless you use the Force parameter, the cmdlet prompts you before it changes the settings. You can use the Get-DisplayResolution cmdlet to view the current resolution.

For more information about Server Core mode, see Configure and Manage Server Core Installations (https://technet.microsoft.com/en-us/library/jj574091).

Parameters

-Force

Performs the action without a confirmation message.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Height<Object>

Specifies a height, in pixels, for the display.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Width<Object>

Specifies a width, in pixels, for the display.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Set resolution

This command sets the display resolution to a width of 1920 pixels and a height of 1200 pixels. The system prompts you for confirmation.

PS C:\> Set-DisplayResolution -Width 1920 -Height 1200

Example 2: Set resolution without confirmation

This command sets the display resolution to a width of 1024 pixels and a height of 768 pixels. The command includes the Force parameter. It attempts to make the change without prompting you.

PS C:\> Set-DisplayResolution -Width 1024 -Height 768 -Force

Get-DisplayResolution