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
| ##################### | |
| ## HP BIOS UPDATER ## | |
| ##################### | |
| # Params | |
| $HPIAWebUrl = "https://ftp.hp.com/pub/caps-softpaq/cmit/HPIA.html" # Static web page of the HP Image Assistant | |
| $BIOSPassword = "MyPassword" | |
| $script:ContainerURL = "https://mystorageaccount.blob.core.windows.net/mycontainer" # URL of your Azure blob storage container | |
| $script:FolderPath = "HP_BIOS_Updates" # the subfolder to put logs into in the storage container | |
| $script:SASToken = "mysastoken" # the SAS token string for the container (with write permission) |
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
| # video hub: https://techcommunity.microsoft.com/t5/video-hub/bd-p/VideoHub | |
| # Ignite API: - https://api.myignite.microsoft.com/api/session/all | |
| $ALLSESSIONS = Invoke-WebRequest -Uri "https://api.myignite.microsoft.com/api/session/all" | |
| $sessions = $ALLSESSIONS | ConvertFrom-Json; | |
| # Solution Areas | |
| $sessions | Select-Object -ExpandProperty SolutionArea | Group-Object | Select-Object Name | Sort-Object -Property Name | |
| # Search Samples |
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
| [CmdletBinding()] | |
| param | |
| ( | |
| [Parameter(Mandatory = $true)] | |
| [String] | |
| $ValidationXmlPath | |
| ) | |
| $xml = [xml](Get-Content -Path $ValidationXmlPath) | |
| $channels = $xml.Report.Channel.Channel |
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
| [CmdletBinding()] | |
| Param | |
| ( | |
| [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)] | |
| [string[]]$ComputerName = $env:COMPUTERNAME | |
| ) | |
| Begin | |
| { |
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
| ############################################################## | |
| ## ## | |
| ## Reads the most recent and next scheduled evaluation time ## | |
| ## for deployed Compliance Baselines from the Scheduler.log ## | |
| ## ## | |
| ############################################################## | |
| #requires -RunAsAdministrator | |
| # Get Baselines from WMI |
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
| Param ( | |
| ## The directory into which the user wishes to download the files. | |
| [string]$directory = $PSScriptRoot, | |
| ## Optional parameter allowing the user to specifiy the code (or comma seperated codes) of the video(s) they wish to download. | |
| [string]$sessionCodes = "", | |
| [switch]$onlyppt, | |
| [switch]$onlyvideo | |
| ) | |
| ### Variables ### |
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
| { | |
| /* | |
| USER (GLOBAL) SETTINGS | |
| ~/Library/Application Support/Code-Insiders/User/settings.json | |
| */ | |
| /* | |
| *************** | |
| *** WARM UP *** | |
| *************** |
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 Save-KBFile { | |
| <# | |
| .SYNOPSIS | |
| Downloads patches from Microsoft | |
| .DESCRIPTION | |
| Downloads patches from Microsoft | |
| .PARAMETER Name | |
| The KB name or number. For example, KB4057119 or 4057119. |
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
| using namespace System.Management.Automation | |
| using namespace System.Text | |
| class PSTextEncodingConverter : PSTypeConverter { | |
| hidden | |
| [hashtable] | |
| $ConversionTable = @{ | |
| 'ASCII' = [System.Text.Encoding]::ASCII | |
| 'ANSI' = [System.Text.Encoding]::ASCII | |
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
| $CommandName = $MyInvocation.MyCommand.Name.Replace(".Tests.ps1", "") | |
| Describe "$CommandName Unit Tests" -Tag 'UnitTests' { | |
| Context "Validate parameters" { | |
| $defaultParamCount = 11 | |
| [object[]]$params = (Get-ChildItem "function:\$CommandName").Parameters.Keys | |
| $knownParameters = 'Start','Interval','Units','Limit','SkipStart' | |
| $paramCount = $knownParameters.Count | |
| It "Should contain specific parameters" { | |
| ( (Compare-Object -ReferenceObject $knownParameters -DifferenceObject $params -IncludeEqual | Where-Object SideIndicator -eq "==").Count ) | Should Be $paramCount |