Hi,
I'm not sure if this is at all possible & I can't find any documentation that suggests it is, so I'm hoping someone here might be able to answer the questions.
I've created a PowerShell toolkit that I want to install on production servers, this toolkit contains a series of diagnostic utilities to do things like take memory dumps and upload them to a shared storage location.
I can register a restricted PS-Session configuration, using Register-PSSessionConfiguration, which includes a custom script that restricts the cmdlets available, but loads the utilities. This all works perfectly and we're very happy with the solution.
The issue I have is that a user can enter this restricted environment by using:
Enter-PsSession REMOTEHOST -ConfigurationName "MyConfiguration"
But they can also access an unrestricted remote shell by just using:
Enter-PsSession REMOTEHOST
Is there any way to configure the default PSSessionConfiguration to use my restricted environment script?
Many thanks,