Good afternoon,
We are now running some later versions of PowerShell and would like to run this script - would it please be possible to update the script to be able to run on a later PowerShell version? (e.g PowerShell 7.xx)
As Nagios now outputs this as a status on newer Windows hosts:
At C:Program FilesNSClient++scriptspowershellcheck_ms_win_disk_load.ps1:23 char:13+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~The string is missing the terminator: ".At C:\Program Files\NSClient++\scripts\powershell\check_ms_win_disk_load.ps1:23 char:11+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~~~Cannot process the #requires statement because it is not in the correct format.The #requires statement must be in one of the following formats:"#requires -shellid ""#requires -version <major.minor>""#requires -psedition ""#requires -pssnapin [-version <major.minor>]""#requires -modules ""#requires -runasadministrator"+ CategoryInfo : ParserError: (:) [], ParseException+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
Many thanks
Good afternoon,
We are now running some later versions of PowerShell and would like to run this script - would it please be possible to update the script to be able to run on a later PowerShell version? (e.g PowerShell 7.xx)
As Nagios now outputs this as a status on newer Windows hosts:
At C:Program FilesNSClient++scriptspowershellcheck_ms_win_disk_load.ps1:23 char:13+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~The string is missing the terminator: ".At C:\Program Files\NSClient++\scripts\powershell\check_ms_win_disk_load.ps1:23 char:11+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~~~Cannot process the #requires statement because it is not in the correct format.The #requires statement must be in one of the following formats:"#requires -shellid ""#requires -version <major.minor>""#requires -psedition ""#requires -pssnapin [-version <major.minor>]""#requires -modules ""#requires -runasadministrator"+ CategoryInfo : ParserError: (:) [], ParseException+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
Many thanks