Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AZHockeyNut
Champion Sweeper III
we had an application that is no longer in use. during its install it created 2 local groups. Naturally those are no longer needed, however, the uninstall process did not remove those groups. Is there a way I can report on each system that has those groups and then automate their removal?
I assume the SIDS will be unique per pc, so I am probably left with exact name matches? looking to not have to go to each system and clean them up.
1 ACCEPTED SOLUTION
Bruce_B
Lansweeper Alumni
You could delete these groups en masse using a report and a deployment package that runs against this report.

The command used in the deployment module should be the following:

net localgroup <GroupName> /delete


Modify the report below with the correct group names:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblGroupUni.Name As GroupName,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblGroups On tblAssets.AssetID = tblGroups.AssetID
Inner Join tblGroupUni On tblGroupUni.GroupID = tblGroups.GroupID
Where (tblGroupUni.Name = 'group1' Or tblGroupUni.Name = 'group2') And
tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName

View solution in original post

1 REPLY 1
Bruce_B
Lansweeper Alumni
You could delete these groups en masse using a report and a deployment package that runs against this report.

The command used in the deployment module should be the following:

net localgroup <GroupName> /delete


Modify the report below with the correct group names:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblGroupUni.Name As GroupName,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblGroups On tblAssets.AssetID = tblGroups.AssetID
Inner Join tblGroupUni On tblGroupUni.GroupID = tblGroups.GroupID
Where (tblGroupUni.Name = 'group1' Or tblGroupUni.Name = 'group2') And
tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now