Created an install.ps1 script, in lieu of being able to upload it directly to a PSGallery-like package manager.
This commit is contained in:
parent
85c622f894
commit
9c9afd413d
12
Install.ps1
Normal file
12
Install.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
# Setup variables
|
||||
$GitURI = "https://git.wnd.sh/n/PSGraylog/archive/main.zip"
|
||||
# Defaults to the first module path, however you can change this to any path you wish (provided it's in your $PSModulePath)
|
||||
$OutputPath = "$($env:PSModulePath.Split(";")[0])/PSGraylog"
|
||||
Invoke-WebRequest $GitURI -OutFile "$OutputPath.zip"
|
||||
Expand-Archive "$OutputPath.zip" $OutputPath
|
||||
# The archive nests the files, so we need to move the up a level
|
||||
Move-Item "$OutputPath/PSGraylog/*" $OutputPath
|
||||
# Remove the excess PSGraylog directory (it's empty)
|
||||
Remove-Item "$OutputPath/PSGraylog"
|
||||
# Remove the archive
|
||||
Remove-Item "$OutputPath.zip"
|
Loading…
Reference in New Issue
Block a user