internal static void InitExchangePropertyContainer(ISessionState sessionState, OrganizationId currentExecutingOrgId, ADObjectId currentExecutingUserId) { ExchangePropertyContainer exchangePropertyContainer = new ExchangePropertyContainer(); exchangePropertyContainer.executingUserOrganizationId = currentExecutingOrgId; exchangePropertyContainer.executingUserId = currentExecutingUserId; if (sessionState.Variables.ContainsName(ExchangePropertyContainer.ADServerSettingsVarName)) { exchangePropertyContainer.serverSettings = (sessionState.Variables[ExchangePropertyContainer.ADServerSettingsVarName] as ADServerSettings); } ExchangePropertyContainer.SetExchangePropertyContainer(sessionState, exchangePropertyContainer); }
internal static void InitExchangePropertyContainer(ISessionState sessionState, ExchangeRunspaceConfiguration configuration) { ExchangePropertyContainer exchangePropertyContainer = new ExchangePropertyContainer(); exchangePropertyContainer.exchangeRunspaceConfiguration = configuration; exchangePropertyContainer.budget = ExchangePropertyContainer.AcquirePowerShellBudget(configuration); if (sessionState.Variables.ContainsName(ExchangePropertyContainer.ADServerSettingsVarName)) { exchangePropertyContainer.serverSettings = (sessionState.Variables[ExchangePropertyContainer.ADServerSettingsVarName] as ADServerSettings); } ExchangePropertyContainer.SetExchangePropertyContainer(sessionState, exchangePropertyContainer); }