0

Howsit!

I'm in need of a solution, I need to add a snap-in - and can't.

I'm attempting to run processes on my company's share-point site

Thus the real error: Get-SPSite: 'Get SPSite' is not recognized as the name of a cmdlet, function, script file,..

Need to Add a snap-in to solve this (working systematically from example 3: from the site http://technet.microsoft.com/en-us/library/hh849705(v=wps.620).aspx

I am stuck on fourth command (not sure which installutil to select or download?): It does not exist/ cannot find the installutil: ManagementCmdlets.dll - does anyone know where to download this?

I tried a file called Microsoft.PowerShell.Commands.Management.dll however

the installation failed, and the rollback has been performed

Powershell code is below (if this may help):

PS C:\Users\Gisintern1.PPF> get-pssnapin -registered
PS C:\Users\Gisintern1.PPF> set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil.exe
PS C:\Users\Gisintern1.PPF> installutil C:\Dev\Management\ManagementCmdlets.dll
**Microsoft (R) .NET Framework Installation utility Version 2.0.50727.5420
Copyright (c) Microsoft Corporation.  All rights reserved.
Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Dev\Management\ManagementCmdlets.dll' or one of its dependencies. 
The system cannot find the file specified..
mightybyte
  • 7,282
  • 3
  • 23
  • 39

1 Answers1

0

Per that site, it appears that the ManagementCmdlets.dll is a fictitious snap-in, only used by the example to show how the process works.

I haven't tried managing SharePoint via PowerShell myself, but I did a little digging. From the looks of it, the Get-SPSite snap-in is installed along with SharePoint 2010, and I would assume some other versions of it as well. On the same server that SharePoint is installed on I would try to run:

Add-PsSnapin Microsoft.SharePoint.PowerShell
Get-SPSite

Alternatively (and per https://blogs.technet.com/b/heyscriptingguy/archive/2010/09/20/get-started-managing-sharepoint-2010-with-powershell-cmdlets.aspx) there may be a "SharePoint Management Shell" that can be started which would seem to load the proper snap-in(s) automatically into an otherwise normal PowerShell environment.

Hopefully one of these two ideas helps you out.