From: Ardis Lu Date: Sat, 4 Feb 2023 05:58:06 +0000 (-0800) Subject: Add install script X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=a6643ae3ff684dcdebb55806c31f7f58294a8a60;p=ArdisUtilities Add install script --- diff --git a/install.ps1 b/install.ps1 new file mode 100644 index 0000000..dba300b --- /dev/null +++ b/install.ps1 @@ -0,0 +1,11 @@ +# Create a temporary working folder +$tempFolder = Join-Path $Env:Temp $(New-Guid) +New-Item -Type Directory -Path $tempFolder | Out-Null + +# Download and extract the repository from GitHub +$zipFile = Join-Path $tempFolder /ArdisUtilities.zip +Invoke-WebRequest 'https://github.com/ardislu/ArdisUtilities/archive/refs/heads/main.zip' -OutFile $zipFile +Expand-Archive $zipFile $tempFolder + +# Import the module from the extraction +Import-Module (Join-Path $tempFolder /ArdisUtilities-main/ArdisUtilities)