au_setup.ps1 797 B

1234567891011121314151617
  1. # WMF 3/4 only
  2. if ($PSVersionTable.PSVersion -lt $(New-Object System.Version("5.0.0.0"))) {
  3. choco install dotnet4.5.1 -y
  4. choco upgrade powershell-packagemanagement --ignore-dependencies -y
  5. }
  6. $refreshenv = Get-Command refreshenv -ea SilentlyContinue
  7. if ($null -ne $refreshenv -and $refreshenv.CommandType -ne 'Application') {
  8. refreshenv # You need the Chocolatey profile installed for this to work properly (Choco v0.9.10.0+).
  9. } else {
  10. Write-Warning "We detected that you do not have the Chocolatey PowerShell profile installed, which is necessary for 'refreshenv' to work in PowerShell."
  11. }
  12. Install-PackageProvider -Name NuGet -Force
  13. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  14. Install-Module au -Scope AllUsers
  15. Get-Module au -ListAvailable | Select-Object Name, Version