Quantcast
Viewing all articles
Browse latest Browse all 20598

Re: Add WMI node with CRUD.AddWMINode.ps1 failed

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.


Viewing all articles
Browse latest Browse all 20598

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>