Microsoft Virtualization Discussions

Set NaOption Wins Servers

marickmeintjes
2,777 Views

Hi,

Can anyone tell me if I'm doing something wrong?

I'm trying to add 2 wins server IP addresses, the command I'm using is

Set-NaOption cifs.wins_servers 192.168.1.111,192.168.2.111

Which gives me an error, all the other options work.

Thanks in advance for any help.

1 ACCEPTED SOLUTION

sizemore
2,777 Views

PowerShell is interpreting the comma as an array, and as such is passing a collection object instead of a string… just add quotes.

10.58.88.61 [0:45]≥ Set-NaOption -OptionName cifs.wins_servers -OptionValue 10.58.88.21,10.58.88.22

Set-NaOption : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'OptionValue'.

 

Specified method is not supported.

10.58.88.61 [0:46]≥ Set-NaOption -OptionName cifs.wins_servers -OptionValue "10.58.88.21,10.58.88.22"

ClusterConstraint                       Name                                    Value

-----------------                       ----                                    -----

none                                    cifs.wins_servers                       10.58.88.21,10.58.88.22

View solution in original post

1 REPLY 1

sizemore
2,778 Views

PowerShell is interpreting the comma as an array, and as such is passing a collection object instead of a string… just add quotes.

10.58.88.61 [0:45]≥ Set-NaOption -OptionName cifs.wins_servers -OptionValue 10.58.88.21,10.58.88.22

Set-NaOption : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'OptionValue'.

 

Specified method is not supported.

10.58.88.61 [0:46]≥ Set-NaOption -OptionName cifs.wins_servers -OptionValue "10.58.88.21,10.58.88.22"

ClusterConstraint                       Name                                    Value

-----------------                       ----                                    -----

none                                    cifs.wins_servers                       10.58.88.21,10.58.88.22

Public