/// <summary> /// Removes alias from user /// </summary> /// <param name="removeAlias"></param> /// <returns></returns> public CPOMyPowerShell RemoveAlias(CustomCPOAlias removeAlias) { ps.AddCommand(psScriptPath + @"\RemoveAlias.ps1"); ps.AddParameter("Organization", removeAlias.Organization); ps.AddParameter("UserPrincipalName", removeAlias.UserPrincipalName); ps.AddParameter("EmailAddresses", removeAlias.EmailAddresses); return(this); }
/// <summary> /// Add alias to user /// </summary> /// <param name="addAlias"></param> /// <returns></returns> public CPOMyPowerShell AddAlias(CustomCPOAlias addAlias) { ps.AddCommand(psScriptPath + @"\AddAlias.ps1"); ps.AddParameter("Organization", addAlias.Organization); ps.AddParameter("UserPrincipalName", addAlias.UserPrincipalName); ps.AddParameter("EmailAddresses", addAlias.EmailAddresses); if (addAlias.SetFirstAsPrimary) { ps.AddParameter("SetFirstAsPrimary", true); } return(this); }