Example #1
0
        protected override void InternalProcessRecord()
        {
            string userIdentity            = (base.ExchangeRunspaceConfig == null) ? string.Empty : base.ExchangeRunspaceConfig.IdentityName;
            bool   componentRestrictedData = GetExchangeDiagnosticInfo.CheckDataRedactionEnabled(this.serverVersion) && !base.NeedSuppressingPiiData;
            string xml    = ProcessAccessManager.ClientRunProcessCommand(this.serverFqdn, this.Process, this.Component, this.Argument, componentRestrictedData, this.Unlimited, userIdentity);
            string result = GetExchangeDiagnosticInfo.ReformatXml(xml);

            this.WriteResult(new ExchangeDiagnosticInfoResult(result));
        }
Example #2
0
 public void Refresh()
 {
     for (int i = 1; i <= DiagnosticInfo.RetryCount + 1; i++)
     {
         string text = ProcessAccessManager.ClientRunProcessCommand(this.serverName, "Microsoft.Exchange.Search.Service", null, null, false, true, null);
         this.Parse(text);
         if (this.ProcessId != null || DiagnosticInfo.RetryCount == 0)
         {
             this.DiagnosticInfoXml = text;
             return;
         }
         if (i == DiagnosticInfo.RetryCount + 1)
         {
             throw new InvalidOperationException(string.Format("Process ID is not found from diagnostic info XML:\n{0}", text));
         }
         Thread.Sleep(TimeSpan.FromSeconds(3.0));
     }
 }
Example #3
0
        public static XElement QueryMRSDiagnostics(string serverName, string arguments, string xPath, string componentName = "MailboxReplicationService")
        {
            string   text = ProcessAccessManager.ClientRunProcessCommand(serverName, "MSExchangeMailboxReplication", componentName, arguments, false, true, string.Empty);
            XElement xelement;

            try
            {
                xelement = XElement.Parse(text);
            }
            catch (XmlException ex)
            {
                throw new MRSDiagnosticXmlParsingException(ex.Message, text, ex);
            }
            xelement = xelement.XPathSelectElement(xPath);
            if (xelement == null)
            {
                throw new MRSExpectedDiagnosticsElementMissingException(xPath, text);
            }
            return(xelement);
        }