# encoding: ascii
# api: powershell
# title: Set-IseZoom
# description: Sets the ISE Zoom level to a range between 20 and 400.
# version: 0.1
# type: function
# author: mwjcomputing
# license: CC0
# function: Set-IseZoom
# x-poshcode-id: 5863
# x-archived: 2015-05-22T03:53:25
# x-published: 2015-05-20T13:49:00
#
#
function Set-IseZoom {
  param(
    [Parameter(Mandatory=$true)]
    [ValidateRange(20,400)]
    [int]$ZoomAmount
  )
  
  Write-Verbose 'Starting Set-IseZoom'

  Write-Verbose "Setting zoom percentage to $ZoomAmount"
  $psISE.Options.Zoom=$ZoomAmount

  if ($psISE.Options.Zoom -ne $ZoomAmount) {
    Write-Warning -Message "Unable to set ISE Zoom level to $ZoomAmount"
  }

  Write-Verbose 'Stopping IseZoom'

  
    <#    
    .SYNOPSIS
        This function sets the zoom level in the PowerShell ISE.
    .DESCRIPTION
        This function uses the ISE object model to set the zoom level to the specified value.
    .EXAMPLE
        Set-IseZoom -ZoomAmount 150
    .NOTES
        Written by Matt Johnson (@mwjcomputing)
    .LINK
        http://www.mwjcomputing.com/
    .LINK
        https://technet.microsoft.com/en-us/library/dd819500.aspx
    #>

}
