Posts Tagged 'alias'

Calling STSADM from within a PowerShell script

For various SharePoint admin tasks, there are times when you need to execute an STSADM command from within a PowerShell script. 

Before you can do that, you’ll need to tell PowerShell where to find STSADM executable. You can do that by adding the following line to your profile.ps1 file (usually located in C:\WINDOWS\system32\windowspowershell\v1.0 ):

Set-Alias -Name stsadm -Value $env:CommonProgramFiles”\Microsoft Shared\Web Server Extensions\12\BIN\STSADM.EXE”

Now you can use stsadm in your scripts and it should work beautifully…


RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 350,836 hits