Link to home
Start Free TrialLog in
Avatar of xpedia
xpediaFlag for United States of America

asked on

Porting PowerShell Script from 2008 Server to 2012 Server

Hello,

We have a Powershell script that was written by a former employee. The script is attached.
The script runs fine on the 2008 server, but we cannot get it to run on the 2012 server. The script gathers iislogs from all our webservers, parses them, deletes, and inserts the data into a mssql database.
We are using Powershell_ise (x86) to run the script as administrator.
When starting the script, the starting script email is sent out, then the script just hangs. Nothing is written to the log file and nothing is written to C:\temp
New server has full access to \\prodfiles4\logs\windowsiislogs\mechanism\

The power shell output window shows this:

\\prodfiles4\logs\windowsiislogs\syslog\syslog.log 03-24-15  09:52:40       [000]        [INIT]        s                  [0310]       [02409676]        [001]       Documentation located at \\prodfiles4
\logs\windowsiislogs\mechanism\
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 

\\prodfiles4\logs\windowsiislogs\syslog\syslog.log 03-24-15  09:52:41       [000]        [INIT]        s                  [0310]       [02409676]        [001]       Cleaning up from last run, this can t
ake up to 500 seconds to complete  (this never completes)


When running on Server 2008 this same error appears, but the script runs fine, but we do get this error so I don't think this is necessarily bad.

Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

The original author said he had to do a bunch of stuff to the 2008 server to make this script run, but does not remember exactly what.

Does anyone have any thoughts on getting this to run on a 2012 server?

Thank you,
logcollection-multithread-v10a.txt
Avatar of footech
footech
Flag of United States of America image

Your comparison
If ($SizeMb -ge $MaxLogSizeInMB)
isn't going to work the way you want because it's comparing a string to a number (int32).  Change where you define $SizeMb to
$SizeMb=[math]::Round(((Get-ChildItem $SysLogfile| Measure-Object -property length -sum).sum / 1MB),2)

Open in new window


The error message should reference the position in the script where the error occurred.  Can you post the full error and/or a screenshot of the console?  That would help to narrow things down.
Avatar of xpedia

ASKER

Thanks Footech,

Made the change as you suggested, but still no joy. Here is the output from server 2012

PS C:\Windows\system32> \\cco\dfs\logs\windowsiislogs\mechanism\logcollection-multithread_v10b.ps1
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       ooooo                                
    .oooooo.             oooo  oooo                          .    o8o                                          
.o    .oooo.  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       `888"                                
   d8P"  `Y8b            `888  `888                        .o8    `""                                         o8
88   d8P"`Y8b  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]        888          .ooooo.   .oooooooo    
  888           .ooooo.   888   888   .ooooo.   .ooooo.  .o888oo oooo   .ooooo.  ooo. .oo.        oooo    ooo  8
88  888    888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]        888         d88" `88b 888" `88b    
  888          d88" `88b  888   888  d88" `88b d88" `"Y8   888   `888  d88" `88b `888P"Y88b        `88.  .8"   8
88  888    888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]        888         888   888 888   888    
  888          888   888  888   888  888ooo888 888         888    888  888   888  888   888         `88..8"    8
88  888    888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]        888       o 888   888 `88bod8P"    
  `88b    ooo  888   888  888   888  888    .o 888   .o8   888 .  888  888   888  888   888          `888"     8
88  `88b  d88"
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       o888ooooood8 `Y8bod8P" `8oooooo.    
   `Y8bood8P"  `Y8bod8P" o888o o888o `Y8bod8P" `Y8bod8P"   "888" o888o `Y8bod8P" o888o o888o          `8"     o8
88o  `Y8bd8P"  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]                              d"     YD    
                                                                                                               
               
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]                              "Y88888P"    
                                                                                                               
               
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       Script init from locaton \\prodfiles4
.cco\logs\windowsiislogs\mechanism\
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       Documentation located at \\prodfiles4
.cco\logs\windowsiislogs\mechanism\
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    + PSComputerName        : localhost
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:56:24       [000]        [INIT]        s                  [0310]       [02409676]        [001]       Cleaning up from last run, this can t
ake up to 500 seconds to complete

This is how the output should be and is running on server 2008:

PS C:\Users\admin.eddie> \\cco\dfs\logs\windowsiislogs\mechanism\logcollection-multithread_v10b.ps1
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:51       [000]        [INIT]        s                  [0167]       [05219462]        [000]       
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:51       [000]        [INIT]        s                  [0167]       [05219462]        [000]       ooooo                                    .oooooo.             oooo  oooo                          .    o8o                                           .o    .oo
oo.  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:51       [000]        [INIT]        s                  [0167]       [05219462]        [000]       `888"                                   d8P"  `Y8b            `888  `888                        .o8    `""                                         o888   d8P"
`Y8b  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]        888          .ooooo.   .oooooooo      888           .ooooo.   888   888   .ooooo.   .ooooo.  .o888oo oooo   .ooooo.  ooo. .oo.        oooo    ooo  888  888  
  888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]        888         d88" `88b 888" `88b       888          d88" `88b  888   888  d88" `88b d88" `"Y8   888   `888  d88" `88b `888P"Y88b        `88.  .8"   888  888  
  888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]        888         888   888 888   888       888          888   888  888   888  888ooo888 888         888    888  888   888  888   888         `88..8"    888  888  
  888
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]        888       o 888   888 `88bod8P"       `88b    ooo  888   888  888   888  888    .o 888   .o8   888 .  888  888   888  888   888          `888"     888  `88b
 d88"
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       o888ooooood8 `Y8bod8P" `8oooooo.        `Y8bood8P"  `Y8bod8P" o888o o888o `Y8bod8P" `Y8bod8P"   "888" o888o `Y8bod8P" o888o o888o          `8"     o888o  `Y8b
d8P"  
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]                              d"     YD                                                                                                                              
     
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]                              "Y88888P"                                                                                                                              
     
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       Script init from locaton \\prodfiles4.cco\logs\windowsiislogs\mechanism\
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       Documentation located at \\prodfiles4.cco\logs\windowsiislogs\mechanism\
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       Cleaning up from last run, this can take up to 500 seconds to complete
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
Cannot find an overload for "op_Subtraction" and the argument count: "2".
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
 
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        s                  [0167]       [05219462]        [000]       All stale  threads cleaned
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]       Listing all settings
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ArchiveIISLogfile=\\prodfiles4.cco\logs\windowsiislogs\archive\03-25-02-58archivesIIS.rar
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ArchiveLocation=\\prodfiles4.cco\logs\windowsiislogs\archive\
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ArchiveSysLogfile=\\prodfiles4.cco\logs\windowsiislogs\archive\03-25-02-58archivesyslog.rar
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ArchiveSysLogTempfile=\\prodfiles4.cco\logs\windowsiislogs\archive\03-25-02-58archivesyslog.txt
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              IISLogLocation=\\prodfiles4.cco\logs\windowsiislogs\temp
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumAliasCount=4096
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumDriveCount=4096
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumErrorCount=256
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumFunctionCount=4096
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumHistoryCount=64
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaximumVariableCount=4096
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaxLogSizeInMB=20
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MaxThreads=25
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              MyInvocation=System.Management.Automation.InvocationInfo
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ProcessedIISLogLocation=\\prodfiles4.cco\logs\windowsiislogs\processed\*.log
\\prodfiles4.cco\logs\windowsiislogs\syslog\syslog.log 03-25-15  02:58:52       [000]        [INIT]        0s                  [0167]       [05219462]        [000]              ServersFile=\\prodfiles4.cco\logs\ActiveServersAndPools\servers_testmulti.txt
No Keep flag for \\prodiispub6.cco\C$\WINDOWS\system32\LogFiles\W3SVC1289165116 and server prodiispub6.cco and sitename cobrands CORE cobrands WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrands WARN
No Keep flag for \\prodiispub5.cco\C$\WINDOWS\system32\LogFiles\W3SVC1289165116 and server prodiispub5.cco and sitename cobrands CORE cobrands WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrands WARN
No Keep flag for \\prodiispub6.cco\c$\WINDOWS\system32\LogFiles\W3SVC1099807143 and server prodiispub6.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
No Keep flag for \\prodiispub5.cco\c$\WINDOWS\system32\LogFiles\W3SVC1099807143 and server prodiispub5.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
Cannot find path '\\prodiislegacy01.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1099807143:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy01.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143 and server prodiislegacy01.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
No Keep flag for \\prodiispriv34.CCO\C$\inetpub\logs\LogFiles\W3SVC3 and server prodiispriv34.CCO and sitename internal.gateway CORE internal.gateway WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE internal.gateway WARN
deletion of log \\prodiispriv34.CCO\C$\inetpub\logs\LogFiles\W3SVC3\u_extend678843.log completed CORE WARN
deletion of log \\prodiispriv34.CCO\C$\inetpub\logs\LogFiles\W3SVC3\u_extend678842.log completed CORE WARN
Cannot find path '\\prodiislegacy02.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1289165116:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy02.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116 and server prodiislegacy02.cco and sitename cobrand CORE cobrand WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrand WARN
No Keep flag for \\prodiispfpro01.cco\c$\inetpub\logs\LogFiles\W3SVC1 and server prodiispfpro01.cco and sitename pfpro CORE pfpro WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE pfpro WARN
Cannot find path '\\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1289165116:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116 and server prodiislegacy03.cco and sitename cobrand CORE cobrand WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrand WARN
Cannot find path '\\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1289165116:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116 and server prodiislegacy03.cco and sitename cobrand CORE cobrand WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrand WARN
Cannot find path '\\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC2063602439' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC2063602439:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC2063602439 and server prodiislegacy03.cco and sitename privateeye CORE privateeye WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE privateeye WARN
No Keep flag for \\prodiispriv30.cco\c$\inetpub\logs\LogFiles\W3SVC1 and server prodiispriv30.cco and sitename transactions CORE transactions WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE transactions WARN
Cannot find path '\\prodiislegacy02.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1099807143:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy02.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143 and server prodiislegacy02.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
Cannot find path '\\prodiislegacy01.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1289165116:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy01.cco\c$\inetpub\logs\LogFiles\W3SVC1289165116 and server prodiislegacy01.cco and sitename cobrand CORE cobrand WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE cobrand WARN
Cannot find path '\\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1099807143:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143 and server prodiislegacy03.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
Cannot find path '\\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\prodiislegacy...W3SVC1099807143:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
 
No Keep flag for \\prodiislegacy03.cco\c$\inetpub\logs\LogFiles\W3SVC1099807143 and server prodiislegacy03.cco and sitename PRN CORE PRN WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE PRN WARN
No Keep flag for \\prodiispfpro03.cco\c$\inetpub\logs\LogFiles\W3SVC1 and server prodiispfpro03.cco and sitename pfpro CORE pfpro WARN
Starting deletion of logs given missing flag value though will leave 3 most recent logs in place CORE pfpro WARN
No Keep flag for \\prodiisdt02.cco\c$\inetpub\logs\LogFiles\W3SVC1 and server prodiisdt02.cco and sitename DT CORE DT WARN
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xpedia

ASKER

Footech,

You are truly a genius!

Script is now working correctly on the new server.

Thank you,