New-DistributionGroup - Allow redirection of informationaction
Presently in the Exchange Online Cmdlets when you create a New-DistributionGroup the following message appears.
"New! Office 365 Groups are the next generation of distribution lists.
Groups give teams shared tools for collaborating using email, files, a calendar, and more.
You can start right away using the New-UnifiedGroup cmdlet."
This is an "Informational" message from the PowerShell Cmdlet which does not redirect as would be the normal behaviour in PowerShell using the -informationaction parameter.
Please either alter this as a "WarningAction" which can be trapped or expose the InformationAction via the Cmdlet.
Presently if you leverage -informationaction you receive the following error.
"The "InformationAction" parameter can't be used on the "New-DistributionGroup" cmdlet because it isn't present in the role definition for the current
user. Check the management roles assigned to you, and try again.
+ CategoryInfo : PermissionDenied: (:) [New-DistributionGroup], CmdletAccessDeniedException
+ FullyQualifiedErrorId : [Server=BY2PR0801MB1493,RequestId=69c08a41-7485-4ff3-994b-715406a1067c,TimeStamp=8/20/2018 2:19:00 PM] [FailureCategory=Cmdl
+ PSComputerName : outlook.office365.com"
As a result of this, applications which leverage this Cmdlet have extraneous data on the screen causing confusion for Administrators.
Zeff Wheelock commented
"This will be addressed in month or so. Information will be removed from cmdlet."
Guess not. Been 2 years almost and still the same.
please fix this.
It makes my script output unreadable (I'm removing on prem dist lists and recreating ~900 azr distlists,) 2700 lines of commercials. that do not adhere to the PowerShell standard.
Ward Snyder commented
This is super annoying in all of our scripts. Only Microsoft would post an advertisement in a PowerShell command, and not allow us to suppress this
It's 2020 and this issue still remains. I think most people who want O365-groups have gotten them by now. Can we PLEASE remove this message? It's such an unnecessary and obtrusive message.
Maciej L. commented
What is the status of this request, is Exchange team even considering moving this into production?
Tim Harris commented
When is this going to be addressed? Why can't it be made a warning message so we can hide it. It really makes automated tasks a pain when we can't control the output.
This is still not addressed!
Still an issue, why is it even there in the first place?!
Steven provo commented
The message is still there when you create a DG...
Brian Seaman commented
How is this coming along? O365 groups are NOT the same as distribution lists or security groups, and I shouldn't have to see this message EVERY SINGLE TIME that I or one of the techs that I write these scripts for creates one.
Zeff Wheelock commented
Good to hear! Thanks!
This will be addressed in month or so. Information will be removed from cmdlet.