Skip to content

Instantly share code, notes, and snippets.

View davidwallis3101's full-sized avatar

David Wallis davidwallis3101

View GitHub Profile
@davidwallis3101
davidwallis3101 / registryTest.ps1
Last active March 1, 2024 08:51
Registry key / value enumeration
[CmdletBinding()]
Param(
$registryPath = "HKLM:\System\CurrentControlSet\Test"
)
Function Get-RegistryValue {
Param(
[Parameter(Mandatory)]
[string]$Path
)
#POC for authenticating via RSA with powershell
Function Get-AttributeValue {
[CmdletBinding()]
Param(
$Content,
$Token
)
@davidwallis3101
davidwallis3101 / main.c
Last active February 22, 2021 12:57
stm32f103 CAN send test
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
<#
https://stackoverflow.com/questions/57294829/create-a-specific-work-item-bug-for-each-failed-test-case-in-azure-devops-pipe
https://www.c-sharpcorner.com/blogs/create-work-items-in-visual-studio-team-services-using-powershell
https://medium.com/@sandeepsinh/create-work-item-with-rest-api-in-azure-devops-28f979a12f37
https://stackoverflow.com/questions/44707891/tfs-rest-api-for-workitem-missing-relations-section-in-json-returned
#>
<#
.SYNOPSIS
@davidwallis3101
davidwallis3101 / New-PowershellModuleWithPipeline.ps1
Created May 26, 2020 08:01
New-PowershellModuleWithPipeline.ps1
<#
.SYNOPSIS
New-PowershellModuleWithPipeline.ps1
.DESCRIPTION
Creates a powershell module, git repo, build and branch policies
.PARAMETER Server
The tfs/vsts/azure devops server host name
Function Add-AuthenticodeSigningToScript {
<#
.SYNOPSIS
Signs scripts during the build process
.DESCRIPTION
Uses an in-memory cert to sign files, rather than from one of the stores
.PARAMETER Path
@davidwallis3101
davidwallis3101 / Test-Unattend.ps1
Last active April 5, 2024 23:26
Validate Unattend.xml or AutoUnattend.xml meet the schema
<#
.SYNOPSIS
Test-Unattend.ps1
.DESCRIPTION
Test-Unattend.ps1
.NOTES
For additonal information please contact david.wallis@transunion.co.uk
@davidwallis3101
davidwallis3101 / RefactorPSM1.ps1
Created April 2, 2019 10:41
Refactor PSM1 powershell module into seperate ps1 files
<#
.SYNOPSIS
RefactorPSM1.ps1
.DESCRIPTION
RefactorPSM1.ps1
.NOTES
For additonal information please contact david@wallis2000.co.uk
using Stateless;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Xml;
using System.Xml.Serialization;
namespace StatelessTest
{
@davidwallis3101
davidwallis3101 / MergeAndSort.ps1
Created December 22, 2017 11:10
Merge And Sort Function with issues in certain pester versions?
Function MergeAndSort {
<#
.SYNOPSIS
MergeAndSort
.DESCRIPTION
Merges arrays and sorts, extracted for refactoring and adding unit tests
.PARAMETER VMNumbers
VMware Number array