Skip to content

Commit

Permalink
Merge pull request #4 from dbretty/v2308.001_Initial_Cut
Browse files Browse the repository at this point in the history
New-CitrixTemplateReport
  • Loading branch information
david-brett authored Jul 22, 2023
2 parents bd0e656 + a76a06b commit e1384b4
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Local Testing for XML File Generation and Local PS1 File Testing
*.xml
*.ps1
REPORT.MD

#VSCode

Expand Down Expand Up @@ -47,4 +48,5 @@ Icon
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.apdisk

4 changes: 2 additions & 2 deletions CitrixOptimizerAutomation/CitrixOptimizerAutomation.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'CitrixOptimizerAutomation.psm1'

# Version number of this module.
ModuleVersion = '2307.005'
ModuleVersion = '2307.006'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -69,7 +69,7 @@ PowerShellVersion = '5.1'
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('New-CitrixTemplate', 'New-CitrixTemplateGroup', 'New-CitrixTemplateService', 'New-CitrixTemplateTask', 'New-CitrixTemplateRegistry', 'New-CitrixTemplateScript')
FunctionsToExport = @('New-CitrixTemplate', 'New-CitrixTemplateGroup', 'New-CitrixTemplateService', 'New-CitrixTemplateTask', 'New-CitrixTemplateRegistry', 'New-CitrixTemplateScript', 'Get-CitrixTemplate', 'Get-CitrixTemplateGroup', 'Get-CitrixTemplateEntry', 'New-CitrixTemplateReport')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
Expand Down
38 changes: 38 additions & 0 deletions Help/Get-CitrixTemplate.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Get-CitrixTemplate

Gets a Citrix Optimizer Template.

## Syntax

```PowerShell
Get-CitrixTemplate
[-Path] <String[]>
[<CommonParameters>]
```
## Description

This function will get a Citrix Optimizer Template and return the Template Path and Template Contents.

## Examples

### Example 1

```PowerShell
Get-CitrixTemplate -Path 'template.xml'
```

Gets 'template.xml' and returns the XML as part of the Object'.

## Parameters

### -Path

Specifies the Path for the Citrix Optimizer Template

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | True |
| Default Value | None |
| Accept pipeline input | True |
| Accept wildcard characters | False |
119 changes: 119 additions & 0 deletions Help/Get-CitrixTemplateEntry.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Get-CitrixTemplateEntry

Gets Entries from the Citrix Optimizer template.

## Syntax

```PowerShell
Get-CitrixTemplateEntry
[-Path] <String[]>
[-EntryName] <String[]>
[-Registry] <Switch[]>
[-ScheduledTask] <Switch[]>
[-Service] <Switch[]>
[-PowerShell] <Switch[]>
[<CommonParameters>]
```
## Description

This function will get the Entries from a Citrix Optimizer Template passed in

## Examples

### Example 1

```PowerShell
Get-CitrixTemplateEntry -Path 'template.xml' -EntryName "Optimize Internet Explorer"
```

Gets the entry details for the entry "Optimize Internet Explorer".

### Example 2

```PowerShell
Get-CitrixTemplateEntry -Path 'template.xml' -Registry
```

Gets all the Registry Entries from the Template File.

### Example 3

```PowerShell
$Entries = Get-CitrixTemplateEntry -Path 'template.xml' -Service
```

Gets all the Service Entries from the template and assigns the result to the $Entries variable.

## Parameters

### -Path

Specifies the Path and Name for the Citrix Optimizer Template

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | True |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -EntryName

Specifies the Entry Name

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -Registry

Switch for Registry

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -ScheduledTask

Switch for ScheduledTask

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -Service

Switch for Service

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -PowerShell

Switch for PowerShell

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
67 changes: 67 additions & 0 deletions Help/Get-CitrixTemplateGroup.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Get-CitrixTemplateGroup

Gets Group Entries from the Citrix Optimizer template.

## Syntax

```PowerShell
Get-CitrixTemplate
[-Path] <String[]>
[-GroupName] <String[]>
[<CommonParameters>]
```
## Description

This function will get the Group Entries from a Citrix Optimizer Template passed in

## Examples

### Example 1

```PowerShell
Get-CitrixTemplateGroup -Path 'template.xml' -GroupName 'OS Optimizations'
```

Gets the Group called "OS Optimizations"

### Example 2

```PowerShell
Get-CitrixTemplateGroup -Path $Template.Path -GroupName 'System Optimizations'
```

Gets the Group called "System Optimizations" in the template file based on the result of a New-CitrixTemplate return object.

### Example 3

```PowerShell
$Group = Get-CitrixTemplateGroup -Path $Template.Path -GroupName 'System Optimizations'
```

Gets the Group called "System Optimizations" in the template file based on the result of a New-CitrixTemplate return object and pipes this into the variable $Group.

## Parameters

### -Path

Specifies the Path and Name for the Citrix Optimizer Template

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | True |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -GroupName

Specifies the Group Name to add

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | True |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
106 changes: 106 additions & 0 deletions Help/New-CitrixTemplateReport.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# New-CitrixTemplateReport

Creates a new Citrix Optimizer Template report.

## Syntax

```PowerShell
New-CitrixTemplateReport
[-Path] <String[]>
[-Registry] <Switch[]>
[-ScheduledTask] <Switch[]>
[-Service] <Switch[]>
[-PowerShell] <Switch[]>
[<CommonParameters>]
```
## Description

This function will create a markdown report based on the template passed in.

## Examples

### Example 1

```PowerShell
New-CitrixTemplateReport -Path 'template.xml'
```

Creates a new report from the template.xml file

### Example 2

```PowerShell
New-CitrixTemplateReport -Path 'template.xml' -Registry
```

Creates a new report from the template.xml file with only the Registry entries present.

### Example 3

```PowerShell
New-CitrixTemplateReport -Path 'template.xml' -Registry -Service
```

Creates a new report from the template.xml file with the Registry and Service entries present.

## Parameters

### -Path

Specifies the Path and Name for the Citrix Optimizer Template

| Description | Option |
|:---|:---|
| Type | String |
| Mandatory | True |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -Registry

Switch for Registry

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -ScheduledTask

Switch for ScheduledTask

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -Service

Switch for Service

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

### -PowerShell

Switch for PowerShell

| Description | Option |
|:---|:---|
| Type | Switch |
| Mandatory | False |
| Default Value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |

0 comments on commit e1384b4

Please sign in to comment.