Skip to content

Conversation

@svenboll
Copy link
Contributor

@svenboll svenboll commented Nov 8, 2025

Type

  • Deprecate parameter

Related Issues?

discussed in #5147

What is in this Pull Request ?

The parameter "-RemoveExisting" was never implemented in functions like "Add-Microsoft365GroupMember|Owner", respectively AzureADGroups.

After the suggestion from @gautamdsheth the parameter is now deprecated and removed.

@svenboll svenboll marked this pull request as ready for review November 8, 2025 20:51
@svenboll svenboll changed the title Deprecate removeexisting Remove parameter "-RemoveExisting" from Add-AzureAD- and M365Group-Members and -Owners Nov 8, 2025
@gautamdsheth
Copy link
Collaborator

Thanks @svenboll , couple more changes.

We also need to mark the parameter as obsolete with deprecation message, something like in this PR:

[Obsolete("The Force parameter is obsolete and will be removed in future versions. Please update your scripts accordingly.")]

https://github.com/pnp/powershell/pull/5146/files

Could you do please do that for the cmdlets ?

@gautamdsheth gautamdsheth self-requested a review November 14, 2025 08:13
@svenboll svenboll force-pushed the deprecate-removeexisting branch 2 times, most recently from ccfc140 to 7144266 Compare November 14, 2025 15:48
@svenboll
Copy link
Contributor Author

Thanks for your comments and thoughts. I updated the commits.

@gautamdsheth
Copy link
Collaborator

@svenboll - its not compiling for Add-PnPMicrosoft365GroupOwner/PnPMicrosoft365GroupMember, could you please fix this ? Mostly missing some namespace.

@svenboll svenboll force-pushed the deprecate-removeexisting branch from 80a343d to 72cea69 Compare November 16, 2025 20:54
@svenboll svenboll force-pushed the deprecate-removeexisting branch from 72cea69 to 7255f2c Compare November 16, 2025 20:56
@svenboll
Copy link
Contributor Author

fixes missing using class. successfullly build a debug version locally.

@gautamdsheth gautamdsheth merged commit e84ef69 into pnp:dev Nov 19, 2025
5 checks passed
@gautamdsheth
Copy link
Collaborator

Thanks @svenboll for this PR, awesome first contribution !
Merged it , will be available in tomorrow's nightly builds as well as next major version whenever we release that.

For future PRs, please dont make entry to the changelog, that file is for maintainer use only !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants