Deployment Solution

 View Only
  • 1.  How do I delete all the discovered computers unmanaged

    Posted Jan 18, 2013 05:17 PM

    I have over 5000 devices discovered unmanaged I want to delete all 5000 of them and then go into the discover computer tab and put in IP Ranges. Is that possible and if so how do I do that. And that's all I would ever want to show up in the discovery view is though's IP ranges that I have specified and then you just have to push the agent out to them. Thanks for any help.



  • 2.  RE: How do I delete all the discovered computers unmanaged
    Best Answer

    Posted Jan 18, 2013 10:28 PM

    Create the following report and then review the results for accuracy:
    SELECT vc.Guid FROM vComputer vc WHERE vc.IsManaged=0

    Tweak as necessary so you're deleting the right records, then grab DeleteItems.cs from this article/download:
    https://www-secure.symantec.com/connect/downloads/bulk-delete-resources

    Edit DeleteItems.cs and update this line:
       static public string sql = @"select Guid from vSiteResource";

    To this:
       static public string sql = @"select Guid from vComputer where vc.IsManaged=0";

    Then run NScript DeleteItems.cs as described.  NScript is at <drive>:\Program Files\Altiris\Notification Server\Bin\NScript.exe.

    Ensure Active Directory import is disabled--I'm not sure where these unwanted 5,000 records came from--and then use Network Discovery on the IP ranges you defined, working first with a test range and then expanding to include all ranges.

    Does this answer your question?



  • 3.  RE: How do I delete all the discovered computers unmanaged

    Posted Jan 23, 2013 02:58 PM

    This worked perfectly the only thing I had to change was this line of code.

     

    Edit DeleteItems.cs and update this line:
    static public string sql = @"select Guid from vSiteResource";

    To this:
    static public string sql = @"select Guid from vComputer where vc.IsManaged=0";

     

    this is what I put:

    static public string sql = @"select Guid from vComputer where IsManaged=0";

    thanks it worked perfectly.

    Tyson

     



  • 4.  RE: How do I delete all the discovered computers unmanaged

    Posted Jan 30, 2013 11:52 AM

    You're right, my query should have read:
    select Guid from vComputer vc where vc.IsManaged=0

    or

    select Guid from vComputer where IsManaged=0

    Glad I could help!