Change the Number of Tile Rows on the Start screen in Windows 8 (PowerShell)

Introduction

This PowerShell Script shows how to change the number of rows for tiles on the Start screen in Windows 8.

Scenarios

By default, the number of rows for the tiles is fully dependent on the screen resolution or window size that fits on your Windows Screen. However, sometimes the user wants to display a specific number of rows of tiles on the Start Screen regardless of the screen size.

Script

Step1: Run the script in the Windows PowerShell Console, type the one command: Import-Module <Script Path> at the prompt.

For example, type Import-Module C:\Script\ ChangeNumberOfAppsTileRows.psm1
This is shown in the following figure:
 

Step 2: Type the command Get-Help Set-OSCTileRow  -Full to display the entire help file for this function, such as the syntax, parameters, or examples.

Here are some code snippets for your references.  

PowerShell
Edit|Remove
Try
{
    $LayoutMaximumRowCountReg = (Get-ItemProperty -Path $KeyPath).Layout_MaximumRowCount


    If ($LayoutMaximumRowCountReg -eq $null)
    {
        New-ItemProperty -Path $KeyPath -Name "Layout_MaximumRowCount" -Value $RowNumber -PropertyType DWord | Out-Null
        Write-Host "Setting the number of tile row successfully." -ForegroundColor Green
        #invoke choice function
        Get-Choice
   }
   Else
   {
        Set-ItemProperty -Path $KeyPath -Name "Layout_MaximumRowCount" -Value $RowNumber | Out-Null
        Write-Host "Setting the number of tile rows successfully." -ForegroundColor Green
        #invoke choice function
        Get-Choice
   }
}
Catch
{
    Write-Host "Failed to set the number of tile rows." -ForegroundColor Red
}

Example

Example 1:Type Set-OSCTileRow -RowNumber 3 command in the Windows PowerShell Console.

This command will change the number of tile rows on the Start screen.

The result is as follows:

Prerequisite

Windows PowerShell 3.0
Windows 8

Additional Resources

New-Object

Microsoft All-In-One Script Framework is an automation script sample library for IT Professionals. The key value that All-In-One Script Framework is trying to deliver is Scenario-Focused Script Samples driven by IT Pros' real-world pains and needs. The team is monitoring all TechNet forums, IT Pros' support calls to Microsoft, and script requests submitted to TechNet Script Repository. We collect frequently asked IT scenarios, and create script samples to automate the tasks and save some time for IT Pros. The team of All-In-One Script Framework sincerely hope that these customer-driven automation script samples can help our IT community in this script-centric move.