I'm new to scripting so, has anyone written a script to delete a node using the SDK? I see the post for deleting a volume - is it the same or is Java the only method as described in SDK guide?
Thanks, Denise
What language are you working in? PowerShell?
PowerShell & VB.
In PowerShell, it would look like this:
$uri = "swis://tdanner-dev.swdev.local/Orion/Orion.Nodes/NodeID=1"
Remove-SwisObject $swis $uri
To find out the Uri for a node, just query for it:
$uri = Get-SwisData $swis "SELECT TOP 1 Uri FROM Orion.Nodes WHERE [your criteria here]"
I'll give it a try. I saw your similar post so will f/u when accomplished. Thanks much.
My apologies that I didn’t fully describe what I’m trying to do. This is my scenario:
1. I’ll receive a ‘delete’ file that contains a Store_ID that needs deleted (store has been closed, etc), the store_ID is a Custom Property
2. This script --- will pick up the file with the Store_ID’s, query the store for the NodeID , and then delete the NodeID from Orion.Nodes
I’ll be setting up a Windows Scheduled task to run this file (if data exists) at least every 2 hours.