Beispiel #1
0
            public static ICollection <PSObject> ExecuteCmdlet(DateTime starTime, DateTime endTime)
            {
                string a = string.Format("@(Get-TransportService | Get-MessageTrackingLog -Start \"{0}\" -End \"{1}\" -EventId receive -resultsize unlimited | {2}).count", starTime, endTime, "where {$_.Source -eq 'STOREDRIVER'}");

                //string a = string.Format("(get-transportserver *-MHC* | Get-MessageTrackingLog -Start \"{0}\" -End \"{1}\" -EventId deliver -resultsize unlimited).count", starTime, endTime);
                return(PSCommandBase.ExecuteCmdlet(a));
            }
Beispiel #2
0
            public static ICollection <PSObject> ExecuteCmdlet(string strOUName, string strType)
            {
                string a = string.Format("Set-ADForest -Identity {2} -UPNSuffixes @{{{0}=\"{1}\"}}", strType, strOUName, Domain);

                //string a = string.Format("Get-Mailbox  -OrganizationalUnit \"{0}\" -ResultSize Unlimited | Search-Mailbox -SearchQuery '{1}  AND 发送时间:>{2} AND 发送时间:<{3}'  -DeleteContent -Force", strOUscope, strSearchQuery, startTime, endTime);
                //Logger.Info("RemoveSensitiveMail : " + a);
                return(PSCommandBase.ExecuteCmdlet(a));
            }
Beispiel #3
0
            public static ICollection <PSObject> ExecuteCmdlet(string strscope, string strSearchQuery, DateTime startTime, DateTime endTime)
            {
                string cmd  = string.Empty;
                int    type = 2;

                //string a = string.Format("Get-Mailbox  -OrganizationalUnit \"{0}\" -ResultSize Unlimited | Search-Mailbox -SearchQuery '{1}  AND Sent:>{2} AND Sent:<{3}'  -DeleteContent -Force", strOUscope, strSearchQuery, startTime, endTime);
                if (type == 1)
                {
                    cmd = string.Format("Get-Mailbox  -OrganizationalUnit \"{0}\" -ResultSize Unlimited | Search-Mailbox -SearchQuery '{1}  AND sent>=\"{2}\" AND sent<=\"{3}\"'  -DeleteContent -Force", strscope, strSearchQuery, startTime, endTime);
                    Log4netHelper.Info("RemoveSensitiveMail : " + cmd);
                }
                else
                {
                    cmd = string.Format("Search-Mailbox -Identity \"{0}\" -SearchQuery '{1}  AND sent>=\"{2}\" AND sent<=\"{3}\"'  -DeleteContent -Force", strscope, strSearchQuery, startTime, endTime);
                    Log4netHelper.Info("RemoveSensitiveMail : " + cmd);
                }
                return(PSCommandBase.ExecuteCmdlet(cmd));
            }
Beispiel #4
0
            public static ICollection <PSObject> ExecuteCmdlet(DateTime starTime, DateTime endTime, string mail)
            {
                string a = string.Format("@(Get-TransportService | Get-MessageTrackingLog -Start \"{0}\" -End \"{1}\" -EventId receive -Sender \"{2}\" -resultsize unlimited| {3}).count ", starTime, endTime, mail, "where {$_.Source -eq 'smtp'}");

                return(PSCommandBase.ExecuteCmdlet(a));
            }
Beispiel #5
0
            public static ICollection <PSObject> ExecuteCmdlet(DateTime starTime, DateTime endTime, string mail)
            {
                string a = string.Format("@(Get-TransportService | Get-MessageTrackingLog -Start \"{0}\" -End \"{1}\" -EventId deliver -Recipients \"{2}\" -resultsize unlimited).count", starTime, endTime, mail);

                return(PSCommandBase.ExecuteCmdlet(a));
            }
Beispiel #6
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("Set-MailboxRegionalConfiguration", parms));
 }
Beispiel #7
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("Get-MailboxStatistics", parms));
 }
Beispiel #8
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("Set-CASMailBox", parms));
 }
Beispiel #9
0
            public static ICollection <PSObject> ExecuteCmdlet()
            {
                string cmd = "Get-MailboxDatabase -IncludePreExchange2013";

                return(PSCommandBase.ExecuteCmdlet(cmd));
            }
Beispiel #10
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("New-MoveRequest", parms));
 }
Beispiel #11
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("Get-DistributionGroup", parms));
 }
Beispiel #12
0
 public static ICollection <PSObject> ExecuteCmdlet(PSParameters parms)
 {
     return(PSCommandBase.ExecuteCmdlet("Enable-MailContact", parms));
 }