An open API service indexing awesome lists of open source software.

https://github.com/cviorel/Deploy-Lab

Deploy a SQL Server Availability Group
https://github.com/cviorel/Deploy-Lab

Last synced: 3 months ago
JSON representation

Deploy a SQL Server Availability Group

Awesome Lists containing this project

README

        

# Deploy-Lab

```powershell
if (!(Test-Path -Path 'C:\Temp')) {
New-Item -Path 'C:\Temp' -ItemType Directory | Out-Null
}

$temp = ([System.IO.Path]::GetTempPath()).TrimEnd("\")
$zipfile = "$temp\main.zip"
$rnd = Get-Random

Invoke-RestMethod -Uri 'https://api.github.com/repos/cviorel/Deploy-Lab/zipball' -OutFile $zipfile

Unblock-File -Path $zipfile -Confirm:$false
Expand-Archive -Path $zipfile -DestinationPath "$temp\$rnd"

$unzipped = (Get-ChildItem -Path "$temp\$rnd" -Directory).FullName
Copy-Item -Path $unzipped\* -Recurse -Destination C:\Temp -Force

Remove-Item -Path $zipfile -Force | Out-Null
Remove-Item -Path "$temp\$rnd" -Recurse | Out-Null

Set-Location -Path C:\Temp
```