Skip to content

Latest commit

 

History

History

ExtendFunction

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Apteco PS Modules - PowerShell functions extension

This module can be used to extend existing functions/cmdlets with more scripting and possibly additional parameters like

function Invoke-CoreWebRequest {
    
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)][string]$AdditionalString
    )
    DynamicParam { Get-BaseParameters "Invoke-WebRequest" }

    Process {
        Write-Host $AdditionalString
        $updatedParameters = Skip-UnallowedBaseParameters -Base "Invoke-WebRequest" -Parameters $PSBoundParameters
        Invoke-WebRequest @updatedParameters
    }

}

Installation

You can just download the whole repository here and pick this script or your can use PSGallery through PowerShell commands directly.

PSGallery

Installation via Install-Module

For installation execute this for all users scope

Find-Module -Repository "PSGallery" -Name "ExtendFunction" -IncludeDependencies | Install-Module -Verbose -Scope AllUsers

You can check the installed module with

Get-InstalledModule ExtendFunction

If you want to find more Apteco scripts in PSGallery, please search with

Find-Module -Repository "PSGallery" -Tag "Apteco"

Installation via local Repository

If your machine does not have an online connection you can use another machine to save the script from PSGallery website as a local file via your browser. You should have download a file with an .nupkg extension. Please don't forget to download all dependencies, too. You could simply unzip the file(s) and put the script somewhere you need it OR do it in an updatable manner and create a local repository if you don't have it already with

Set-Location "$( $env:USERPROFILE )\Downloads"
New-Item -Name "PSRepo" -ItemType Directory
Register-PSRepository -Name "LocalRepo" -SourceLocation "$( $env:USERPROFILE )\Downloads\PSRepo"
Get-PSRepository

Then put your downloaded .nupkg file into the new created PSRepo folder and you should see the module via

Find-Module -Repository LocalRepo

Then install the script like

Find-Module -Repository LocalRepo -Name ExtendFunction -IncludeDependencies | Install-Module -Scope CurrentUser -Verbose

That way you can exchange the .nupkg files and update them manually from time to time.

Uninstall

If you don't want to use the script anymore, just remove it with

Uninstall-Module -Name ExtendFunction

Github

Download the whole repository and to load the module, just execute

Set-Location ExtendFunction
Import-Module .\ExtendFunction