Categories

Archives

SharePoint 2010: RemoteStsAdm PowerShell Module is available via NuGet

English:

Few month ago I have introduced RemoteStsAdm, a PowerShell module that enable you to execute StsAdm.exe remotely. StsAdm.exe is a command line administration tools for SharePoint. Unfortunately to run StsAdm, one must log-in to SharePoint server member – since the tool can not be executed remotely. RemoteStsAdm is to answer this problem, allowing admin to execute StsAdm remotely. You can download the source code from MSDN Galery here or read the original article in previous post here

Yesterday, I have released ImportPSModule that will easy PowerShell module distribution, allow update notification and configuration. The RemoteStsAdm PowerShell module is now available via NuGet, so that you don’t need to download and extract manually. All will be done seamlessly, and whenever we got script update – you will get notified as soon as you open PowerShell session.

So what do you wait for, open PowerShell session and type following:

Import-PSModule RemoteStsAdm 

Related Posts:

PowerShell: Introducing Import-PSModule

You may already know PsGet by Chaliy or PsGet by Anurse for PowerShell module distribution. They have created PowerShell module distribution mechanism with different approach.

Chaliy uses PowerShell script approach and customized module directory. Everytime you want to distribute your PowerShell module, you have to fork his github project to update Directory.xml content. Even tough the instruction in https://github.com/chaliy/psget/wiki/How-to-add-your-module-to-the-directory is very clear, however I think there is risk of incorrect Directory.xml modification.

Anurse uses PowerShell manifest approach and standard NuGet package to download and put module in appropriate location. In this case you can create a NuGet package containing PowerShell files and publish it to NuGet repository. Using his module, you will be able to get PowerShell module from NuGet repository right to your console. I like this approach because it uses standard NuGet package and publishing process. However, sometimes I want to be able to register the new module in my profile. I also want to ensure that I always use latest PowerShell Module package – ie. update local module automatically when there is new module in NuGet repository.

So then, I started to create Import-PSModule a PowerShell script module that will give you functionalities such as:

  1. Importing PS Module from NuGet repository
  2. Load imported module to current session
  3. Register imported module to current user profile or all user profile
  4. Un-register imported module from current user profile or all user profile
  5. Auto-update imported module when user start PowerShell session

To start using the module, start PowerShell session and type following

  

(new-object Net.WebClient).DownloadString("http://blog.libinuko.com/wp-content/plugins/download-monitor/download.php?id=1") | iex 

The script will perform following actions:

  1. Download latest ImportPSModule from central NuGet repository.
  2. Install the package to desired location. If you choose to install in User-Module or Global-Module, all future packages will be installed under Module path. If you choose to install in other folder, then all future package will be installed within installation folder.
  3. Load the ImportPSModule to the memory. It will also  download latest NuGet.CommandLine package if you don't have in your system.

So what do you waiting for? Start to install the module and publish your PowerShell module in NuGet repository. But don't forget TAG "PSModule" to your NuGet package.

If you want to validate InstallPSModule.ps1, please click here InstallPSModule (109) .

Related Posts:

SharePoint 2010 : RemoteStsAdm PowerShell Module

English The STSADM.exe is command-line tool for administration of Office SharePoint Server (SharePoint 2007, SharePoint 2010). It is installed on the same location as SharePoint Products and Technologies location: %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12\bin (for SharePoint 2007) or %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\14\bin (for SharePoint 2010). You must be Farm Administrator to be able to run the tool. By [...] [read more...]

SharePoint: Writing Custom Web Service for SharePoint in Supported Mode (part-2)

English Before we continue, I suggest you read the first part here ; it gives basic idea of how it works. The purpose of part-2 is to make real implementation of Custom Web Service , but it is not the only way to do it. There are some key points that I want to show here: We [...] [read more...]