public override void ExecuteCmdlet() { var groupCreateParams = new GroupCreateParameters() { DisplayName = DisplayName, MailNickname = MailNickname }; ExecutionBlock(() => { if (ShouldProcess(target: DisplayName, action: string.Format("Creating a new AD group with display name '{0}'", DisplayName))) { WriteObject(ActiveDirectoryClient.CreateGroup(groupCreateParams)); } }); }
public override void ExecuteCmdlet() { var groupCreateParams = new GroupCreateParameters() { DisplayName = DisplayName, MailNickname = MailNickname, AdditionalProperties = new System.Collections.Generic.Dictionary <string, object>() }; if (!string.IsNullOrEmpty(Description)) { groupCreateParams.AdditionalProperties.Add("description", Description); } ExecutionBlock(() => { if (ShouldProcess(target: DisplayName, action: string.Format("Creating a new AD group with display name '{0}'", DisplayName))) { WriteObject(ActiveDirectoryClient.CreateGroup(groupCreateParams)); } }); }