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
| ############################################################################################################ | |
| ## Downloads the secure boot high confidence database from GitHub and uploads into our Inventory database ## | |
| ############################################################################################################ | |
| $highConfidenceDirectory = "C:\Temp\HighConfidenceBuckets" | |
| # Create the directory if it doesn't exist | |
| if (-not (Test-Path -Path $highConfidenceDirectory)) | |
| { | |
| $null = New-Item -ItemType Directory -Path $highConfidenceDirectory | |
| } |
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
| ############################################################################################################################ | |
| ## PowerShell script to determine the Secure Boot certificate update confidence level of a device based on the local copy ## | |
| ## of the High Confidence database provided by Microsoft. ## | |
| ############################################################################################################################ | |
| #Requires -RunAsAdministrator | |
| #Requires -Version 7 | |
| # Check that the BucketConfidenceData CAB file exists in the specified directory | |
| $confidenceCab = Get-ChildItem -Path $env:SystemRoot\System32\SecureBootUpdates -Filter *.cab -ErrorAction SilentlyContinue |
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
| #Requires -RunAsAdministrator | |
| # Function to read Secure Boot databases (db, KEK, PK, dbx) and parse entries | |
| # Thanks to Chat-GPT 5 | |
| function Read-SecureBootDatabase { | |
| [CmdletBinding()] | |
| param( | |
| [ValidateSet('db','KEK','PK','dbx')] | |
| [string]$DatabaseName = 'db', |
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
| ## ########################################################################################### | |
| ## Azure Automation Runbook to retrieve Windows Update Catalog entries from Microsoft Graph ## | |
| ############################################################################################## | |
| #region ------------------------------------- Permissions ------------------------------------- | |
| # This runbook requires the following permissions: | |
| # Delegated permissions: | |
| # - WindowsUpdates.ReadWrite.All | |
| # - Member of the'Intune Administrator' or 'Windows Update Deployment Administrator' Entra role | |
| # Application permissions: |
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
| function Invoke-AIChat { | |
| <# | |
| .SYNOPSIS | |
| Invokes an AI chat model to generate responses based on user prompts. | |
| .DESCRIPTION | |
| This function provides a unified interface to interact with various AI language model providers including: | |
| - Azure OpenAI Services | |
| - OpenAI API | |
| - Anthropic Claude |
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
| function Invoke-GoogleAIChat { | |
| <# | |
| .SYNOPSIS | |
| PowerShell function for Google Chat API interaction via REST. | |
| .DESCRIPTION | |
| Provides a robust interface to Google Chat API with features including: | |
| - Conversation history management | |
| - Token usage tracking | |
| - Markdown rendering support |
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
| function Invoke-OpenAIChat { | |
| <# | |
| .SYNOPSIS | |
| PowerShell function for OpenAI Chat API interaction via REST. | |
| .DESCRIPTION | |
| Provides a robust interface to OpenAI Chat API with features including: | |
| - Conversation history management | |
| - Token usage tracking | |
| - Markdown rendering support |
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
| function Invoke-AnthropicAIChat { | |
| <# | |
| .SYNOPSIS | |
| PowerShell function for Anthropic (Claude) AI Chat API interaction via REST. | |
| .DESCRIPTION | |
| Provides a robust interface to Anthropic (Claude) AI Chat API with features including: | |
| - Conversation history management | |
| - Token usage tracking | |
| - Markdown rendering support |
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
| function Invoke-AzOpenAIChat { | |
| <# | |
| .SYNOPSIS | |
| PowerShell function for Azure OpenAI Chat API interaction via REST. | |
| .DESCRIPTION | |
| Provides a robust interface to Azure OpenAI Chat API with features including: | |
| - Conversation history management | |
| - Token usage tracking | |
| - Markdown rendering support |
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
| Function Get-EntraAccessToken { | |
| [CmdletBinding(DefaultParameterSetName = 'Default')] | |
| param ( | |
| [Parameter(ParameterSetName = "UseWAM")] | |
| [Parameter(ParameterSetName = "GraphSDK")] | |
| [Parameter(ParameterSetName = "ACRSClaim")] | |
| [Parameter(ParameterSetName = "AzureIdentity")] | |
| [Parameter(ParameterSetName = "Default")] | |
| [string] | |
| $ClientId = "14d82eec-204b-4c2f-b7e8-296a70dab67e", # Microsoft Graph PowerShell |
NewerOlder