Skip to content

Instantly share code, notes, and snippets.

View SAPIENTechnologies's full-sized avatar

SAPIEN Technologies, Inc. SAPIENTechnologies

View GitHub Profile
@SAPIENTechnologies
SAPIENTechnologies / Test-PSFileHash.ps1
Created December 20, 2016 18:09 — forked from juneb/Test-PSFileHash.ps1
Verifies that the file hash of a PowerShell open-source installer matches expected value.
<#
.SYNOPSIS
Verifies that the file hash of a PowerShell open-source installer matches expected value.
.DESCRIPTION
Compares the file hash of a PowerShell open-source installation file to the expected file hash value. Supports
all installation file types, including msi, zip, rpm, deb, pkg, and tar.gz, beginning with installers for PowerShell
release 6.0.0.9.
To get a list of installer file names, but not test the file hash, use the ListOnly parameter.
@SAPIENTechnologies
SAPIENTechnologies / Start-SAPIENForum.ps1
Last active December 19, 2016 20:57
Opens or gets a SAPIEN forum web page.
<#
.SYNOPSIS
Gets or opens a SAPIEN forum page.
.DESCRIPTION
The Start-SAPIENForum.ps1 script opens the SAPIEN forum that you specify in
your default internet browser window. It can also search the forums (all of
them) for the search term that you specify.
To open a particular forum, use the Name parameter. If the value of the Name
@SAPIENTechnologies
SAPIENTechnologies / Get-InstallationPath.ps1
Last active December 14, 2016 18:04
Find an installation directory in the registry; more reliable than file system path search.
<#
.SYNOPSIS
Gets the installation directory for a program in the registry.
.DESCRIPTION
Get-InstallationPath gets the installation path for a program in the InstallProperties registry key. This method is much more reliable and change-resistant than searching the file system with partial paths.
.
The function returs a custom object with the DisplayName, Publisher, and InstallationPath so you can confirm that the path returns is for the intended program.
.
If the script cannot find the installation path for the program, it generates a non-terminating error.