Ability to Run a Deployment Against Machines That Lack a Tag

It would be great to be able to select a tag when creating a deployment, and choose to run it against the machines that do not have that particular tag.

This would prevent tag clutter (so you don’t have to have a ‘!example tag’ to complement the 'example tag) and make these kinds of operations easier because it’s currently not that easy to mass-tag machines (Ability to tag multiple machines with a script or uploading csv). The reason it might be sometimes necessary is that occasionally, a machine needs to be transitioned to a different use-case (without being wiped and set up fresh), or software can get deployed to machines that it shouldn’t be. This would be a way to remove it only from the machines that shouldn’t have it without going through tagging all over again.

This was also brought up in this post:
Provide an Exclude Tag option for deployments - Feature Requests - ImmyBot Community

Reading through that thread, i can see that it’s mostly doable with a metascript (I was wondering about that), but a checkbox or something would be nice.

I agree; I currently have some exception tags, which necessitate two deployments (one for the action, and one for the exception). The inverse tag target would take those down to one deployment. Furthering the use case, however, is that using tags for exceptions seems to currently be broken (desired state is inconsistent), which I currently have a ticket active for. In the meantime, and perhaps in the long run, it seems inverse tag target might be a good alternative solution.

1 Like

this is already possible, make a filter script and look for no tags

Get-ImmyComputer -IncludeTags | Where-Object {([String]$_.Tags -like $null)}
1 Like

I use filter scripts too. It would be nice to do this without having to make a script where you only use it in one deployment. Maybe just have a one text box on the installer with the Where-Object clause in it, so in your case you’d put “([String]$_.Tags -like $null)”. And maybe some options to tell ImmyBot what Inventory you want to use in the Where-Object

Then you’d only use filter scripts where there was more complexity than just a Where-Object clause, or where you wanted to re-use in multiple deployments.

I just ran up against a use case for this. We use an SOE tag that applies to pretty much everything except a few special use devices. I want “Microsoft 365 Apps for XXX” to only install where the user is licensed (as per existing metascript) and where the SOE tag applies, as the user in question has a license for Apps for Enterprise so that they get access to the Power stuff, but I don’t want Office on a couple of computers where that user is assigned as computers are very lightweight and just for displaying dashboards.