protected CmdletExecutionRequest(string cmdletName, CmdletExecutionPool cmdletPool, ILogger logger) { this.cmdletPool = cmdletPool; this.logger = logger; this.Command = new PSCommand(); this.Command.AddCommand(cmdletName); }
public GetMoveRequestStatistics(DirectoryMailbox mailbox, ILogger logger, CmdletExecutionPool cmdletPool) : base("Get-MoveRequestStatistics", cmdletPool, logger) { this.Mailbox = mailbox; AnchorUtil.ThrowOnNullArgument(mailbox, "mailbox"); string value; if (mailbox.OrganizationId == TenantPartitionHint.ExternalDirectoryOrganizationIdForRootOrg) { value = string.Format("{0}", mailbox.Guid); } else { value = string.Format("{0}\\{1}", mailbox.OrganizationId, mailbox.Guid); } base.Command.AddParameter("Identity", value); }
public InjectMoveRequest(string batchName, DirectoryMailbox mailbox, ILogger logger, bool protect, RequestPriority requestPriority, ADObjectId mailboxObjectId, DirectoryIdentity targetDatabaseIdentity, ILoadBalanceSettings settings, CmdletExecutionPool cmdletPool) : base("New-MoveRequest", cmdletPool, logger) { this.settings = settings; this.TargetDatabase = targetDatabaseIdentity; this.BatchName = batchName; this.Mailbox = mailbox; this.Protect = protect; AnchorUtil.ThrowOnNullArgument(mailbox, "mailbox"); base.Command.AddParameter("Identity", mailboxObjectId); base.Command.AddParameter("WorkloadType", RequestWorkloadType.LoadBalancing); if (!string.IsNullOrWhiteSpace(batchName)) { base.Command.AddParameter("BatchName", batchName); } if (targetDatabaseIdentity != null) { DatabaseIdParameter value = new DatabaseIdParameter(targetDatabaseIdentity.ADObjectId); if (mailbox.IsArchiveOnly) { base.Command.AddParameter("ArchiveTargetDatabase", value); base.Command.AddParameter("ArchiveOnly"); } else { base.Command.AddParameter("TargetDatabase", value); base.Command.AddParameter("PrimaryOnly"); } } base.Command.AddParameter("CompletedRequestAgeLimit", 0); base.Command.AddParameter("Priority", requestPriority); if (protect) { base.Command.AddParameter("Protect"); } }
public GetMoveInfo(ILogger logger, CmdletExecutionPool cmdletPool) { this.logger = logger; this.cmdletPool = cmdletPool; }
public SoftDeletedMailboxRemovalRequest(Guid mailboxGuid, Guid databaseGuid, ILogger logger, CmdletExecutionPool cmdletPool, ILoadBalanceSettings settings) : base("Remove-StoreMailbox", cmdletPool, logger) { this.mailboxGuid = mailboxGuid; this.databaseGuid = databaseGuid; this.settings = settings; base.Command.AddParameter("Identity", mailboxGuid); base.Command.AddParameter("Database", databaseGuid.ToString()); base.Command.AddParameter("MailboxState", "SoftDeleted"); }
public ProcessMailboxRequest(DirectoryMailbox mailbox, MailboxProcessor processor, ILogger logger, CmdletExecutionPool cmdletPool) { AnchorUtil.ThrowOnNullArgument(mailbox, "mailbox"); AnchorUtil.ThrowOnNullArgument(processor, "processor"); this.Mailbox = mailbox; this.Processor = processor; this.logger = logger; this.cmdletPool = cmdletPool; }