With Set-NextcloudUser there are two issues:
- The password variable should not be a string, when the password parameter can be plaintext it could be exposed in logfiles which could compromise that user. Securestring should be used instead.
- Some parameters are not to be used together, in my opinion Disable should not be used with any other parameter. This could be easily solved with parametersets: https://devblogs.microsoft.com/powershell/powershell-v2-parametersets/
With Set-NextcloudUser there are two issues: