Skip to content

Instantly share code, notes, and snippets.

View KurtDeGreeff's full-sized avatar

Kurt De Greeff KurtDeGreeff

View GitHub Profile
@SMSAgentSoftware
SMSAgentSoftware / Invoke-HPBIOSUpdate.ps1
Last active January 23, 2024 06:01
Silently updates an HP BIOS using HP Image Assistant
#####################
## 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)
@alexverboon
alexverboon / ignitesessionfinder.ps1
Last active November 26, 2021 20:03
PowerShell session finder for Ignite and video hub
# 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
@rchaganti
rchaganti / clusterValidationReport.ps1
Created January 30, 2020 13:15
Parses the XML validation report from Test-Cluster into a PowerShell Object
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true)]
[String]
$ValidationXmlPath
)
$xml = [xml](Get-Content -Path $ValidationXmlPath)
$channels = $xml.Report.Channel.Channel
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)]
[string[]]$ComputerName = $env:COMPUTERNAME
)
Begin
{
@SMSAgentSoftware
SMSAgentSoftware / Get-CMBaselineEvaluations.ps1
Last active May 1, 2020 08:27
Reads the most recent and next scheduled evaluation times on the local machine for ConfigMgr Compliance Baselines
##############################################################
## ##
## Reads the most recent and next scheduled evaluation time ##
## for deployed Compliance Baselines from the Scheduler.log ##
## ##
##############################################################
#requires -RunAsAdministrator
# Get Baselines from WMI
@vniklas
vniklas / download-resources.ps1
Last active November 12, 2019 19:09
Download MS Ignite sessions on Windows or Linux/Mac OS X
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 ###
@chrisdias
chrisdias / settings.json
Created November 4, 2019 20:45
Chris Dias' settings.json for VS Code
{
/*
USER (GLOBAL) SETTINGS
~/Library/Application Support/Code-Insiders/User/settings.json
*/
/*
***************
*** WARM UP ***
***************
@potatoqualitee
potatoqualitee / Save-KBFile.ps1
Last active July 5, 2024 11:31
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
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.
@IISResetMe
IISResetMe / PSTextEncodingConverter.class.ps1
Created May 28, 2019 18:32
System.Text.Encoding converter to easy argument conversion
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
@exactmike
exactmike / Get-DateSeries.Tests.ps1
Created February 11, 2019 23:25
Get-DateSeries
$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