Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Orientation settings in Windows 10 allow you to change the display orientation of your screen. This can be particularly useful for rotating your screen for different tasks, such as reading documents in portrait mode or using multiple monitors in a vertical alignment. In this article, we'll explore how to change the screen orientation via the Settings app and using Command Prompt (CMD) and PowerShell.
Win + I
to open the Settings app.System
> Display
.Unfortunately, Windows does not provide a built-in command-line tool to change the screen orientation directly via CMD. However, you can use third-party tools like DisplaySwitch.exe
to toggle between different display modes.
PowerShell offers more flexibility and can be used to change the display orientation by modifying the registry settings. Here is a step-by-step guide:
Open PowerShell: Press Win + X
and select Windows PowerShell (Admin)
.
Run the Script: Use the following PowerShell script to change the display orientation. This example sets the orientation to Landscape
:
$key = "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration"
$orientation = 1 # 1 = Landscape, 2 = Portrait, 3 = Landscape (flipped), 4 = Portrait (flipped)
Get-ChildItem -Path $key | ForEach-Object {
$subkey = $_.PSChildName
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cx" -Value 1920
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cy" -Value 1080
Set-ItemProperty -Path "$key\$subkey\00" -Name "Rotation" -Value $orientation
}
# Restart the graphics driver to apply changes
Stop-Process -Name "explorer"
Start-Process -Name "explorer"
Replace $orientation
with the desired value for different orientations.
$key = "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration"
$orientation = 2 # Portrait
Get-ChildItem -Path $key | ForEach-Object {
$subkey = $_.PSChildName
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cx" -Value 1080
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cy" -Value 1920
Set-ItemProperty -Path "$key\$subkey\00" -Name "Rotation" -Value $orientation
}
Stop-Process -Name "explorer"
Start-Process -Name "explorer"
$key = "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration"
$orientation = 3 # Landscape (flipped)
Get-ChildItem -Path $key | ForEach-Object {
$subkey = $_.PSChildName
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cx" -Value 1920
Set-ItemProperty -Path "$key\$subkey\00" -Name "PrimSurfSize.cy" -Value 1080
Set-ItemProperty -Path "$key\$subkey\00" -Name "Rotation" -Value $orientation
}
Stop-Process -Name "explorer"
Start-Process -Name "explorer"