Selaa lähdekoodia

add vagrantconfig

Tobias Simetsreiter 3 vuotta sitten
vanhempi
sitoutus
8ae4e3638b

+ 3 - 3
Tray/tray_test.yaml

@@ -1,9 +1,9 @@
-Text: "AXVPN Tray"
-Title: "AXVPN Tray"
+Text: "Structured Tray"
+Title: "Structured Tray"
 Icon: ""
 HideConsole: true
 MenuItems:
-  - Text: "AXVPN Tray"
+  - Text: "Structured Tray"
     Enabled: false
   - Text: "ls"
     Command: "ls"

+ 7 - 0
vagrantConfig/.vs/VSWorkspaceState.json

@@ -0,0 +1,7 @@
+{
+  "ExpandedNodes": [
+    ""
+  ],
+  "SelectedNode": "\\App.xaml",
+  "PreviewInSolutionExplorer": false
+}

BIN
vagrantConfig/.vs/slnx.sqlite


BIN
vagrantConfig/.vs/vagrantConfig/v16/.suo


+ 27 - 0
vagrantConfig/gui/ad.xaml

@@ -0,0 +1,27 @@
+<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        x:Name="Window_GuiManagement" Title="AxisDev Provisioner" WindowStartupLocation = "CenterScreen" 
+        Width = "587.307" Height = "540.023" Visibility="Visible" WindowStyle="ToolWindow" ResizeMode="NoResize" Topmost="True">
+    <Grid>
+        <Label x:Name="lblCompany" Content="Play Folders:" HorizontalAlignment="Left" Margin="11,10,0,0" VerticalAlignment="Top"/>
+        <ComboBox x:Name="cbCompanys" VerticalAlignment="Top" Margin="11,36,10,0"/>
+        <Label x:Name="lbluser" Content="Plays:" HorizontalAlignment="Left" Margin="11,63,0,0" VerticalAlignment="Top"/>
+        <DataGrid x:Name="dgUsers" Margin="11,94,10,0" VerticalAlignment="Top" Height="299" SelectionMode="Single" AlternationCount="1"
+                  AutoGenerateColumns="false">
+            <DataGrid.Columns>
+                <DataGridCheckBoxColumn Binding="{Binding Path=IsChecked,UpdateSourceTrigger=PropertyChanged}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="False"
+                                        Header="Enabled"/>
+                <DataGridTextColumn Binding="{Binding Path=DisplayName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="Dir"/>
+                <DataGridTextColumn Binding="{Binding Path=UserPrincipalName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="Name"/>
+                <DataGridTextColumn Binding="{Binding Path=SamAccountName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="SamAccountName"/>
+            </DataGrid.Columns>
+        </DataGrid>
+        <CheckBox x:Name="chkbBackupFiles" Content="Backup Files" HorizontalAlignment="Left" Margin="11,398,0,0" VerticalAlignment="Top" IsChecked="False"/>
+        <Button x:Name="btnSend" Content="Send" Margin="491,469,10,0" VerticalAlignment="Top"/>
+        <TextBox HorizontalAlignment="Left" Margin="174,398,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="151" AutomationProperties.HelpText="Username"/>
+        <PasswordBox HorizontalAlignment="Left" Margin="395,398,0,0" VerticalAlignment="Top" Width="120" AutomationProperties.HelpText="xdfgdfg" AutomationProperties.IsRequiredForForm="True"/>
+    </Grid>
+</Window>

+ 25 - 0
vagrantConfig/gui/gui.ps1

@@ -0,0 +1,25 @@
+function Get-XAMLWindow{
+    param(
+        [String]$xamlfile
+    )
+    $xamltext = [System.IO.File]::ReadAllText($xamlfile)
+    [xml]$xaml = $xamltext
+    try
+    {
+        Add-Type -AssemblyName presentationframework
+    }
+    catch
+    {
+    }
+    $reader=(New-Object System.Xml.XmlNodeReader $xaml)
+    $Form=[Windows.Markup.XamlReader]::Load( $reader )
+    $Form
+}
+
+function Show-XAMLWindow {
+    param(
+        [String]$xamlfile
+    )
+    $Form = Get-XAMLWindow $xamlfile
+    $Form.ShowDialog() | Out-Null
+}

+ 34 - 0
vagrantConfig/gui/vagrant.ps1

@@ -0,0 +1,34 @@
+
+. "$PSScriptRoot/gui.ps1"
+$gui = "$PSScriptRoot/vagrant.xaml"
+
+$Form = Get-XAMLWindow $gui
+
+$progressBar = $Form.FindName("progressBar")
+
+function RunWithProgress($task){
+    $progressBar.Visibility = "Visible"
+    $job = Start-Job -ScriptBlock {
+        $task | Out-Host
+    }
+    Start-Job -ScriptBlock {
+        $null = Wait-Job $args[0]
+        "WOLOLO" | Out-Host
+        $null | Out-Host
+        $args[1].Visibility = "Hidden"
+    }  -ArgumentList $job, $progressBar
+}
+
+$btnUp = $Form.FindName("btnUp")
+$btnUp.Add_Click({RunWithProgress({vagrant up})})
+
+$btnProvision = $Form.FindName("btnProvision")
+$btnProvision.Add_Click({vagrant provision})
+
+$btnReload = $Form.FindName("btnReload")
+$btnReload.Add_Click({ vagrant reload })
+
+$btnReload = $Form.FindName("btnHalt")
+$btnReload.Add_Click({ vagrant halt })
+
+$Form.ShowDialog()

+ 24 - 0
vagrantConfig/gui/vagrant.xaml

@@ -0,0 +1,24 @@
+<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        x:Name="Window_GuiManagement" Title="AxisDev Provisioner" WindowStartupLocation = "CenterScreen" 
+        Visibility="Visible" WindowStyle="ToolWindow" ResizeMode="NoResize" Topmost="True">
+    <Grid Margin="15,15,15,15" Grid.IsSharedSizeScope="True">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="1*" />
+            <ColumnDefinition Width="1*" />
+            <ColumnDefinition Width="1*" />
+            <ColumnDefinition Width="1*" />
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="1*" />
+            <RowDefinition Height="1*" />
+            <RowDefinition Height="1*" />
+        </Grid.RowDefinitions>
+        <Label x:Name="lblCompany" Content="vagrant ui" HorizontalAlignment="Center" VerticalAlignment="Top" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"/>
+        <Button x:Name="btnUp" Content="up" Grid.Row="2" Grid.Column="0"/>
+        <Button x:Name="btnProvision" Content="provision" Grid.Row="2" Grid.Column="1"/>
+        <Button x:Name="btnReload" Content="reload" Grid.Row="2" Grid.Column="2"/>
+        <Button x:Name="btnHalt" Content="halt" Grid.Row="2" Grid.Column="3"/>
+        <ProgressBar x:Name="progressBar" IsIndeterminate="True" Grid.ColumnSpan="3" Grid.Row="1" Grid.Column="1" Height="20" Margin="5,10,5,10" Visibility="Hidden"/>
+    </Grid>
+</Window>

+ 5 - 0
vagrantConfig/plays/common/workstation copy.yml

@@ -0,0 +1,5 @@
+- hosts: default
+  roles:
+    - utils
+    - xubuntu
+    - DAISY

+ 5 - 0
vagrantConfig/plays/common/workstation.yml

@@ -0,0 +1,5 @@
+- hosts: default
+  roles:
+    - utils
+    - xubuntu
+    - DAISY

+ 74 - 0
vagrantConfig/test.ps1

@@ -0,0 +1,74 @@
+$modules = @(
+    "powershell-yaml"
+)
+$play_folders = @(
+    "plays/common"
+)
+
+foreach ($mod in $modules){
+    try {
+        Import-Module $mod |Out-Null
+    } catch {
+
+    }
+
+    if ((Get-Module $mod) -eq $null){
+        "Need to install $mod module..."
+        Install-Module -Scope CurrentUser -Force $mod
+        Import-Module $mod
+    }    
+}
+
+
+$tplfile = "provision_tpl.yml"
+$provisionfile = "provision.yml"
+
+if (Test-Path $provisionfile -PathType leaf)
+{
+    "Using $provisionfile"
+    $currentplays = ConvertFrom-Yaml ([System.IO.File]::ReadAllText($provisionfile))
+} else {
+    $currentplays = @()
+}
+
+$plays = @()
+
+foreach ($dir in $play_folders){
+    $plays += (ls "$dir" | 
+        foreach-object {$_.name} | sort |
+            ForEach-Object {
+                "$dir/$_" |out-host
+                $content = ConvertFrom-Yaml ([System.IO.File]::ReadAllText("$dir/$_"));
+                $content.name = "$dir/$_"
+                [PSCustomObject]@{
+                    enabled = [Boolean]($currentplays|foreach-object {$_.name}) -match "$dir/$_";
+                    name    = "$_";
+                    dir     = "$dir";
+                    content = $content;
+                }
+            } 
+        )
+}
+
+$enabledplays = $plays | Where-Object {$_.enabled}
+"Active Playbooks:"
+$enabledplays | Select-Object name,dir
+"Available Playbooks:"
+$plays | Select-Object name,dir
+
+# $label = (ConvertTo-Yaml ($commonplays|Select-Object nam))
+# $label
+$griddata = $plays 
+"Griddata"
+$griddata|out-host
+
+. ./gui/gui.ps1
+
+$result = $griddata | Out-GridView -PassThru
+
+
+$ymltext = ConvertTo-Yaml($commonplays)
+
+
+""
+# [System.IO.File]::WriteAllText($provisionfile, $ymltext)

+ 74 - 0
vagrantConfig/tray.ps1

@@ -0,0 +1,74 @@
+Param
+ (
+ [String]$Restart
+ )
+ 
+If ($Restart -ne "") 
+ {
+  sleep 10
+ }
+
+$Current_Folder = split-path $MyInvocation.MyCommand.Path
+ 
+# Add assemblies for WPF and Mahapps
+Add-Type -AssemblyName "System.Windows.Forms"
+Add-Type -AssemblyName "System.Drawing"
+[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')    | out-null
+[System.Reflection.Assembly]::LoadWithPartialName('presentationframework')   | out-null
+[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing')    | out-null
+[System.Reflection.Assembly]::LoadWithPartialName('WindowsFormsIntegration') | out-null
+
+ 
+# Choose an icon to display in the systray
+$icon = [System.Drawing.Icon]::ExtractAssociatedIcon("C:\Windows\System32\cmd.exe") 
+ 
+# Add the systray icon 
+$Main_Tool_Icon = New-Object System.Windows.Forms.NotifyIcon
+$Main_Tool_Icon.Text = "WPF Systray tool"
+$Main_Tool_Icon.Icon = $icon
+$Main_Tool_Icon.Visible = $true
+ 
+# # Make PowerShell Disappear - Thanks Chrissy
+# $windowcode = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);'
+# $asyncwindow = Add-Type -MemberDefinition $windowcode -name Win32ShowWindowAsync -namespace Win32Functions -PassThru
+# $null = $asyncwindow::ShowWindowAsync((Get-Process -PID $pid).MainWindowHandle, 0)
+
+
+# Add Restart the tool
+$Menu_Restart_Tool = New-Object System.Windows.Forms.MenuItem
+$Menu_Restart_Tool.Text = "Restart the tool (in 10secs)"
+# Action after clicking on the Restart context menu
+
+ 
+# Add menu exit
+$Menu_Exit = New-Object System.Windows.Forms.MenuItem
+$Menu_Exit.Text = "Exit"
+# Action after clicking on the Exit context menu
+$Menu_Exit.add_Click({
+    $Main_Tool_Icon.Visible = $false
+    $window.Close()
+    Stop-Process $pid
+})
+ 
+# Add all menus as context menus
+$contextmenu = New-Object System.Windows.Forms.ContextMenu
+$Main_Tool_Icon.ContextMenu = $contextmenu
+$scripts = ls *.ps1 | foreach-object {$_.Name}
+foreach ($script in $scripts) {
+    # Add menu users
+    $Menu_Script = New-Object System.Windows.Forms.MenuItem
+    $Menu_Script.Text = "provision $script"
+    $Main_Tool_Icon.contextMenu.MenuItems.AddRange($Menu_Script)
+}
+$Main_Tool_Icon.contextMenu.MenuItems.AddRange($Menu_Restart_Tool)
+$Main_Tool_Icon.contextMenu.MenuItems.AddRange($Menu_Exit)
+
+# Use a Garbage colection to reduce Memory RAM
+# https://dmitrysotnikov.wordpress.com/2012/02/24/freeing-up-memory-in-powershell-using-garbage-collector/
+# https://docs.microsoft.com/fr-fr/dotnet/api/system.gc.collect?view=netframework-4.7.2
+[System.GC]::Collect()
+ 
+# Create an application context for it to all run within - Thanks Chrissy
+# This helps with responsiveness, especially when clicking Exit - Thanks Chrissy
+$appContext = New-Object System.Windows.Forms.ApplicationContext
+[void][System.Windows.Forms.Application]::Run($appContext)

+ 32 - 0
vagrantConfig/vagrantconfig.xaml

@@ -0,0 +1,32 @@
+<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        x:Name="Window_GuiManagement" Title="AxisDev Provisioner" WindowStartupLocation = "CenterScreen" 
+        Width = "587.307" Height = "540.023" Visibility="Visible" WindowStyle="ToolWindow" ResizeMode="NoResize" Topmost="True">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="122*"/>
+            <ColumnDefinition Width="25*"/>
+        </Grid.ColumnDefinitions>
+        <Label x:Name="lblCompany" Content="Play Folders:" HorizontalAlignment="Left" Margin="11,10,0,0" Height="26" VerticalAlignment="Top"/>
+        <ComboBox x:Name="cbCompanys" Margin="10,36,10,0" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
+        <Label x:Name="lbluser" Content="Plays:" HorizontalAlignment="Left" Margin="11,63,0,0" VerticalAlignment="Top"/>
+        <DataGrid x:Name="dgUsers" Margin="11,94,10,0" VerticalAlignment="Top" Height="299" SelectionMode="Single" AlternationCount="1"
+                  AutoGenerateColumns="false" Grid.ColumnSpan="2">
+            <DataGrid.Columns>
+                <DataGridCheckBoxColumn Binding="{Binding Path=IsChecked,UpdateSourceTrigger=PropertyChanged}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="False"
+                                        Header="Check"/>
+                <DataGridTextColumn Binding="{Binding Path=DisplayName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="DisplayName"/>
+                <DataGridTextColumn Binding="{Binding Path=UserPrincipalName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="UserPrincipalName"/>
+                <DataGridTextColumn Binding="{Binding Path=SamAccountName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="SamAccountName"/>
+            </DataGrid.Columns>
+        </DataGrid>
+        <CheckBox x:Name="chkbBackupFiles" Content="Backup Files" HorizontalAlignment="Left" Margin="11,398,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <CheckBox x:Name="chkbmail" Content="Backup Mail" HorizontalAlignment="Left" Margin="11,418,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <CheckBox x:Name="chkblocation" Content="Open backup location" HorizontalAlignment="Left" Margin="11,438,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <Button x:Name="btnSend" Content="Send" Margin="3,469,10,0" VerticalAlignment="Top" Grid.Column="1"/>
+        <CheckBox x:Name="chkblocation_Copy" Content="Open backup location" HorizontalAlignment="Left" Margin="11,438,0,0" VerticalAlignment="Top" IsChecked="True"/>
+    </Grid>
+</Window>

+ 187 - 0
vagrantConfig/xaml.ps1

@@ -0,0 +1,187 @@
+function Show-XAMLWindow{
+
+    [CmdletBinding(  
+        SupportsShouldProcess   = $false,
+        ConfirmImpact       = "none",
+        DefaultParameterSetName = ""
+    )]
+
+    param
+    (
+        [Parameter(
+        HelpMessage = "Enter tbind xaml @`...`@ to load.",
+        Position = 0,
+        Mandatory = $true,
+        ValueFromPipeline = $true,
+        ValueFromPipelineByPropertyName = $true
+        )]
+
+        [ValidateNotNullOrEmpty()]
+        [string]
+        $xaml,
+
+        [Alias("PassThru")]
+        [switch]
+        $PassThrough
+    )
+
+    begin
+    {
+        try
+        {
+            Add-Type -AssemblyName presentationframework
+        }
+        catch
+        {
+        }
+
+        try
+        {
+            [xml]$xaml = $xaml
+        }
+        catch
+        {
+        }
+        $reader=(New-Object System.Xml.XmlNodeReader $xaml)
+        $Form=[Windows.Markup.XamlReader]::Load( $reader )
+ 
+        #Setting al the fields to varialbe
+        $cbCompanys = $Form.FindName("cbCompanys")
+        $chkbMultiSelect = $Form.FindName("chkbMultiSelect")
+        $dgUsers = $Form.FindName("dgUsers")
+        $chkbBackupFiles = $Form.FindName("chkbBackupFiles")
+        $chkbBackupMail = $Form.FindName("chkbBackupMail")
+        $chkblocation = $Form.FindName("chkblocation")
+        $btnSend = $Form.FindName("btnSend")
+
+    }
+
+    process
+    {
+    # Form setup
+        #$Form.Background = $Global:BackColor
+
+        # for now disable the multiselect button
+        $chkbMultiSelect.IsEnabled = $false
+
+        # Add scripts to Company Combobox    
+        #foreach ($Company in ($Global:Companys | sort Name)) {
+        #    [void] $cbCompanys.Items.Add($Company.Name)
+        #}
+
+        [void] $cbCompanys.Items.Add("A")
+        [void] $cbCompanys.Items.Add("B")
+
+
+        # Add on checked to CheckBox Multiselect
+        $chkbMultiSelect.Add_Checked({
+            $dgUsers.SelectionMode = "Extended"
+        })
+
+        # Add on UnChecked to CheckBox Multiselect
+        $chkbMultiSelect.Add_UnChecked({
+            $dgUsers.SelectionMode = "Single"
+        })
+
+        # Add onchange to Company Combobox
+        $cbCompanys_Add_SelectionChanged = {
+            # Disable User Combobox
+            $cbCompanys.IsEnabled = $False
+
+            # Clear the Users Combobox
+            $dgUsers.Clear()
+
+            # Get all users of company
+            #$CompUsers = Get-CompanyUser -Company $cbCompanys.SelectedItem | select DisplayName, UserPrincipalName, SamAccountName | sort DisplayName
+            $CompUsers =
+            @(
+                [pscustomobject]@{ DisplayName="Andy"; UserPrincipalName="Andy P"; SamAccountName="Andy S";}
+                [pscustomobject]@{ DisplayName="Bob"; UserPrincipalName="Bob P"; SamAccountName="Bob S";  }
+                [pscustomobject]@{ DisplayName="Casey"; UserPrincipalName="Casey P"; SamAccountName="Casey S";  }
+            )
+
+            # Add property for checkbox
+            $CompUsers | ForEach-Object {
+                $_ | Add-Member -MemberType NoteProperty -Name IsChecked -Value $False -TypeName System.Boolean;
+             }
+
+
+            # Add users to DataGrid
+            $dgUsers.ItemsSource = $CompUsers
+
+            # Allow sorting on all columns
+            $dgUsers.Columns | ForEach-Object { 
+                $_.CanUserSort = $True
+                $_.IsReadOnly = $True
+            }
+
+            # Set Columns ReadOnly of not
+            $dgUsers.Columns[0].IsReadOnly = $False
+
+            # Enable User Combobox
+            $cbCompanys.IsEnabled = $True
+        }
+
+        # Add selectionchanged function to Combobox
+        $cbCompanys.Add_SelectionChanged($cbCompanys_Add_SelectionChanged)
+
+        # Set action to button
+        $btnSend.Add_Click({
+            # Get selected items
+            $SelCompany = $cbCompanys.SelectedItem
+
+            # Checking if all fiels contain value
+            if (!($SelCompany)) { 
+                EmptyFormField -Field "Company" 
+            } else { 
+                write-host "----"
+                $dgUsers.ItemsSource | Where-Object {$_.IsChecked -eq $True}  | ForEach-Object {
+                    write-host  $_
+                }
+            }
+
+        })
+        $Form.ShowDialog() | out-null
+    }
+
+    end
+    {
+        return  $dgUsers.ItemsSource | Where-Object {$_.IsChecked -eq $True}
+    }
+}
+
+
+$xaml =@'
+<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        x:Name="Window_GuiManagement" Title="Remove Company User" WindowStartupLocation = "CenterScreen" 
+        Width = "587.307" Height = "540.023" Visibility="Visible" WindowStyle="ToolWindow" ResizeMode="NoResize" Topmost="True">
+    <Grid>
+        <Label x:Name="lblCompany" Content="Company:" HorizontalAlignment="Left" Margin="11,10,0,0" Height="26" VerticalAlignment="Top"/>
+        <ComboBox x:Name="cbCompanys" Margin="10,36,10,0" VerticalAlignment="Top"/>
+        <Label x:Name="lbluser" Content="User:" HorizontalAlignment="Left" Margin="11,63,0,0" VerticalAlignment="Top"/>
+        <CheckBox x:Name="chkbMultiSelect" Content="MultiSelect" Margin="481,69,10,0" VerticalAlignment="Top" Width="90"/>
+        <DataGrid x:Name="dgUsers" Margin="11,94,10,0" VerticalAlignment="Top" Height="299" SelectionMode="Single" AlternationCount="1"
+                  AutoGenerateColumns="false">
+            <DataGrid.Columns>
+                <DataGridCheckBoxColumn Binding="{Binding Path=IsChecked,UpdateSourceTrigger=PropertyChanged}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="False"
+                                        Header="Check"/>
+                <DataGridTextColumn Binding="{Binding Path=DisplayName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="DisplayName"/>
+                <DataGridTextColumn Binding="{Binding Path=UserPrincipalName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="UserPrincipalName"/>
+                <DataGridTextColumn Binding="{Binding Path=SamAccountName}" ClipboardContentBinding="{x:Null}" CanUserSort="False" CanUserResize="False" IsReadOnly="True"
+                                        Header="SamAccountName"/>
+            </DataGrid.Columns>
+        </DataGrid>
+        <CheckBox x:Name="chkbBackupFiles" Content="Backup Files" HorizontalAlignment="Left" Margin="11,398,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <CheckBox x:Name="chkbmail" Content="Backup Mail" HorizontalAlignment="Left" Margin="11,418,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <CheckBox x:Name="chkblocation" Content="Open backup location" HorizontalAlignment="Left" Margin="11,438,0,0" VerticalAlignment="Top" IsChecked="True"/>
+        <Button x:Name="btnSend" Content="Send" Margin="491,469,10,0" VerticalAlignment="Top"/>
+        <CheckBox x:Name="chkblocation_Copy" Content="Open backup location" HorizontalAlignment="Left" Margin="11,438,0,0" VerticalAlignment="Top" IsChecked="True"/>
+    </Grid>
+</Window>
+'@
+
+$WPFresult = Show-XAMLWindow -xaml $xaml
+$WPFresult