File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
[CmdletBinding ()]
2
2
param (
3
- [string ]$Path
3
+ [string ]$Path ,
4
+ [string ]$Version = ' master'
4
5
)
5
6
6
7
$localpath = $ (Join-Path - Path (Split-Path - Path $profile ) - ChildPath ' \Modules\ReportingServicesTools' )
@@ -39,7 +40,7 @@ if ((Get-Command -Module ReportingServicesTools).count -ne 0)
39
40
Remove-Module ReportingServicesTools - ErrorAction Stop
40
41
}
41
42
42
- $url = ' https://github.com/Microsoft/ReportingServicesTools/archive/master .zip'
43
+ $url = " https://github.com/Microsoft/ReportingServicesTools/archive/$Version .zip"
43
44
44
45
$temp = ([System.IO.Path ]::GetTempPath()).TrimEnd(" \" )
45
46
$zipfile = " $temp \ReportingServicesTools.zip"
@@ -91,11 +92,11 @@ $shell = New-Object -COM Shell.Application
91
92
$zipPackage = $shell.NameSpace ($zipfile )
92
93
$destinationFolder = $shell.NameSpace ($temp )
93
94
$destinationFolder.CopyHere ($zipPackage.Items ())
94
- Move-Item - Path " $temp \ReportingServicesTools-master \*" $path
95
+ Move-Item - Path " $temp \ReportingServicesTools-$Version \*" $path
95
96
Write-Output " ReportingServicesTools has been successfully downloaded to $path !"
96
97
97
98
Write-Output " Cleaning up..."
98
- Remove-Item - Path " $temp \ReportingServicesTools-master "
99
+ Remove-Item - Path " $temp \ReportingServicesTools-$Version "
99
100
Remove-Item - Path $zipfile
100
101
101
102
Write-Output " Importing ReportingServicesTools Module..."
You can’t perform that action at this time.
0 commit comments