Share via


The term Select-Object is not recognized as the cmdlet

Question

Wednesday, September 25, 2013 3:33 PM

Hi,

I am getting the message as 'The term Select-Object is not recognized as the cmdlet' when i am trying to open the SharePoint 2010 Management Shell.Even with 'write-host' i am getting the same message. Of course i added Microsoft.SharePoint.Powershell snapin and the current account has rights to access SharePoint_Shell_Access in DB .But still i am getting the same message.Please share your thoughts on the same to cross over this issue.

Regards,

Naga Sudheer M

Thanks & Regards, Sudheer

All replies (3)

Wednesday, September 25, 2013 3:41 PM

These come through in the Microsoft.PowerShell.Utility module

http://technet.microsoft.com/en-us/library/hh849958.aspx

when you open powershell, and run Get-Module you should see at least two entries, one is Microsoft.PowerShell. Management and the other is Microsoft.PowerShell.Utility.

try to run Import-Module Microsoft.PowerShell.Utility

Please mark my response as an answer if appropriate.
Learn.SharePoint.com


Thursday, September 26, 2013 3:13 AM

Hi,

I am getting below error after running Import-Module Microsoft.PowerShell.Utility

Error

Import-Module : The specified module 'Microsoft.PowerShell.Utility' was not loaded because no valid module file was
found in any module directory.
At line:1 char:1

  • Import-Module Microsoft.PowerShell.Utility

    + CategoryInfo          : ResourceUnavailable: (Microsoft.PowerShell.Utility:String) [Import-Module], FileNotFound
   Exception
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Regards,

Naga Sudheer M

Thanks & Regards, Sudheer


Wednesday, January 1, 2014 8:37 AM

I got work around for my problem.

Mine is an SharePoint 2013 box. I found $env:psmodulepath as C:\Users\user_name\Documents\WindowsPowerShell\Modules;;C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules;C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules As you can notice that AppFabric module path has repeated itself. I guess AppFabric has messed up with the psmodulepath while it got installed. So, I modified the PSModulePath variable under registry (at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment) to include ;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules After this change, I am able to execute select & other basic cmdlets.

Sayed K. Ali (MCTS) Senior SharePoint Administrator ​<img src="http://www.sayed-ali.com/Lists/Photos/image001.png" alt="" style="margin:5px">