Skip to content

Commit

Permalink
Merge pull request #27 from AsBuiltReport/dev
Browse files Browse the repository at this point in the history
v1.1.3 public release
  • Loading branch information
rebelinux authored Feb 14, 2024
2 parents 2982f87 + 4a0781c commit bc4c1dd
Show file tree
Hide file tree
Showing 46 changed files with 1,572 additions and 1,353 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Bug Report
description: File a bug report
labels: ["bug"]
assignees:
- rebelinux
- childebrandt42
body:
- type: textarea
id: bug-description
Expand Down Expand Up @@ -95,4 +95,4 @@ body:
required: true
- label: >-
I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues) before submitting this bug report.
required: true
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/change_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Change Request
description: Request a new change or an improvement
labels: ["change request"]
assignees:
- rebelinux
- childebrandt42
body:
- type: textarea
id: description
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/Codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# https://github.com/microsoft/action-psscriptanalyzer
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer

name: CodeQL

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
schedule:
- cron: '20 14 * * 1'

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run PSScriptAnalyzer
uses: microsoft/psscriptanalyzer-action@v1.1
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/PSScriptAnalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish-to-gallery:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set PSRepository to Trusted for PowerShell Gallery
shell: pwsh
run: |
Expand Down
14 changes: 6 additions & 8 deletions AsBuiltReport.VMware.Horizon.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Report": {
"Report": {
"Name": "VMware Horizon As Built Report",
"Version": "1.0",
"Status": "Released",
Expand All @@ -8,8 +8,7 @@
"ShowHeaderFooter": true,
"ShowTableCaptions": true
},
"Options": {
},
"Options": {},
"InfoLevel": {
"_comment_": "0 = Disabled, 1 = Summary, 2 = Informative, 3 = Detailed",
"UsersAndGroups": {
Expand All @@ -26,16 +25,16 @@
},
"Settings": {
"Servers": {
"vCenterServers":{
"vCenterServers": {
"vCenter": 1,
"ESXiHosts": 1,
"DataStores": 1,
"ADDomains": 1
},
"UAG":{
"UAG": {
"UAGServers": 1
},
"ConnectionServers":{
"ConnectionServers": {
"ConnectionServers": 1
}
},
Expand Down Expand Up @@ -84,7 +83,7 @@
"vCenter": {
"Status": true
},
"ConnectionServers":{
"ConnectionServers": {
"Status": true
},
"RegisteredMachines": {
Expand All @@ -93,6 +92,5 @@
"EventConfiguration": {
"EventDatabase": true
}

}
}
Binary file modified AsBuiltReport.VMware.Horizon.psd1
Binary file not shown.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# :arrows_clockwise: VMware Horizon As Built Report Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.3] - 2024-02-14

### Added

- Added module version validation

### Changed

- Updated VMware PowerCLI requirements to v13.2
- Updated Sample Reports
- Updated CodeQL upload-sarif action requirement to v3
- Updated PSScriptAnalyzer checkout action requirement to v4
- Updated PublishPowerShellModule checkout action requirement to v4

### Fixed

- Resolved the Following issues:
- [#15](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/15), [#16](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/16), [#17](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/17), [#18](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/18), [#19](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/19), [#20](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/20), [#21](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/21), [#22](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/22), [#23](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/23), [#24](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/24)

## [1.1.2] - 2024-02-02

### Fixed

- Renamed Domains Connection Server Section. Resolve [#13](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/13)
- Fixed Admin Users and Groups bug details reporting incorrectly. Resolve [#12](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/12)

## [1.1.0] - 2023-12-19

### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 AsBuiltReport
Copyright (c) 2024 AsBuiltReport

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Below are the instructions on how to install, configure and generate a VMware Ho

The VMware Horizon As Built Report supports the following Horizon versions;

- Horizon 8+
- Horizon 8+, 23**
- Horizon 7? (Need Testing)

### PowerShell
Expand All @@ -76,10 +76,10 @@ PowerShell 5.1 or PowerShell 7, and the following PowerShell modules are require

Open a PowerShell terminal window and install each of the required modules.

:warning: VMware PowerCLI 12.7 or higher is required. Please ensure older PowerCLI versions have been uninstalled.
:warning: VMware PowerCLI 13.2 or higher is required. Please ensure older PowerCLI versions have been uninstalled.

```powershell
install-module VMware.PowerCLI -MinimumVersion 12.7 -AllowClobber
install-module VMware.PowerCLI -MinimumVersion 13.2 -AllowClobber
install-module AsBuiltReport.VMware.Horizon
```

Expand Down Expand Up @@ -122,7 +122,7 @@ The **Report** schema provides configuration of the VMware Horizon report inform
| Sub-Schema | Setting | Default | Description |
|---------------------|--------------|--------------------------------|--------------------------------------------------------------|
| Name | User defined | VMware Horizon As Built Report | The name of the As Built Report |
| Version | User defined | 1.1 | The report version |
| Version | User defined | 1.0 | The report version |
| Status | User defined | Released | The report release status |
| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents |
Expand Down
861 changes: 551 additions & 310 deletions Samples/Sample VMware Horizon As Built Report.html

Large diffs are not rendered by default.

Binary file modified Samples/VMware Horizon As Built Report.pdf
Binary file not shown.
20 changes: 9 additions & 11 deletions Src/Private/Get-AbrHRZADDomain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrHRZADDomain {
.DESCRIPTION
Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo.
.NOTES
Version: 1.1.0
Version: 1.1.3
Author: Chris Hildebrandt, Karl Newick
Twitter: @childebrandt42, @karlnewick
Editor: Jonathan Colon, @jcolonfzenpr
Expand All @@ -23,33 +23,32 @@ function Get-AbrHRZADDomain {
)
begin {
Write-PScriboMessage "ADDomains InfoLevel set at $($InfoLevel.Settings.Servers.vCenterServers.ADDomains)."
Write-PscriboMessage "Collecting Active Directory Domain information."
Write-PScriboMessage "Collecting Active Directory Domain information."
}
process {
try {
if ($Domains) {
if ($InfoLevel.Settings.Servers.vCenterServers.ADDomains -ge 1) {
section -Style Heading4 "Active Directory Domains" {
Section -Style Heading4 "Active Directory Domains" {
Paragraph "The following section summarizes the configuration of Active Directory Domains for $($HVEnvironment.split('.')[0]) server."
BlankLine
$OutObj = @()
foreach ($Domain in $Domains) {
try {
Write-PscriboMessage "Discovered Domain Information $($Domain.DNSName)."
Write-PScriboMessage "Discovered Domain Information $($Domain.DNSName)."
$inObj = [ordered] @{
'Domain DNS Name' = $Domain.DNSName
'Status' = $Domain.ConnectionServerState[0].Status
'Trust Relationship' = $Domain.ConnectionServerState[0].TrustRelationship
'Connection Status' = $Domain.ConnectionServerState[0].Contactable
}
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}
if ($HealthCheck.DataStores.Status) {
$OutObj | Where-Object { $_.'Status' -eq 'ERROR'} | Set-Style -Style Warning
$OutObj | Where-Object { $_.'Status' -eq 'ERROR' } | Set-Style -Style Warning
}
$TableParams = @{
Name = "Active Directory Domains - $($HVEnvironment.split(".").toUpper()[0])"
Expand All @@ -63,9 +62,8 @@ function Get-AbrHRZADDomain {
}
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}
end {}
Expand Down
34 changes: 16 additions & 18 deletions Src/Private/Get-AbrHRZAccessGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrHRZAccessGroup {
.DESCRIPTION
Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo.
.NOTES
Version: 1.1.0
Version: 1.1.3
Author: Chris Hildebrandt, Karl Newick
Twitter: @childebrandt42, @karlnewick
Editor: Jonathan Colon, @jcolonfzenpr
Expand All @@ -24,22 +24,22 @@ function Get-AbrHRZAccessGroup {

begin {
Write-PScriboMessage "AccessGroup InfoLevel set at $($InfoLevel.Settings.Administrators.AccessGroup)."
Write-PscriboMessage "Collecting Access Group information."
Write-PScriboMessage "Collecting Access Group information."
}

process {
try {
if ($AccessGroups) {
if ($InfoLevel.Settings.Administrators.AccessGroup -ge 1) {
section -Style Heading3 "Access Groups" {
Section -Style Heading3 "Access Groups" {
Paragraph "The following section summarizes the configuration of Access Groups for $($HVEnvironment.toUpper()) server."
BlankLine
$OutObj = @()
$AccessGroupJoined = @()
$AccessGroupJoined += $AccessGroups
$AccessGroupJoined += $AccessGroups.Children
foreach ($AccessGroup in $AccessGroupJoined) {
Write-PscriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Information."
Write-PScriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Information."
$inObj = [ordered] @{
'Name' = $AccessGroup.base.Name
'Description' = $AccessGroup.base.Description
Expand All @@ -60,17 +60,17 @@ function Get-AbrHRZAccessGroup {
$OutObj | Sort-Object -Property 'Name' | Table @TableParams
try {
if ($InfoLevel.Settings.Administrators.AccessGroup -ge 2) {
section -Style Heading4 "Access Groups Details" {
Section -Style Heading4 "Access Groups Details" {
$AccessGroupJoined = @()
$AccessGroupJoined += $AccessGroups
$AccessGroupJoined += $AccessGroups.Children
foreach ($AccessGroup in $AccessGroupJoined) {
Write-PscriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Detailed Information."
Write-PScriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Detailed Information."
$AdministratorIDNameResults = @()
# Find Administrator ID Name
foreach ($AccessGroupID in $AccessGroup.data.Permissions.id) {
foreach ($Permission in $Permissions) {
if ($AccessGroupID -eq $Permission.id.id){
if ($AccessGroupID -eq $Permission.id.id) {
foreach ($PermissionGroup in $Permission.base.UserOrGroup.id) {
foreach ($Administrator in $Administrators) {
if ($Administrator.Id.id -eq $PermissionGroup) {
Expand All @@ -84,14 +84,14 @@ function Get-AbrHRZAccessGroup {
}
}
if ($AdministratorIDName) {
section -ExcludeFromTOC -Style NOTOCHeading5 $AccessGroup.base.Name {
Section -ExcludeFromTOC -Style NOTOCHeading5 $AccessGroup.base.Name {
$OutObj = @()
foreach ($Principal in ($AdministratorIDName | Select-Object -Unique)){
foreach ($Principal in ($AdministratorIDName | Select-Object -Unique)) {
$PrincipalPermissionsName = @()
$PrincipalID = ($Administrators | Where-Object {$_.Base.Name -eq $Principal}).Id.Id
$PrincipalPermissions = ($Permissions.Base | Where-Object {$_.UserOrGroup.Id -eq $PrincipalID}).Role.Id
$PrincipalID = ($Administrators | Where-Object { $_.Base.Name -eq $Principal }).Id.Id
$PrincipalPermissions = ($Permissions.Base | Where-Object { $_.UserOrGroup.Id -eq $PrincipalID }).Role.Id
foreach ($PrincipalPermission in $PrincipalPermissions) {
$PrincipalPermissionsName += $(($Roles | Where-Object {$_.Id.id -eq $PrincipalPermission}).Base.Name)
$PrincipalPermissionsName += $(($Roles | Where-Object { $_.Id.id -eq $PrincipalPermission }).Base.Name)
}

$inObj = [ordered] @{
Expand All @@ -117,16 +117,14 @@ function Get-AbrHRZAccessGroup {
}
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}
}
}
}
catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
}
end {}
Expand Down
Loading

0 comments on commit bc4c1dd

Please sign in to comment.