SessionState.ThrowIfNotVisible(CommandOrigin, Object) Method

Definition

Utility to check the visibility of an object based on the current command origin. If the object implements IHasSessionStateEntryVisibility then the check will be made. If the check fails, then an exception will be thrown...

public:
 static void ThrowIfNotVisible(System::Management::Automation::CommandOrigin origin, System::Object ^ valueToCheck);

Parameters

origin
CommandOrigin

The command origin value to check against...

valueToCheck
Object

The object to check.

Applies to