Copy-DbaLogin Permissions sync only Server Roles and Server securables
Summarize Functionality
We have a system where logins gets created regularly. We are using copy-dbalogin to sync logins between nodes in Availability groups. With a large number of databases copy-dbalogin performs slower than we would like. When using the -ExcludePermissionSync performance is great but server permissions are not carried over.
It would be helpful if the function has an option for Server Permissions only and avoids looping through all databases for database permissions.
Is there a command that is similiar or close to what you are looking for?
No
Technical Details
No response
I think this would need a change of Update-SqlPermission as the mappings are handled there. Maybe a new switch parameter -NoDatabaseMapping to skip some parts.
Maybe I find time to have a deeper look, but let's first ask the other contributors what they think.