Skip to content

Commit

Permalink
Merge pull request #38 from AsBuiltReport/dev
Browse files Browse the repository at this point in the history
v0.5.6 public release
  • Loading branch information
rebelinux authored Nov 20, 2024
2 parents a6979f8 + 998b146 commit 5d0e537
Show file tree
Hide file tree
Showing 59 changed files with 475 additions and 402 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,13 @@ jobs:
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
bsky-post:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: zentered/bluesky-post-action@v0.1.0
with:
post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Microsoft #Windows #AsBuiltReport #PowerShell #MVPBuzz"
env:
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
4 changes: 2 additions & 2 deletions AsBuiltReport.Microsoft.Windows.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.Microsoft.Windows.psm1'

# Version number of this module.
ModuleVersion = '0.5.5'
ModuleVersion = '0.5.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -58,7 +58,7 @@
},
@{
ModuleName = 'dbatools';
ModuleVersion = '2.1.18'
ModuleVersion = '2.1.27'
}
)

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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).

## [0.5.6] - 2024-11-20

### Changed

- Increase Dbatools module requirement v2.1.27
- Improve detection of empty fields in tables
- Improve detection of true/false elements in tables
- Update GitHub release workflow to add post to Bluesky social platform

### Fixed

- Fix [#36](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.Windows/issues/36)

## [0.5.5] - 2024-07-29

### Changed
Expand Down
10 changes: 5 additions & 5 deletions Src/Private/Get-AbrWinApplication.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrWinApplication {
.DESCRIPTION
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.5.5
Version: 0.5.6
Author: Andrew Ramsay
Editor: Jonathan Colon
Twitter: @asbuiltreport
Expand Down Expand Up @@ -34,10 +34,10 @@ function Get-AbrWinApplication {
Section -Style Heading3 'Installed Applications' {
Paragraph 'The following settings details applications listed in Add/Remove Programs'
BlankLine
[array]$AddRemoveReport = @()
$OutObj = @()
ForEach ($App in $AddRemove) {
try {
$TempAddRemoveReport = [PSCustomObject]@{
$inObj = [ordered] @{
'Application Name' = $App.DisplayName
'Publisher' = $App.Publisher
'Version' = Switch ([string]::IsNullOrEmpty($App.DisplayVersion)) {
Expand All @@ -51,7 +51,7 @@ function Get-AbrWinApplication {
default { 'Unknown' }
}
}
$AddRemoveReport += $TempAddRemoveReport
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
Expand All @@ -64,7 +64,7 @@ function Get-AbrWinApplication {
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
$AddRemoveReport | Where-Object { $_.'Application Name' -notlike $null } | Sort-Object -Property 'Application Name' | Table @TableParams
$OutObj | Where-Object { $_.'Application Name' -notlike '--' } | Sort-Object -Property 'Application Name' | Table @TableParams
}
}
} catch {
Expand Down
20 changes: 10 additions & 10 deletions Src/Private/Get-AbrWinDHCPInfrastructure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ function Get-AbrWinDHCPInfrastructure {
$OutObj = @()
try {
$inObj = [ordered] @{
'Domain Joined' = ConvertTo-TextYN $Settings.IsDomainJoined
'Authorized' = ConvertTo-TextYN $Settings.IsAuthorized
'Domain Joined' = $Settings.IsDomainJoined
'Authorized' = $Settings.IsAuthorized
'Conflict Detection Attempts' = $Settings.ConflictDetectionAttempts
'Activate Policies' = ConvertTo-TextYN $Settings.ActivatePolicies
'Dynamic Bootp' = ConvertTo-TextYN $Settings.DynamicBootp
'Database Path' = ConvertTo-EmptyToFiller $Database.FileName
'Database Backup Path' = ConvertTo-EmptyToFiller $Database.BackupPath
'Activate Policies' = $Settings.ActivatePolicies
'Dynamic Bootp' = $Settings.DynamicBootp
'Database Path' = $Database.FileName
'Database Backup Path' = $Database.BackupPath
'Database Backup Interval' = switch ([string]::IsNullOrEmpty($Database.BackupInterval)) {
$true { "--" }
$false { "$($Database.BackupInterval) min" }
default { 'Unknown' }
}
'Database Logging Enabled' = Switch ([string]::IsNullOrEmpty($Database.LoggingEnabled)) {
$true { "--" }
$false { ConvertTo-TextYN $Database.LoggingEnabled }
$false { $Database.LoggingEnabled }
default { 'Unknown' }
}
'User Name' = ConvertTo-EmptyToFiller $DNSCredential.UserName
'Domain Name' = ConvertTo-EmptyToFiller $DNSCredential.DomainName
'User Name' = $DNSCredential.UserName
'Domain Name' = $DNSCredential.DomainName
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
Expand Down
4 changes: 2 additions & 2 deletions Src/Private/Get-AbrWinDHCPv4PerScopeSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function Get-AbrWinDHCPv4PerScopeSetting {
'Name' = $Option.Name
'Option Id' = $Option.OptionId
'Value' = $Option.Value
'Policy Name' = ConvertTo-EmptyToFiller $Option.PolicyName
'Policy Name' = $Option.PolicyName
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (Scope Options Item)"
}
Expand Down
22 changes: 11 additions & 11 deletions Src/Private/Get-AbrWinDHCPv4Scope.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Get-AbrWinDHCPv4Scope {
}
'State' = $Scope.State
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
Expand Down Expand Up @@ -76,7 +76,7 @@ function Get-AbrWinDHCPv4Scope {
'Percentage In Use' = [math]::Round($DHCPStatistic.PercentageInUse, 0)
'Reserved IP' = $DHCPStatistic.Reserved
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (IPv4 Scope Statistics Item)"
}
Expand Down Expand Up @@ -111,17 +111,17 @@ function Get-AbrWinDHCPv4Scope {
$inObj = [ordered] @{
'Partner DHCP Server' = $DHCPv4Failover.PartnerServer
'Mode' = $DHCPv4Failover.Mode
'LoadBalance Percent' = ConvertTo-EmptyToFiller ([math]::Round($DHCPv4Failover.LoadBalancePercent, 0))
'Server Role' = ConvertTo-EmptyToFiller $DHCPv4Failover.ServerRole
'Reserve Percent' = ConvertTo-EmptyToFiller ([math]::Round($DHCPv4Failover.ReservePercent, 0))
'Max Client Lead Time' = ConvertTo-EmptyToFiller $DHCPv4Failover.MaxClientLeadTime
'State Switch Interval' = ConvertTo-EmptyToFiller $DHCPv4Failover.StateSwitchInterval
'LoadBalance Percent' = ([math]::Round($DHCPv4Failover.LoadBalancePercent, 0))
'Server Role' = $DHCPv4Failover.ServerRole
'Reserve Percent' = ([math]::Round($DHCPv4Failover.ReservePercent, 0))
'Max Client Lead Time' = $DHCPv4Failover.MaxClientLeadTime
'State Switch Interval' = $DHCPv4Failover.StateSwitchInterval
'Scope Ids' = $DHCPv4Failover.ScopeId
'State' = $DHCPv4Failover.State
'Auto State Transition' = ConvertTo-TextYN $DHCPv4Failover.AutoStateTransition
'Authetication Enable' = ConvertTo-TextYN $DHCPv4Failover.EnableAuth
'Auto State Transition' = $DHCPv4Failover.AutoStateTransition
'Authetication Enable' = $DHCPv4Failover.EnableAuth
}
$OutObj = [pscustomobject]$inobj
$OutObj = [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (IPv4 Scope Failover Item)"
}
Expand Down Expand Up @@ -165,7 +165,7 @@ function Get-AbrWinDHCPv4Scope {
default { $DHCPv4Binding.BindingState }
}
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (IPv4 Network Interface binding Item)"
}
Expand Down
16 changes: 8 additions & 8 deletions Src/Private/Get-AbrWinDHCPv4ScopeServerSetting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ function Get-AbrWinDHCPv4ScopeServerSetting {
'Name' = $Option.Name
'Option Id' = $Option.OptionId
'Value' = $Option.Value
'Policy Name' = ConvertTo-EmptyToFiller $Option.PolicyName
'Policy Name' = $Option.PolicyName
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (DHCP scopes server opions item)"
}
Expand All @@ -66,13 +66,13 @@ function Get-AbrWinDHCPv4ScopeServerSetting {
Write-PScriboMessage "Collecting DHCP Server Scope DNS Setting."
$inObj = [ordered] @{
'Dynamic Updates' = $Option.DynamicUpdates
'Dns Suffix' = ConvertTo-EmptyToFiller $Option.DnsSuffix
'Name Protection' = ConvertTo-EmptyToFiller $Option.NameProtection
'Update Dns RR For Older Clients' = ConvertTo-EmptyToFiller $Option.UpdateDnsRRForOlderClients
'Disable Dns Ptr RR Update' = ConvertTo-EmptyToFiller $Option.DisableDnsPtrRRUpdate
'Delete Dns RR On Lease Expiry' = ConvertTo-EmptyToFiller $Option.DeleteDnsRROnLeaseExpiry
'Dns Suffix' = $Option.DnsSuffix
'Name Protection' = $Option.NameProtection
'Update Dns RR For Older Clients' = $Option.UpdateDnsRRForOlderClients
'Disable Dns Ptr RR Update' = $Option.DisableDnsPtrRRUpdate
'Delete Dns RR On Lease Expiry' = $Option.DeleteDnsRROnLeaseExpiry
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (Scope DNS Setting Item)"
}
Expand Down
14 changes: 7 additions & 7 deletions Src/Private/Get-AbrWinDHCPv4Statistic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ function Get-AbrWinDHCPv4Statistic {
$OutObj = @()
try {
$inObj = [ordered] @{
'Total Scopes' = ConvertTo-EmptyToFiller $DhcpSv4Statistics.TotalScopes
'Total Addresses' = ConvertTo-EmptyToFiller $DhcpSv4Statistics.TotalAddresses
'Addresses In Use' = ConvertTo-EmptyToFiller $DhcpSv4Statistics.AddressesInUse
'Addresses Available' = ConvertTo-EmptyToFiller $DhcpSv4Statistics.AddressesAvailable
'Percentage In Use' = ConvertTo-EmptyToFiller ([math]::Round($DhcpSv4Statistics.PercentageInUse, 0))
'Percentage Available' = ConvertTo-EmptyToFiller ([math]::Round($DhcpSv4Statistics.PercentageAvailable, 0))
'Total Scopes' = $DhcpSv4Statistics.TotalScopes
'Total Addresses' = $DhcpSv4Statistics.TotalAddresses
'Addresses In Use' = $DhcpSv4Statistics.AddressesInUse
'Addresses Available' = $DhcpSv4Statistics.AddressesAvailable
'Percentage In Use' = ([math]::Round($DhcpSv4Statistics.PercentageInUse, 0))
'Percentage Available' = ([math]::Round($DhcpSv4Statistics.PercentageAvailable, 0))
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning "$($_.Exception.Message) (IPv4 Service Statistics Item)"
}
Expand Down
Loading

0 comments on commit 5d0e537

Please sign in to comment.