Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// ----------------------------------------------------------------------------------

using Microsoft.WindowsAzure.Commands.Utilities.Common;
using System;
using System.Linq;
using System.Management.Automation;
using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources;

Expand All @@ -36,10 +34,10 @@ public class RemoveAzureADGroupCommand : ActiveDirectoryBaseCmdlet
[ValidateNotNullOrEmpty]
public PSADGroup InputObject { get; set; }

[Parameter(Mandatory = true)]
[Parameter(Mandatory = false)]
public SwitchParameter PassThru { get; set; }

[Parameter(Mandatory = true)]
[Parameter(Mandatory = false)]
public SwitchParameter Force { get; set; }

public override void ExecuteCmdlet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public static PSADObject ToPSADObject(this AADObject obj)
Id = obj.ObjectId,
Type = obj.ObjectType,
SecurityEnabled = obj.SecurityEnabled,
MailNickname = !string.IsNullOrEmpty(obj.Mail) ? obj.Mail : obj.AdditionalProperties.ContainsKey("mailNickname") ? obj.AdditionalProperties["mailNickname"]?.ToString() : null,
MailNickname = !string.IsNullOrEmpty(obj.Mail) ? obj.Mail :
!string.IsNullOrEmpty(obj.MailNickname) ? obj.MailNickname :
obj.AdditionalProperties.ContainsKey("mailNickname") ? obj.AdditionalProperties["mailNickname"]?.ToString() : null,
Description = obj.AdditionalProperties.ContainsKey("description") ? obj.AdditionalProperties["description"]?.ToString() : null
};
}
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/Resources/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
- Additional information about change #1
-->
## Upcoming Release
* Fix for null reference bug in GetAzureRoleAssignmentCommand
* Fixed for null reference bug in `Get-AzRoleAssignment`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this Fixed four null reference bugs or Fixed a null reference bug?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message comes from another people's commit. I just changed its tense using past tense.

* Marked switch `-Force` and `-PassThru` optional in `Remove-AzADGroup` (#10849)
* Fixed issue that `MailNickname` doesn't return in `Remove-AzADGroup` (#11167)

## Version 1.11.0
* Refactored template deployment cmdlets
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/Resources/help/Remove-AzADGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Expand Down Expand Up @@ -136,7 +136,7 @@ Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Expand Down