We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it is a bug
I have a script that run fine in ISE or the console but would not run in PRTG.
in PRTG it would output this in the log file:
(1) : using System; At C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.4.4\PoshRSJob.psm1:51 char:5 + Add-Type @" + ~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerErro r) [Add-Type], Exception + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand WARNING: (0) : No source files specified (1) : using System; Add-Type : Cannot add type. Compilation errors occurred. At C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.4.4\PoshRSJob.psm1:51 char:5 + Add-Type @" + ~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Add-Type], InvalidOperationException + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand Unable to find type [RSJob]. At C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.4.4\Public\Get-RSJob.ps1:72 char:9 + [RSJob[]]$Job, + ~~~~~~~~~ + CategoryInfo : InvalidOperation: (RSJob:TypeName) [], RuntimeException + FullyQualifiedErrorId : TypeNotFound Unable to find type [RSJob]. At C:\Program Files\WindowsPowerShell\Modules\PoshRSJob\1.7.4.4\Public\Get-RSJob.ps1:72 char:9 + [RSJob[]]$Job, + ~~~~~~~~~ + CategoryInfo : InvalidOperation: (RSJob:TypeName) [], RuntimeException + FullyQualifiedErrorId : TypeNotFound
After searching for the issue I found this: https://social.technet.microsoft.com/Forums/windows/en-US/c8467128-ab64-4920-8697-3cc76e901568/addtype-usage?forum=winserverpowershell
In PoshRSJob.psm1 I changed line 72 from:
public DateTime LastActivity = DateTime.MinValue; to public System.DateTime LastActivity = System.DateTime.MinValue;
public DateTime LastActivity = DateTime.MinValue;
public System.DateTime LastActivity = System.DateTime.MinValue;
It now appears to work.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think it is a bug
I have a script that run fine in ISE or the console but would not run in PRTG.
in PRTG it would output this in the log file:
After searching for the issue I found this:
https://social.technet.microsoft.com/Forums/windows/en-US/c8467128-ab64-4920-8697-3cc76e901568/addtype-usage?forum=winserverpowershell
In PoshRSJob.psm1 I changed line 72 from:
public DateTime LastActivity = DateTime.MinValue;
to
public System.DateTime LastActivity = System.DateTime.MinValue;
It now appears to work.
The text was updated successfully, but these errors were encountered: