This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\Servicing" | |
| $valueName = "UEFICA2023Status" | |
| try { | |
| $value = (Get-ItemProperty -Path $regPath -Name $valueName -ErrorAction Stop).$valueName | |
| Write-Output "The value of the UEFICA2023 state is: $value" | |
| } catch { | |
| Write-Output "Failed to read registry value" | |
| exit 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $RenewalTime = 8 | |
| try { | |
| # Run klist to retrieve the Kerberos ticket information | |
| $klistOutput = & klist | |
| # Array to store ticket details | |
| $ticketDetails = @() | |
| # Extract the ticket details from the klist output |