Getting error in establishing remoting


I’m trying to make restricted user to be able to login via remoting to machine but getting some strange errors after connection is already established and modules are imported. It complaints about Get-Command as not being recognized and valid cmdlet which is true since language is set to NoLanguage but I never issued this command in a first place.

Session configuration,command I run and errors are below.

Copyright : © 2014 admin. All rights reserved.
ModulesToImport : WebAdministration
CompanyName : Unknown
GUID : ec41ebed-851a-4aa6-9141-30063032fb71
Author : admin
VisibleCmdlets : {ARP-, Out-}
SessionType : Default
ExecutionPolicy : Restricted
SchemaVersion :
LanguageMode : NoLanguage
Architecture : 64
Filename : %windir%\system32\pwrshplugin.dll
ResourceUri :
MaxConcurrentCommandsPerShell : 1000
Capability : {Shell}
xmlns :
MaxConcurrentUsers : 5
Name : ARP
SupportsOptions : true
ProcessIdleTimeoutSec : 0
ExactMatch : false
ConfigFilePath : C:\Windows\System32\WindowsPowerShell\v1.0\SessionConfig\McafeeGOC_ec41ebed-851a-4aa6-9
RunAsUser : Domain\admin
IdleTimeoutms : 7200000
OutputBufferingMode : Block
PSVersion : 4.0
SecurityDescriptorSddl : O:NSG:BAD:P(A;;GXGR;;;WD)(A;;GA;;;BA)(A;;GAGR;;;S-1-5-21-2042242563-1563313142-38678607
MaxShellsPerUser : 25
AutoRestart : false
MaxShells : 25
MaxIdleTimeoutms : 43200000
Uri :
SDKVersion : 2
XmlRenderingType : text
RunAsPassword : System.Security.SecureString
MaxProcessesPerShell : 15
ParentResourceUri :
Enabled : True
UseSharedProcess : false
MaxMemoryPerShellMB : 1024
lang : en-US
Permission : Everyone AccessAllowed, NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators
AccessAllowed, DNVIISADMIN2\goc AccessAllowed

Command I enter remotely
PS C:\Windows\system32> Enter-PSSession -ComputerName DNVIISADMIn2 -ConfigurationName ARP -Credential (Get-Credential)

Result I’m seeing

WARNING: The names of some imported commands from the module ‘WebAdministration’ include unapproved verbs that
might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with
the Verbose parameter. For a list of approved verbs, type Get-Verb.
Enter-PSSession : The term ‘Get-Command’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • Enter-PSSession -ComputerName DNVIISADMIn2 -ConfigurationName Mc …
  •   + CategoryInfo          : ObjectNotFound: (Get-Command:String) [Enter-PSSession], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

In many cases, PowerShell needs to run Get-Command internally so it can build a list of available commands. You’ve prevented it from doing so.

How then “NoLanguage” is supposed to work in a first place?

Found an answer on forum post. You have to enable following to allow remoting with “NoLanguage” setting and restricted commands.

“Enter-PSSession requires the Get-Command, Out-Default and Exit-PSSession cmdlets. If these cmdlets are not included in the session configuration on the remote computer, the Enter-PSSession commands fails.”