Skip to content

Instantly share code, notes, and snippets.

June Blender juneb

Block or report user

Report or block juneb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@juneb
juneb / Test-PSFileHash.ps1
Last active Dec 20, 2016
Verifies that the file hash of a PowerShell open-source installer matches expected value.
View Test-PSFileHash.ps1
<#
.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.
View Get-DotNetVersion.ps1
<#
.SYNOPSIS
Gets the installed .NET versions.
.DESCRIPTION
Gets the versions of all installed Microsoft .NET Framework builds
installed on the local computer.
.EXAMPLE
.\Get-DotNetVersion
@juneb
juneb / Get-LatestModule.ps1
Created Jul 1, 2016
Gets the newest version of each module on the system.
View Get-LatestModule.ps1
<#
.SYNOPSIS
Gets the newest version of each module on the system.
.DESCRIPTION
Gets the newest version of each module on the system. Designed for PowerShell 5.0 where you can have multiple versions of the same module in different directories or in the same directory (in different version subdirectories). Returns only one version of each module.
.EXAMPLE
$LatestModules = .\Get-LatestModule.ps1
@juneb
juneb / Get-ParameterDescription.ps1
Created Jun 16, 2016
Gets the descriptions of a parameter from different commands in one or more modules.
View Get-ParameterDescription.ps1
<#
.SYNOPSIS
Gets the descriptions of a parameter from different
cmdlets in one or more modules.
.DESCRIPTION
The Get-ParameterDescriptionfromXMLFile script returns the
description of a parameter from cmdlets in one/more modules.
If the cmdlet has the parameter, but the description is blank,
the script returns the blank description.
@juneb
juneb / Get-ParameterType.ps1
Created Jun 16, 2016
Gets command parameters that have the specified parameter type
View Get-ParameterType.ps1
<#
.SYNOPSIS
Gets parameters with the specified parameter type
.DESCRIPTION
The Get-ParameterType.ps1 gets parameters with the specified parameter type. It returns the command name, parameter name, and parameter type in a PSCustomObject.
This script fixes the deficiency in 'Get-Command -ParameterType', which returns CommandInfo objects, but doesn't list the names of parameters that have the specified parameter type.
However, because it uses 'Get-Command -ParameterType,' it shares is primary limitation: it gets only parameters in the current session, not in all installed modules.
@juneb
juneb / InvokePesterPathHashtable.Tests.ps1
Last active Jun 16, 2016
Tests the Path hashtable feature of Pester 3.4.0. This script was used as a bug repro.
View InvokePesterPathHashtable.Tests.ps1
<#
.SYNOPSIS
Tests the Path hashtable feature of Pester 3.4.0.
.DESCRIPTION
Demonstrates that Invoke-Pester with a Path hashtable:
Invoke-Pester -Script @{Path=<path>}
does not get default values set for script parameters.
In this case, with a $ModuleName parameter, the error is generated for line:
@juneb
juneb / New-CustomMenu.ps1
Last active Jun 16, 2016
Creates and opens a custom menu INF for PrimalScript and PowerShell Studio.
View New-CustomMenu.ps1
<#
.SYNOPSIS
Creates and opens a custom menu INF for PrimalScript and PowerShell Studio.
.DESCRIPTION
This script creates a CustomMenu.inf file, the file that PrimalScript and
PowerShell Studio use as the source for custom tools.
When you use the Program parameter, the script creates a CustomMenu.inf in
the default location, $env:SystemDrive\SAPIEN\<Program>\<latest>.
@juneb
juneb / Start-SAPIENForum.ps1
Last active Dec 19, 2016
Opens the SAPIEN forum that you specify in your default internet browser window.
View Start-SAPIENForum.ps1
<#
.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
You can’t perform that action at this time.