Forum Discussion
wmjdgla
Nov 07, 2022Copper Contributor
Unexpected behavior of Set-SecureBootUEFI with the -ContentFilePath parameter
I'm using the following 3 commands to add a new key to my Secure Boot db: $CurrentTime=Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ";Format-SecureBootUEFI -Name db -SignatureOwner 12345678-1234-1234-1234...
Varun_Ghildiyal
Mar 08, 2023Iron Contributor
It appears that the behavior you are experiencing with the Set-SecureBootUEFI cmdlet is unexpected and not documented. In general, PowerShell cmdlets are designed to work with pipeline input, so it should be possible to pipe the output of Format-SecureBootUEFI directly to Set-SecureBootUEFI without the need for additional prompts.
One possible explanation for the behavior you are observing is that the format of the output from Format-SecureBootUEFI is different when it is written to a file versus when it is output as a PowerShell object. It's possible that the file format includes additional information that allows Set-SecureBootUEFI to automatically determine the name and time parameters, while the PowerShell object format does not.
Without more information about the specific implementation of the cmdlets and their interaction with the Secure Boot system, it's difficult to provide a definitive answer. However, you may want to consider filing a bug report or support request with the provider of the Secure Boot PowerShell module to report this unexpected behavior
One possible explanation for the behavior you are observing is that the format of the output from Format-SecureBootUEFI is different when it is written to a file versus when it is output as a PowerShell object. It's possible that the file format includes additional information that allows Set-SecureBootUEFI to automatically determine the name and time parameters, while the PowerShell object format does not.
Without more information about the specific implementation of the cmdlets and their interaction with the Secure Boot system, it's difficult to provide a definitive answer. However, you may want to consider filing a bug report or support request with the provider of the Secure Boot PowerShell module to report this unexpected behavior