From f0649ee2f9dd098d296485ab1c03272319470e9a Mon Sep 17 00:00:00 2001 From: Jaap Brasser Date: Thu, 11 Mar 2021 01:00:05 +0100 Subject: [PATCH] =?UTF-8?q?Warning=20message=20added=20#733=20=E2=9A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rubrik/Public/New-RubrikMount.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rubrik/Public/New-RubrikMount.ps1 b/Rubrik/Public/New-RubrikMount.ps1 index e16584038..fa1d51d16 100644 --- a/Rubrik/Public/New-RubrikMount.ps1 +++ b/Rubrik/Public/New-RubrikMount.ps1 @@ -83,6 +83,10 @@ function New-RubrikMount if(-not $PSBoundParameters.ContainsKey('DisableNetwork')) { $Resources.Body.Remove('disableNetwork') } if(-not $PSBoundParameters.ContainsKey('RemoveNetworkDevices')) { $Resources.Body.Remove('removeNetworkDevices') } if(-not $PSBoundParameters.ContainsKey('PowerOn')) { $Resources.Body.Remove('powerOn') } + + if ($id -match ':') { + Write-Warning -Message ('"{0}" specified as ID, the ID should be a snapshot ID not an object ID' -f $Id) + } $uri = New-URIString -server $Server -endpoint ($resources.URI) -id $id $uri = Test-QueryParam -querykeys ($resources.Query.Keys) -parameters ((Get-Command $function).Parameters.Values) -uri $uri