powershell - Select-Object throws an exception when used in a constrained session -


when configure restricted powershell session so:

new-pssessionconfigurationfile -path c:\psscripts\test.pssc `                                -description 'delegation endpoint repro' `                                -executionpolicy restricted `                                -sessiontype restrictedremoteserver `                                -languagemode fulllanguage  register-pssessionconfiguration -path 'c:\psscripts\test.pssc' `                                 -name testsession `                                 -showsecuritydescriptorui `                                 -accessmode remote `                                 -force 

since session of type restrictiedremoteserver, expect select-object cmdlet available end-users. indeed, when users connect session , issue get-command, select-object returned on of available cmdlets. when select-object used (for example -last parameter), following exception thrown.

[localhost]: ps> get-command | select-object -last 1 parameter cannot found matches parameter name 'last'.     + categoryinfo          : invalidargument: (:) [select-object], parameterbindingexception     + fullyqualifiederrorid : namedparameternotfound,select-object 

what missing?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -