Skip to content

Commit f6f83c0

Browse files
committed
Update TestScript.ps1
1 parent c27d5b3 commit f6f83c0

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

Examples/TestScript.ps1

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@
66
$TemplateName = 'sample-template.xml'
77

88
# Remove and re-import the module
9-
Remove-Module CitrixOptimizerAutomation
10-
Import-Module ./CitrixOptimizerAutomation
9+
Remove-Module CitrixOptimizerAutomation -Verbose
10+
Import-Module ./CitrixOptimizerAutomation -Verbose
1111

1212
# Create a new Template
13-
$Template = New-CitrixTemplate -Path $TemplateName -DisplayName 'Example Citrix Optimization Template' -Description 'This is a new Citrix Optimization template' -Author 'Dave Brett'
13+
$Template = New-CitrixTemplate -Path $TemplateName -DisplayName 'Example Citrix Optimization Template' -Description 'This is a new Citrix Optimization template' -Author 'Dave Brett' -Verbose
1414

1515
# Create Initial Group
16-
New-CitrixTemplateGroup -Path $Template.Path -GroupName 'System Optimizations' -GroupDescription "System Optimization Group"
17-
New-CitrixTemplateGroup -Path $Template.Path -GroupName 'OS Optimizations' -GroupDescription "OS Optimization Group"
18-
New-CitrixTemplateGroup -Path $Template.Path -GroupName 'HKLM Optimizations' -GroupDescription "HKLM Optimization Group"
16+
$Group = New-CitrixTemplateGroup -Path $Template.Path -GroupName 'System Optimizations' -GroupDescription "System Optimization Group" -Verbose
17+
$Group = New-CitrixTemplateGroup -Path $Template.Path -GroupName 'OS Optimizations' -GroupDescription "OS Optimization Group" -Verbose
18+
$Group = New-CitrixTemplateGroup -Path $Template.Path -GroupName 'HKLM Optimizations' -GroupDescription "HKLM Optimization Group" -Verbose
1919

2020
# Create Service Entries
21-
New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the Print Spooler' -ServiceName 'spooler' -ServiceDescription 'Windows Print Service' -GroupName 'System Optimizations' -State "Disabled"
22-
New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the AppID Service' -ServiceName 'AppID' -ServiceDescription 'AppID Service' -GroupName 'System Optimizations' -State "Disabled"
23-
New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the Citrix Primt Management' -ServiceName 'CpSvc' -ServiceDescription 'Citrix Print Service' -GroupName 'System Optimizations' -State "Disabled"
21+
$Service = New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the Print Spooler' -ServiceName 'spooler' -ServiceDescription 'Windows Print Service' -GroupName 'System Optimizations' -State "Disabled" -Verbose
22+
$Service = New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the AppID Service' -ServiceName 'AppID' -ServiceDescription 'AppID Service' -GroupName 'System Optimizations' -State "Disabled" -Verbose
23+
$Service = New-CitrixTemplateService -Path $Template.Path -EntryName 'Disable the Citrix Primt Management' -ServiceName 'CpSvc' -ServiceDescription 'Citrix Print Service' -GroupName 'System Optimizations' -State "Disabled" -Verbose
2424

2525
# Create Scheduled Task Entries
26-
New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - AppID' -TaskPath '\Microsoft\Windows\AppID\' -TaskDescription 'This is the AppID Scheduled Task' -State "Disabled"
27-
New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - OfficeUpdate' -TaskPath '\Microsoft\Windows\Office\Update\' -TaskDescription 'This is the Office Update Scheduled Task' -State "Disabled"
28-
New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - Microsoft Edge Update' -TaskPath '\Microsoft\Edge\Update\' -TaskDescription 'This is the Microsoft Edge Update Scheduled Task' -State "Disabled"
26+
$Task = New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - AppID' -TaskPath '\Microsoft\Windows\AppID\' -TaskDescription 'This is the AppID Scheduled Task' -State "Disabled" -Verbose
27+
$Task = New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - OfficeUpdate' -TaskPath '\Microsoft\Windows\Office\Update\' -TaskDescription 'This is the Office Update Scheduled Task' -State "Disabled" -Verbose
28+
$Task = New-CitrixTemplateTask -Path $Template.Path -GroupName 'System Optimizations' -TaskName 'SchTask - Microsoft Edge Update' -TaskPath '\Microsoft\Edge\Update\' -TaskDescription 'This is the Microsoft Edge Update Scheduled Task' -State "Disabled" -Verbose
2929

3030
# Create Registry Values
31-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Update Registry Entry' -EntryDescription 'Disable Edge Updates via HKLM' -ItemName 'UpdatesEnabled' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue '0' -ItemType 'Dword'
32-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Sandbox' -EntryDescription 'Enable Edge Sandbox' -ItemName 'Sandbox' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue 'Enabled' -ItemType 'String'
33-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Extensions' -EntryDescription 'Disable Edge Extensions' -ItemName 'ExtensionsDisabled' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue '1' -ItemType 'Dword'
31+
$Registry = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Update Registry Entry' -EntryDescription 'Disable Edge Updates via HKLM' -ItemName 'UpdatesEnabled' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue '0' -ItemType 'Dword' -Verbose
32+
$Registry = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Sandbox' -EntryDescription 'Enable Edge Sandbox' -ItemName 'Sandbox' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue 'Enabled' -ItemType 'String' -Verbose
33+
$Registry = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Add Edge Extensions' -EntryDescription 'Disable Edge Extensions' -ItemName 'ExtensionsDisabled' -ItemPath 'HKLM\Software\Microsoft\Edge' -ItemValue '1' -ItemType 'Dword' -Verbose
3434

3535
# Remove Registry Values
36-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 1' -EntryDescription 'Remove Edge Item 1' -ItemName 'Item1' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue
37-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 2' -EntryDescription 'Remove Edge Item 2' -ItemName 'Item2' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue
38-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 3' -EntryDescription 'Remove Edge Item 3' -ItemName 'Item3' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue
36+
$Value = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 1' -EntryDescription 'Remove Edge Item 1' -ItemName 'Item1' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue -Verbose
37+
$Value = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 2' -EntryDescription 'Remove Edge Item 2' -ItemName 'Item2' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue -Verbose
38+
$Value = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Item 3' -EntryDescription 'Remove Edge Item 3' -ItemName 'Item3' -ItemPath 'HKLM\Software\Microsoft\Edge' -DeleteValue -Verbose
3939

4040
# Remove Registry Keys
41-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 1' -EntryDescription 'Remove Edge Key 1' -ItemPath 'HKLM\Software\Microsoft\Edge1' -DeleteKey
42-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 2' -EntryDescription 'Remove Edge Key 2' -ItemPath 'HKLM\Software\Microsoft\Edge2' -DeleteKey
43-
New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 3' -EntryDescription 'Remove Edge Key 3' -ItemPath 'HKLM\Software\Microsoft\Edge3' -DeleteKey
41+
$Key = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 1' -EntryDescription 'Remove Edge Key 1' -ItemPath 'HKLM\Software\Microsoft\Edge1' -DeleteKey -Verbose
42+
$Key = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 2' -EntryDescription 'Remove Edge Key 2' -ItemPath 'HKLM\Software\Microsoft\Edge2' -DeleteKey -Verbose
43+
$Key = New-CitrixTemplateRegistry -Path $Template.Path -GroupName 'System Optimizations' -EntryName 'Remove Edge Key 3' -EntryDescription 'Remove Edge Key 3' -ItemPath 'HKLM\Software\Microsoft\Edge3' -DeleteKey -Verbose
4444

0 commit comments

Comments
 (0)