Esempio n. 1
0
 protected override void InternalProcessRecord()
 {
     if (this.updateExistingDefaultPolicies)
     {
         if (!base.ShouldContinue(Strings.ConfirmationMessageSwitchMailboxPolicy("OWAMailboxPolicy", this.DataObject.Name)))
         {
             return;
         }
         try
         {
             DefaultMailboxPolicyUtility <OwaMailboxPolicy> .ClearDefaultPolicies(base.DataSession as IConfigurationSession, this.existingDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
     this.DataObject.ActionForUnknownFileAndMIMETypes = AttachmentBlockingActions.Allow;
     base.InternalProcessRecord();
     this.DataObject.AllowedFileTypes   = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultAllowedFileTypes);
     this.DataObject.AllowedMimeTypes   = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultAllowedMimeTypes);
     this.DataObject.BlockedFileTypes   = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultBlockedFileTypes);
     this.DataObject.BlockedMimeTypes   = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultBlockedMimeTypes);
     this.DataObject.ForceSaveFileTypes = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultForceSaveFileTypes);
     this.DataObject.ForceSaveMimeTypes = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultForceSaveMimeTypes);
     this.DataObject.WebReadyFileTypes  = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultWebReadyFileTypes);
     this.DataObject.WebReadyMimeTypes  = new MultiValuedProperty <string>(OwaMailboxPolicySchema.DefaultWebReadyMimeTypes);
     base.DataSession.Save(this.DataObject);
 }
Esempio n. 2
0
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     if (SharedConfiguration.IsSharedConfiguration(this.DataObject.OrganizationId) && !base.ShouldContinue(Strings.ConfirmSharedConfiguration(this.DataObject.OrganizationId.OrganizationalUnit.Name)))
     {
         TaskLogger.LogExit();
         return;
     }
     if (this.updateOtherDefaultPolicies)
     {
         if (!base.ShouldContinue(Strings.ConfirmationMessageSwitchMailboxPolicy("OWAMailboxPolicy", this.Identity.ToString())))
         {
             return;
         }
         try
         {
             DefaultMailboxPolicyUtility <OwaMailboxPolicy> .ClearDefaultPolicies(base.DataSession as IConfigurationSession, this.otherDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
     if (base.Fields.IsChanged("DisableFacebook") && this.DisableFacebook)
     {
         this.DataObject.FacebookEnabled = false;
     }
     base.InternalProcessRecord();
     TaskLogger.LogExit();
 }
 protected override void InternalProcessRecord()
 {
     this.WriteWarning(Strings.WarningCmdletIsDeprecated("Set-ActiveSyncMailboxPolicy", "Set-MobileDeviceMailboxPolicy"));
     if (!this.DataObject.DevicePasswordEnabled && base.UserSpecifiedParameters.Contains("DevicePasswordEnabled") && !base.UserSpecifiedParameters.Contains("AllowSimpleDevicePassword") && !base.UserSpecifiedParameters.Contains("AlphanumericDevicePasswordRequired") && !base.UserSpecifiedParameters.Contains("MinDevicePasswordComplexCharacters") && !base.UserSpecifiedParameters.Contains("MinDevicePasswordLength") && !base.UserSpecifiedParameters.Contains("MaxDevicePasswordFailedAttempts") && !base.UserSpecifiedParameters.Contains("MaxInactivityTimeDeviceLock") && !base.UserSpecifiedParameters.Contains("PasswordRecoveryEnabled") && !base.UserSpecifiedParameters.Contains("DevicePasswordExpiration") && !base.UserSpecifiedParameters.Contains("DevicePasswordHistory") && !base.UserSpecifiedParameters.Contains("RequireDeviceEncryption") && !base.UserSpecifiedParameters.Contains("RequireStorageCardEncryption") && !base.UserSpecifiedParameters.Contains("DeviceEncryptionEnabled"))
     {
         this.DataObject.AllowSimpleDevicePassword          = (bool)ActiveSyncMailboxPolicySchema.AllowSimpleDevicePassword.DefaultValue;
         this.DataObject.AlphanumericDevicePasswordRequired = (bool)ActiveSyncMailboxPolicySchema.AlphanumericDevicePasswordRequired.DefaultValue;
         this.DataObject.MinDevicePasswordComplexCharacters = (int)ActiveSyncMailboxPolicySchema.MinDevicePasswordComplexCharacters.DefaultValue;
         this.DataObject.MinDevicePasswordLength            = (int?)ActiveSyncMailboxPolicySchema.MinDevicePasswordLength.DefaultValue;
         this.DataObject.MaxDevicePasswordFailedAttempts    = (Unlimited <int>)ActiveSyncMailboxPolicySchema.MaxDevicePasswordFailedAttempts.DefaultValue;
         this.DataObject.MaxInactivityTimeDeviceLock        = (Unlimited <EnhancedTimeSpan>)ActiveSyncMailboxPolicySchema.MaxInactivityTimeDeviceLock.DefaultValue;
         this.DataObject.PasswordRecoveryEnabled            = (bool)MobileMailboxPolicySchema.PasswordRecoveryEnabled.DefaultValue;
         this.DataObject.DevicePasswordExpiration           = (Unlimited <EnhancedTimeSpan>)ActiveSyncMailboxPolicySchema.DevicePasswordExpiration.DefaultValue;
         this.DataObject.DevicePasswordHistory        = (int)ActiveSyncMailboxPolicySchema.DevicePasswordHistory.DefaultValue;
         this.DataObject.RequireDeviceEncryption      = (bool)MobileMailboxPolicySchema.RequireDeviceEncryption.DefaultValue;
         this.DataObject.DeviceEncryptionEnabled      = (bool)MobileMailboxPolicySchema.RequireStorageCardEncryption.DefaultValue;
         this.DataObject.RequireStorageCardEncryption = (bool)MobileMailboxPolicySchema.RequireStorageCardEncryption.DefaultValue;
     }
     base.InternalProcessRecord();
     if (this.updateOtherDefaultPolicies)
     {
         try
         {
             DefaultMailboxPolicyUtility <ActiveSyncMailboxPolicy> .ClearDefaultPolicies((IConfigurationSession)base.DataSession, this.otherDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
 }
 public static void ClearDefaultPolicies(IConfigurationSession session, IList <RetentionPolicy> defaultPolicies, bool isArbitrationMailbox)
 {
     if (isArbitrationMailbox)
     {
         RetentionPolicyUtility.ClearDefaultArbitrationMailboxPolicies(session, defaultPolicies);
         return;
     }
     DefaultMailboxPolicyUtility <RetentionPolicy> .ClearDefaultPolicies(session, defaultPolicies);
 }
Esempio n. 5
0
 protected override void InternalProcessRecord()
 {
     base.InternalProcessRecord();
     if (this.updateExistingDefaultPolicies)
     {
         try
         {
             DefaultMailboxPolicyUtility <MobileMailboxPolicy> .ClearDefaultPolicies(base.DataSession as IConfigurationSession, this.existingDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
 }
 protected override void InternalProcessRecord()
 {
     this.WriteWarning(Strings.WarningCmdletIsDeprecated("New-ActiveSyncMailboxPolicy", "New-MobileDeviceMailboxPolicy"));
     base.InternalProcessRecord();
     if (this.updateExistingDefaultPolicies)
     {
         try
         {
             DefaultMailboxPolicyUtility <ActiveSyncMailboxPolicy> .ClearDefaultPolicies(base.DataSession as IConfigurationSession, this.existingDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
 }
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     if (this.DataObject != null && SharedConfiguration.IsSharedConfiguration(this.DataObject.OrganizationId) && !base.ShouldContinue(Strings.ConfirmSharedConfiguration(this.DataObject.OrganizationId.OrganizationalUnit.Name)))
     {
         TaskLogger.LogExit();
         return;
     }
     if (this.updateExistingDefaultPolicies)
     {
         try
         {
             DefaultMailboxPolicyUtility <TeamMailboxProvisioningPolicy> .ClearDefaultPolicies(base.DataSession as IConfigurationSession, this.existingDefaultPolicies);
         }
         catch (DataSourceTransientException exception)
         {
             base.WriteError(exception, ErrorCategory.ReadError, null);
         }
     }
     base.InternalProcessRecord();
     TaskLogger.LogExit();
 }
 public static IList <TeamMailboxProvisioningPolicy> GetDefaultPolicies(IConfigurationSession session)
 {
     return(DefaultMailboxPolicyUtility <TeamMailboxProvisioningPolicy> .GetDefaultPolicies(session, DefaultTeamMailboxProvisioningPolicyUtility.filter, null));
 }
 public static IList <TeamMailboxProvisioningPolicy> GetDefaultPolicies(IConfigurationSession session, QueryFilter additionalFilter)
 {
     return(DefaultMailboxPolicyUtility <TeamMailboxProvisioningPolicy> .GetDefaultPolicies(session, DefaultTeamMailboxProvisioningPolicyUtility.filter, additionalFilter));
 }
Esempio n. 10
0
 public static IList <OwaMailboxPolicy> GetDefaultPolicies(IConfigurationSession session)
 {
     return(DefaultMailboxPolicyUtility <OwaMailboxPolicy> .GetDefaultPolicies(session, DefaultOwaMailboxPolicyUtility.filter, null));
 }
Esempio n. 11
0
 public static IList <OwaMailboxPolicy> GetDefaultPolicies(IConfigurationSession session, QueryFilter extraFilter)
 {
     return(DefaultMailboxPolicyUtility <OwaMailboxPolicy> .GetDefaultPolicies(session, DefaultOwaMailboxPolicyUtility.filter, extraFilter));
 }