tdanner,
Thank you for pointing this out. Actually, the sample scripts that came with the SDK 1.9 have a longer dash (hyphen) character on some of the parameter lines. That was the reason why the script failed.
One more thing I still have a problem is I am not able to add the WMI credential for the node which is handled by the follow code:
$credentialName = 'mycredentialname' # from Manage Windows Credentials of the Settings page.
#Getting the Credential ID
$credentialId = Get-SwisData $swis "SELECT ID FROM Orion.Credential where Name = '$credentialName'"
if (!$credentialId) {
Throw "Can't find the Credential with the provided Credential name '$credentialName'."
}
#Adding NodeSettings
$nodeSettings = @{
NodeID=$nodeProps["NodeID"];
SettingName="WMICredential";
SettingValue=($credentialId.ToString());
}
#Creating node settings
$newNodeSettings = New-SwisObject $swis -EntityType "Orion.NodeSettings" -Properties $nodeSettings
What did I do wrong?
Thanks again.