Skip to content

Commit 0326835

Browse files
authored
Merge pull request #5 from rebelinux/dev
Minor fixes
2 parents cd6ed10 + 708f177 commit 0326835

9 files changed

+172
-118
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,43 @@ A Microsoft Windows As Built Report can be generated with Administrator level pr
7777

7878
## :package: Module Installation
7979

80+
The installation of the modules will depend on the roles that are being served on the server to be documented.
81+
8082
### PowerShell v5.x running on a Windows server (Target)
81-
<!-- ********** Add installation for any additional PowerShell module(s) ********** -->
83+
8284
```powershell
8385
Install-Module AsBuiltReport.Microsoft.Windows
86+
87+
# DNS/DHCP Server powershell modules
8488
Install-WindowsFeature -Name RSAT-DNS-Server
8589
Install-WindowsFeature -Name RSAT-DHCP
90+
91+
# Hyper-V Server powershell modules
8692
Install-WindowsFeature -Name Hyper-V-PowerShell
93+
94+
#IIS Server powershell modules
8795
Install-WindowsFeature -Name web-mgmt-console
96+
Install-WindowsFeature -Name Web-Scripting-Tools
8897
8998
```
9099

91100
### PowerShell v5.x running on Windows 10 client computer (JumpBox)
92101
<!-- ********** Add installation for any additional PowerShell module(s) ********** -->
93102
```powershell
94103
Install-Module AsBuiltReport.Microsoft.Windows
104+
105+
# DNS/DHCP Server powershell Modules
95106
Add-WindowsCapability –online –Name 'Rsat.Dns.Tools~~~~0.0.1.0'
96107
Add-WindowsCapability -Online -Name 'Rsat.DHCP.Tools~~~~0.0.1.0'
108+
109+
# Hyper-V Server powershell modules
97110
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell
98111
112+
#IIS Server powershell modules
113+
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
114+
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerManagementTools
115+
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementScriptingTools
116+
99117
```
100118

101119
### GitHub

Src/Private/Get-AbrWinDHCPInfrastructure.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function Get-AbrWinDHCPInfrastructure {
3636
'Domain Joined' = ConvertTo-TextYN $Settings.IsDomainJoined
3737
'Authorized' = ConvertTo-TextYN $Settings.IsAuthorized
3838
'Conflict Detection Attempts' = $Settings.ConflictDetectionAttempts
39-
'Activate Policies' = $Settings.ActivatePolicies
40-
'Dynamic Bootp' = $Settings.DynamicBootp
39+
'Activate Policies' = ConvertTo-TextYN $Settings.ActivatePolicies
40+
'Dynamic Bootp' = ConvertTo-TextYN $Settings.DynamicBootp
4141
'Database Path' = ConvertTo-EmptyToFiller $Database.FileName
4242
'Database Backup Path' = ConvertTo-EmptyToFiller $Database.BackupPath
4343
'Database Backup Interval' = switch ($Database.BackupInterval) {

Src/Private/Get-AbrWinDHCPv4Scope.ps1

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,24 @@ function Get-AbrWinDHCPv4Scope {
3333
BlankLine
3434
$OutObj = @()
3535
foreach ($Scope in $DHCPScopes) {
36-
Write-PscriboMessage "Collecting DHCP Server $($Scope.ScopeId) Scope"
37-
$SubnetMask = Convert-IpAddressToMaskLength $Scope.SubnetMask
38-
$inObj = [ordered] @{
39-
'Scope Id' = "$($Scope.ScopeId)/$($SubnetMask)"
40-
'Scope Name' = $Scope.Name
41-
'Scope Range' = "$($Scope.StartRange) - $($Scope.EndRange)"
42-
'Lease Duration' = Switch ($Scope.LeaseDuration) {
43-
"10675199.02:48:05.4775807" {"Unlimited"}
44-
default {$Scope.LeaseDuration}
36+
try {
37+
Write-PscriboMessage "Collecting DHCP Server $($Scope.ScopeId) Scope"
38+
$SubnetMask = Convert-IpAddressToMaskLength $Scope.SubnetMask
39+
$inObj = [ordered] @{
40+
'Scope Id' = "$($Scope.ScopeId)/$($SubnetMask)"
41+
'Scope Name' = $Scope.Name
42+
'Scope Range' = "$($Scope.StartRange) - $($Scope.EndRange)"
43+
'Lease Duration' = Switch ($Scope.LeaseDuration) {
44+
"10675199.02:48:05.4775807" {"Unlimited"}
45+
default {$Scope.LeaseDuration}
46+
}
47+
'State' = $Scope.State
4548
}
46-
'State' = $Scope.State
49+
$OutObj += [pscustomobject]$inobj
50+
}
51+
catch {
52+
Write-PscriboMessage -IsWarning $_.Exception.Message
4753
}
48-
$OutObj += [pscustomobject]$inobj
4954
}
5055

5156
$TableParams = @{

Src/Private/Get-AbrWinDNSZone.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function Get-AbrWinDNSZone {
161161
'Zone Type' = $Zones.ZoneType
162162
'Replication Scope' = $Zones.ReplicationScope
163163
'Master Servers' = $Zones.MasterServers
164-
'DS Integrated' = $Zones.IsDsIntegrated
164+
'DS Integrated' = ConvertTo-TextYN $Zones.IsDsIntegrated
165165
}
166166
$OutObj += [pscustomobject]$inobj
167167
}

Src/Private/Get-AbrWinIISSummary.ps1

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrWinIISSummary {
55
.DESCRIPTION
66
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.2.0
8+
Version: 0.3.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -29,21 +29,26 @@ function Get-AbrWinIISSummary {
2929
$IISApplicationDefaults = Invoke-Command -Session $TempPssSession { (Get-IISServerManager).ApplicationDefaults }
3030
$IISSiteDefaults = Invoke-Command -Session $TempPssSession { (Get-IISServerManager).SiteDefaults | Select-Object ServerAutoStart,@{name='Directory'; Expression={$_.Logfile.Directory}} }
3131
if ($IISApplicationDefaults -and $IISSiteDefaults) {
32-
$IISServerManagerReport = [PSCustomObject]@{
33-
'Default Application Pool' = ($IISApplicationDefaults).ApplicationPoolName
34-
'Enabled Protocols' = (($IISApplicationDefaults).EnabledProtocols).toUpper()
35-
'Logfile Path' = ($IISSiteDefaults).Directory
36-
'Server Auto Start' = ConvertTo-TextYN ($IISSiteDefaults).ServerAutoStart
32+
try {
33+
$IISServerManagerReport = [PSCustomObject]@{
34+
'Default Application Pool' = ($IISApplicationDefaults).ApplicationPoolName
35+
'Enabled Protocols' = (($IISApplicationDefaults).EnabledProtocols).toUpper()
36+
'Logfile Path' = ($IISSiteDefaults).Directory
37+
'Server Auto Start' = ConvertTo-TextYN ($IISSiteDefaults).ServerAutoStart
38+
}
39+
$TableParams = @{
40+
Name = "IIS Host Settings"
41+
List = $false
42+
ColumnWidths = 25, 25, 25, 25
43+
}
44+
if ($Report.ShowTableCaptions) {
45+
$TableParams['Caption'] = "- $($TableParams.Name)"
46+
}
47+
$IISServerManagerReport | Table @TableParams
3748
}
38-
$TableParams = @{
39-
Name = "IIS Host Settings"
40-
List = $false
41-
ColumnWidths = 25, 25, 25, 25
49+
catch {
50+
Write-PscriboMessage -IsWarning $_.Exception.Message
4251
}
43-
if ($Report.ShowTableCaptions) {
44-
$TableParams['Caption'] = "- $($TableParams.Name)"
45-
}
46-
$IISServerManagerReport | Table @TableParams
4752
}
4853
}
4954
catch {

Src/Private/Get-AbrWinIISWebAppPool.ps1

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrWinIISWebAppPool {
55
.DESCRIPTION
66
Documents the configuration of Microsoft Windows Server in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.2.0
8+
Version: 0.3.0
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -33,14 +33,19 @@ function Get-AbrWinIISWebAppPool {
3333
Blankline
3434
$IISWebAppPoolsReport = @()
3535
foreach ($IISWebAppPool in $IISWebAppPools) {
36-
$TempIISWebAppPoolsReport = [PSCustomObject]@{
37-
'Name' = $IISWebAppPool.Name
38-
'Status' = $IISWebAppPool.State
39-
'CLR Ver' = $IISWebAppPool.ManagedRuntimeVersion
40-
'Pipeline Mode ' = $IISWebAppPool.ManagedPipelineMode
41-
'Start Mode' = $IISWebAppPool.StartMode
36+
try {
37+
$TempIISWebAppPoolsReport = [PSCustomObject]@{
38+
'Name' = $IISWebAppPool.Name
39+
'Status' = $IISWebAppPool.State
40+
'CLR Ver' = $IISWebAppPool.ManagedRuntimeVersion
41+
'Pipeline Mode ' = $IISWebAppPool.ManagedPipelineMode
42+
'Start Mode' = $IISWebAppPool.StartMode
43+
}
44+
$IISWebAppPoolsReport += $TempIISWebAppPoolsReport
45+
}
46+
catch {
47+
Write-PscriboMessage -IsWarning $_.Exception.Message
4248
}
43-
$IISWebAppPoolsReport += $TempIISWebAppPoolsReport
4449
}
4550

4651
$TableParams = @{

0 commit comments

Comments
 (0)