Add SQL 2022 to Export-DbaUser.ps1
Summarize Functionality
Add SQL 2022 functionality to Export-DbaUser.ps1

Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
No response
Maintainer note: All of this needs to be removed from the module and replaced with the enum object in SMO.
@wsmelton I see your point, but what enum would you use here to replace "[ValidateSet('SQLServer2000', 'SQLServer2005', 'SQLServer2008/2008R2', 'SQLServer2012', 'SQLServer2014', 'SQLServer2016', 'SQLServer2017', 'SQLServer2019')][string]$DestinationVersion,". Technically, we want Microsoft.SqlServer.Management.Smo.CompatibilityLevel - but the user should see the "normal names" of the corresponding SQL Server version as possible value for that parameter.
I hope you don't mind that I just add the version 2022 to the code to have a quick fix.
The enumerator is Microsoft.SqlServer.Management.Smo.SqlServerVersion, the exact type that is being passed into the Script options object. You strongly type the parameter and then there is no need to deal with a validate set at that point, the enum does it for you by nature of the class type.
But the stings in that enum are "Version150" and not "SQLServer2019" like the user of command would expect. So current code using that command would fail if we change that type from [string] to [Microsoft.SqlServer.Management.Smo.SqlServerVersion]. Or am I wrong here?
Correct, it would be a breaking change.