Skip to content

Commit 32472e8

Browse files
script analyser wants this to be supports should process
1 parent 79b90ca commit 32472e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Install-DbaSSMS.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<#
1+
<#
22
.SYNOPSIS
33
Uses the Microsoft website to get the latest download link for SSMS full install or SSMS upgrade and
44
silently installs it. It WILL KILL SSMS is it is already running
@@ -88,11 +88,14 @@ function Install-DbaSSMS {
8888
}
8989
#endregion
9090
function Start-DbaFileDownload {
91+
[CmdletBinding(SupportsShouldProcess = $true)]
9192
Param(
9293
$url,
9394
$OutputFile
9495
)
95-
(New-Object System.Net.WebClient).DownloadFile($url, $outputFile)
96+
if ($PSCmdlet.ShouldProcess("$ENV:COMPUTERNAME", "Downloading file from $url to $outputFile ")) {
97+
(New-Object System.Net.WebClient).DownloadFile($url, $outputFile)
98+
}
9699
}
97100

98101
#region Get the download link

0 commit comments

Comments
 (0)