diff --git a/Install.ps1 b/Install.ps1 new file mode 100644 index 0000000..52d1bf9 --- /dev/null +++ b/Install.ps1 @@ -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" \ No newline at end of file