SQL Powershell Module installieren
Zur Navigation springen
Zur Suche springen
Install-Module -Name SqlServer -Proxy '<Proxy Server>' -ProxyCredential (Get-Credential) [-AllowClobber] #Allow Clobber wird auf SQL Servern benötigt, wenn schon das SQLPS Modul installiert ist.
Falls Kein Repository installiert ist, muss das PSGallery Repo installiert werden.
Hinter einem Proxy muss zuvor folgendes ausgeführt werden:
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('<Proxy Server>')
[system.net.webrequest]::defaultwebproxy.credentials = (Get-Credential)
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true
Register-PSRepository -Default Install-Module -Name SqlServer