Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Update compatibility to PowerShell 7 #9

Description

@turner2151uk

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions