Microsoft Virtualization Discussions

How to change SVM's subtype in powershell

AllenChang
104 Views

I want to change a SVM's subtype in powershell,

So I create template and user Update-Ncvserver command to perform

the code is like this

$qsubtype = Get-NcVserver -Template
Initialize-NcObjectProperty $qsubtype Vserver
$qsubtype.Vserver = (Get-NcVserver svmtest).Vserver
$asubtype = Get-NcVserver -Template
Initialize-NcObjectProperty $asubtype Subtype,VserverSubtype
$asubtype.Subtype = 'default'
Update-NcVserver -Query $qsubtype -Attributes $asubtype

NcController : 192.168.1.87
SuccessCount : 1
FailureCount : 0
InprogressCount :
SuccessList : {svmtest}
FailureList : {}
InprogressList :

 

And I can see the result is success from the output

But when I verify,I found the subtype is stlll not change

PS D:\> (Get-NcVserver svmtest).subtype
default
PS D:\> (Get-NcVserver svmtest).VserverSubtype
default

 

What's wrong with my powershell code?

How can I make it sucessful?

 

Thanks

 

 

 

 

 

0 REPLIES 0
Public