#This script file is intended to capture the video resolution of the monitor

#This script was created by Rob Zylowski Citrix CCS
#
#Although every effort has been made to ensure that these sample scripts work properly, 
#Citrix disclaims any responsibility for any and all liability or responsibility for any 
#damages that may result from using these scripts. 
#The sample scripts are provided to you as is, with no warranty or guarantees.
#
function Get-ScriptDirectory
{
  $Invocation = (Get-Variable MyInvocation -Scope 1).Value
  Split-Path $Invocation.MyCommand.Path
}

$ScriptPath = Get-ScriptDirectory
Add-Type -AssemblyName System.Windows.Forms
$arrResolution = [System.Windows.Forms.Screen]::AllScreens
foreach ($resolution in $arrResolution)
{
	$Hor = $resolution.Bounds.Width
	$Vert = $resolution.Bounds.Height
}
"$Hor::$Vert" | Out-File -FilePath "$ScriptPath\..\config\vidres.txt" -Encoding ASCII