Skip to content

Commit

Permalink
Final update for 3.10
Browse files Browse the repository at this point in the history
#Version 3.10 23-Apr-2022
#	Added Windows Server 2022 to AD Schema version 88
#	Fixed some text output alignment
#	In Function OutputNicItem, fixed several issues with DHCP data
#	Replaced all Get-WmiObject with Get-CimInstance
#	Some general code cleanup
#	Updated schema numbers for Exchange CUs
#		"15334" = "Exchange 2016 CU21-CU23"
#		"17003" = "Exchange 2019 CU10-CU12"
  • Loading branch information
CarlWebster authored Apr 25, 2022
1 parent 30cfa23 commit cb3888b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ADDS_Inventory_V3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,15 @@ Function OutputNicItem
If($nic.dhcpenabled)
{
$DHCPLeaseObtainedDate = $nic.dhcpleaseobtained.ToLocalTime()
$DHCPLeaseExpiresDate = (Get-Date).AddSeconds([UInt32]::MaxValue).ToLocalTime()
If($nic.DHCPLeaseExpires -lt $nic.DHCPLeaseObtained)
{
#Could be an Azure DHCP Lease
$DHCPLeaseExpiresDate = (Get-Date).AddSeconds([UInt32]::MaxValue).ToLocalTime()
}
Else
{
$DHCPLeaseExpiresDate = $nic.DHCPLeaseExpires.ToLocalTime()
}
}

If($MSWORD -or $PDF)
Expand Down

0 comments on commit cb3888b

Please sign in to comment.