dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

Get-DbaRegisteredServer - -ExcludeServer would be usefull

Open frodr1k opened this issue 1 month ago • 0 comments

Summarize Functionality

When using Get-DbaRegisteredServer it would be nice to be able to exclude specific servers not just groups.

In example:

Get-DbaRegisteredServer CMS -group production -ExcludeServer "serverAlfa","ServerBeta"

The above would filter out ServerAlfa and ServerBeta despite they are in the group "production"

This would be usable if you want to avoid running a script on a certain server at a certain occassion. Such as that particular server is down for maintenance etc.

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

I think I provided most of it above. But in general. I can probably make this function in my own script by filtering on the servernames through a loop. But for the sake of clarity, ease of use and also functionality, it would be a nice addition for the average user.

frodr1k avatar Jun 19 '24 11:06 frodr1k