See what I did there? πŸ˜‰

I’ve talked about creating your own script repository in the past. I like having some sort of structure. GitHub goes further. It also helps with version control and so much more!. My idea of version control is adding -v# after any script, don’t judge me…

These days everything seems to be in GitHub! The PowerShell DSC Resource Modules are there. Azure PowerShell Module & Templates are there. You can even deploy Azure Resources from GitHub! You can also use Git for continuous deployment for website content/apps.

Visual Studio supports GitHub as well for continuous delivery

I just discovered Gist! Doug Finke created a GUI to help create a template to extract Data from text files. I noticed that the code was straight out of GitHub. So I did a little bit of googling and sure enough, I found out how! Gist lets you share snippets of code with others. All you need to do is copy & paste the url and you’re good to go!

Author: I. Strachan
Version: 1.0
Version History:
Purpose: Extract The AppxManifest.xml file from the .appv file.
Get the Version,PackageID and VersionID from AppxManifest.xml
function Get-AppxManifest {
param (
[Parameter(Mandatory = $true)]
[ValidateScript({ Test-Path Path $_ PathType Container })]
#Load Assembly for Zip
Add-Type assembly ''
#get AppV Files from parent Folder
$appVFiles = Get-ChildItem Path $Source Recurse Filter ('*.appv')
$manifestFolder = "$($PSScriptRoot)\Manifest"
if(!(Test-Path Path $manifestFolder)) {
Write-Verbose 'Manifest folder does not exist. Creating folder'
New-item Path $manifestFolder Type Directory | Out-Null
#get AppxManifest.xml content
$appVFiles |
ForEach-Object {
$FileName = $_.BaseName
$FilePath = $_.FullName
#Create handle in orde to dispose File later on
$hndZipFile = [System.IO.Compression.ZipFile]::OpenRead($_.FullName)
$hndZipFile.Entries |
Where-Object { $_.FullName -like 'AppxManifest.xml' } |
ForEach-Object {
$File = Join-Path $manifestFolder "$($FileName)_$($_.FullName)"
[IO.Compression.ZipFileExtensions]::ExtractToFile($_, $File, $true)
#Typecast to Get XML
[XML]$xml = Get-Content $File
Version = $xml.Package.Identity.Version
PackageId = $xml.Package.Identity.PackageId
VersionId = $xml.Package.Identity.VersionId
DisplayName = $xml.Package.Properties.DisplayName
AppVPath = $FilePath
#Close handle on File

Best part of Gist is having you code “As-Is”. Using WordPress plugins sometimes gets the “<#” , “#>” or “&” wrong, replacing it with HTML equivalent. This way you’ll never have to worry about your code being mutilated anymore! Sweet!!!

Here’s an articleΒ to help you on your way getting started with GitHub.


GitHub is (going to be) one of those things that you need to master…

Hope it’s worth something to you…




2 thoughts on “Git with the program!

  1. Dirk

    Hi Irwin, I have been planning to start using Gist for my blog too already for a while. After reading your post I finally got started. I’ve forked Doug’s repo and made some minor changes to make it work for me. Thanks a lot πŸ™‚

    Liked by 1 person


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s