#Install-Module 离线安装
$parameters = @{ Name = "NichengRep" SourceLocation = "D:software" PublishLocation = "D:software" InstallationPolicy = 'Trusted' } Register-PSRepository @parameters Get-PSRepository Install-Module -Name SqlServer -RequiredVersion 21.1.0000000 -Repository NichengRep
#Install-Package 离线安装,指定文件夹即可
Install-Package SqlServer -Source D:software
.nupkg包 下载URL地址:https://www.powershellgallery.com/
可从此地址离线下载,点击手动下载即可