Skip to content

Invoke-Command should support -StrictMode #2692

@jpsnover

Description

@jpsnover

This would effectly add the command "Set-StrictMode -version 5" at the beginning of the scriptblock.
The reason why should should be a parameter vs just having the user add that line to every script is that it allows someone to set this via $PSDefaultParameterValues and have it affect an entire corpus of scripts (without having to change the scripts itself).

Here is the workaround that I wrote to implement this:
https://www.powershellgallery.com/packages/Invoke-Command

Metadata

Metadata

Assignees

No one assigned

    Labels

    Hacktoberfest-AcceptedAccepted to participate in HacktoberfestIssue-Enhancementthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.WG-RemotingPSRP issues with any transport layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions