Skip to content

Commit

Permalink
Merge pull request #86 from AsBuiltReport/dev
Browse files Browse the repository at this point in the history
v0.7.10 public release
  • Loading branch information
rebelinux committed Oct 29, 2022
2 parents f5c89a3 + 41ecefe commit 0bfefee
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion AsBuiltReport.Microsoft.AD.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Microsoft.AD.psm1'

# Version number of this module.
ModuleVersion = '0.7.9'
ModuleVersion = '0.7.10'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# :arrows_clockwise: Microsoft AD As Built Report Changelog

## [0.7.10] - 2022-10-28

### Fixed

- Fix issue [#83](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/83) (Error running report if multiple version are installed together)

## [0.7.9] - 2022-10-09

### Added
Expand Down
22 changes: 13 additions & 9 deletions Src/Public/Invoke-AsBuiltReport.Microsoft.AD.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Microsoft.AD {
.DESCRIPTION
Documents the configuration of Microsoft AD in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.7.9
Version: 0.7.10
Author: Jonathan Colon
Twitter: @jcolonfzenpr
Github: rebelinux
Expand All @@ -26,16 +26,20 @@ function Invoke-AsBuiltReport.Microsoft.AD {
Write-PScriboMessage -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD"
Write-PScriboMessage -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues"

$InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.Microsoft.AD -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
Try {
$InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.Microsoft.AD -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version

if ($InstalledVersion) {
Write-PScriboMessage -IsWarning "Installed AsBuiltReport.Microsoft.AD Version: $($InstalledVersion.ToString())"
$MostCurrentVersion = Find-Module -Name AsBuiltReport.Microsoft.AD -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
if ($MostCurrentVersion -and ($MostCurrentVersion -gt $InstalledVersion)) {
Write-PScriboMessage -IsWarning "New Update: AsBuiltReport.Microsoft.AD Version: $($MostCurrentVersion.ToString())"
Write-PScriboMessage -IsWarning "To Update run: Update-Module -Name AsBuiltReport.Microsoft.AD -Force"
if ($InstalledVersion) {
Write-PScriboMessage -IsWarning "AsBuiltReport.Microsoft.AD $($InstalledVersion.ToString()) is currently installed."
$LatestVersion = Find-Module -Name AsBuiltReport.Microsoft.AD -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version
if ($LatestVersion -gt $InstalledVersion) {
Write-PScriboMessage -IsWarning "AsBuiltReport.Microsoft.AD $($LatestVersion.ToString()) is available."
Write-PScriboMessage -IsWarning "Run 'Update-Module -Name AsBuiltReport.Microsoft.AD -Force' to install the latest version."
}
}
} Catch {
Write-PscriboMessage -IsWarning $_.Exception.Message
}
}

$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())

Expand Down

0 comments on commit 0bfefee

Please sign in to comment.