You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticied this when running the commands Set-isiClusterOwner -location "Bergen"
Expected: The command should prompt if I want to continue, stating the cluster I'm performing the action on.
Actual:
Set-isiClusterOwner : The variable '$parameter1' cannot be retrieved because it has not been set.
At line:1 char:1
+ Set-isiClusterOwner -location "Bergen"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (parameter1:String) [Set-isiClusterOwner], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined,Set-isiClusterOwner
Going through IsilonPlatformSet.ps1 and IsilonPlatformRemove.ps1, I notice several cases where $parameter1 is not set.
I tried to work around this by adding the line if (-not (Test-Path variable:parameter1) ){$parameter1 = "Inhereted from session"}.
This allows me to run with -WhatIf, but I then see a new error:
Set-isiClusterOwner : The variable '$ISIObject' cannot be retrieved because it has not been set.
At line:1 char:1
+ Set-isiClusterOwner -location "Bergen" -WhatIf
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (ISIObject:String) [Set-isiClusterOwner], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined,Set-isiClusterOwner
This made me investigate this error (VariableIsUndefined), and I found that it's an error thrown when a variable is undefined and Set-StrictMode -Version Latest is set. This is the case here (it's set in IsilonPlatforSet.ps1).
I noticied this when running the commands
Set-isiClusterOwner -location "Bergen"
Expected: The command should prompt if I want to continue, stating the cluster I'm performing the action on.
Actual:
Going through IsilonPlatformSet.ps1 and IsilonPlatformRemove.ps1, I notice several cases where
$parameter1
is not set.This may be related to #12 .
The text was updated successfully, but these errors were encountered: