Closed timriker closed 4 years ago
@timriker getting the following error with version 5.4.1
PS C:\BigIP\BigIPReport-5.4.1> .\bigipreport-5.4.1.ps1
2020-05-29 05:43:17 Successfully loaded the config file: C:\BigIP\BigIPReport-5.4.1/bigipreportconfig.xml
2020-05-29 05:43:17 Starting: PSCommandPath=C:\BigIP\BigIPReport-5.4.1\bigipreport-5.4.1.ps1 ConfigurationFile=C:\BigIP\BigIPReport-5.4.1/bigipreportconfig.xml PollLoadBalancer= Location= PSScriptRoot=C:\BigIP\BigIPReport-5.4.1
2020-05-29 05:43:17 Pre-execution checks
2020-05-29 05:43:17 Pre execution checks were successful
Add-Type: C:\BigIP\BigIPReport-5.4.1\bigipreport-5.4.1.ps1:731
Line |
731 | Add-Type @'
| ~~~
| Cannot add type. The type name 'Certificate' already exists.
Posted on DevCentral too. Types are added by the script with Add-Type. There is no Remove-Type. Running a different version of the script will fail if the types have changed. The solution is to start a new shell so the types won't exist.
This might work. but in case the type has changed it'd not pick up the changes:
if (-not ([System.Management.Automation.PSTypeName]'Certificate').Type)
{
Add-Type ...
}
Adding MaxJobs to the xml for this setting. Default is an arbitrary 20 jobs.