Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both ...

learn more… | top users | synonyms (1)

1
vote
1answer
971 views

remote execution of New-SpSite failing

I am trying to create a site collection under a web application on a remote machine using sharepoint powershell's invoke-command as below $secpasswd = ConvertTo-SecureString "Dummy" -AsPlainText ...
6
votes
2answers
1k views

How to reproduce Visual Studio “Deploy” action?

It seems like whenever I am developing a web part and I "Deploy" it from Visual Studio, everything gets deployed and works exactly as I would expect. When I take my WSP and try to install it to a ...
1
vote
1answer
1k views

Setting the top level navigation sort order with PowerShell

I've created a few sites using this command, > New-SPWeb -url "http://server" -Template "STS#0" -Name "test99" -Description "test99" -UseParentTopNav The sites are appearing in the navigation ...
4
votes
1answer
6k views

Using PowerShell and the New-SPWeb command, how can I add a site to a site collection with the -UseParentTopNav argument?

Whats the correct format of the New-SPWeb command when using the UseParentTopNav argument? I'm trying to add a new site, I've tried passing in the following New-SPWeb -url "http://server" -Template ...
1
vote
2answers
1k views

Problem adding sharepoint sandboxed solution using powershell

I have powershell script which will create the WebApplication and SiteCollection and upload the solution. Creation of WebApplication and SiteCollection for user X works fine but Add-SpUserSolution is ...
3
votes
4answers
4k views

Trying to delete a column from a sharepoint document library view - SP2010

I'm trying to delete a field (site column bound to managed metadata) in a view with the following powershell script: $spWeb = Get-SPWeb -identity http://servernamehere/docs/test/sitename $spView = ...
3
votes
1answer
4k views

What does LoadWithPartialName(“Microsoft.SharePoint”) in PowerShell script do?

I'm learning Powershell, I have this line at the top of example script, but it doesnt appear to be necessary. What does it do? Why would it be there? # SharePoint DLL ...
3
votes
2answers
6k views

Adding a WSP through the Management Shell?

I have a WSP that I am trying to install on my development SharePoint server. I used the Management Shell to do this: Add-SPSolution -LiteralPath c:\temp\mySolution.wsp and then: ...
2
votes
2answers
2k views

Powershell error - Expressions are only allowed as the first element of a pipeline

I'm learning PowerShell with SharePoint and I found this simple powershell example $timers = (Get-SPTimerJob | ($_.isDisabled -eq $false) ) $timers And I get this error Expressions are only ...
1
vote
2answers
151 views

Output workflows associated to all lists in a web application

Still very new to Powershell. I've adapted a script I found here to display information I want to see about workflows for a particular list. That looks like this: ...
3
votes
2answers
6k views

Set default value in a document library column via Powershell?

I'm looking for a powershell script that allows me to set the default value for a column in SharePoint. Thanks
2
votes
1answer
850 views

Powershell script to list LastContentModifiedDate

I'm a beginner to Powershell 1.0 and I'm looking to pull some information out of the Sharepoint 2007 farm as we start the upgrade to 2010 planning. This is what I'm wanting to do, but having some ...
2
votes
1answer
438 views

Powershell script to add Content Types

Very new to Powershell 1.0 on Sharepoint 2007. I've got a site collection with many subsites. These subsites all have a document library called Reviews. What I need to do is add a new content type ...
0
votes
1answer
686 views

Powershell script (remote) to copy List items from MOSS 2007 to SharePoint Server 2010

Any one has any ideas if we can write PowerShell script from a server which does not have SharePoint installed to copy list items from a MOSS 2007 site (MOSS server) to SharePoint 2010 (SP2010 ...
1
vote
6answers
6k views

PowerShell - Restore-SPSite Error

Restore-SPSite "http://dev.sharepoint2010/websites/0001" -path d:\temp\mybackup.bak -force I want to restore a SiteCollection. 2 Days ago the same command works fine. First I want to restore the ...
0
votes
1answer
421 views

powershell script to send mail

i want to write a power shell script in which i want to write a farm backup command and it should fire a mail on backup error. please help me to do this. thanks.
0
votes
1answer
636 views

Sharepoint Profile Replication Engine permissions warnings

I'm trying to use Microsoft's User Profile Service Replication Engine that packs with the Sharepoint 2010 Administration Tools download and I'm running into problems. Specifically I am endeavouring ...
0
votes
2answers
66 views

SharePoint 2010 & Powershell

I want to learn Powershell with SharePoint 2010, please let me know if there are resources available on the Internet.
5
votes
2answers
1k views

Automate SharePoint Site build with NAnt

As part of a new SharePoint 2010 project I am trying to automate the build of the SharePoint site on our staging system using NAnt, something we use a lot with our C# builds. I have created a ...
9
votes
1answer
8k views

PowerShell - create list from list template in list template gallery

Using PowerShell on a SharePoint 2010 site, how can you create a new list from a list template found in the list template gallery?. I want to be able to add several lists at once (just in numerically ...
1
vote
1answer
321 views

Use PowerShell to manage a SharePoint server from a client

Sorry if this has been asked frequently, but can anyone provide guidance on how to use PowerShell to manage a SharePoint server from a client machine (ie - PowerShell not running directly on the ...
0
votes
0answers
2k views

User Profile Manager and its Enum does not give me the same count

Today, I have encountered another issue with SharePoint 2010. I have a powershell script that can pull the user profile details from the User Profile store, having used UserProfileManager to get the ...
2
votes
1answer
1k views

Is there a way to import & export audience using powershell on sharepoint 2010 farm?

We have two SharePoint 2010 Farms, would like to import the audience from the Farm-A and export the same to Farm-B. Is there a way to do it using powershell on sharepoint 2010 farm? share me if you ...
0
votes
1answer
697 views

PowerShell New-SPWeb doesn't fire Event Receiver

I have a custom Site Definition that includes a feature that has an Event Receiver. When creating the custom site via the UI, the Event Receiver fires just fine. But when I create the same site via: ...
5
votes
3answers
495 views

Powershell, why did the development team decide to only support async executions?

I've been getting into power shell recently. I am beyond impressed with it, and I think its perhaps the most exciting SharePoint tool yet. It is extremely versatile and it really does live up to its ...
1
vote
1answer
164 views

filtering and though a sharepoint list items with powershell

I have tried below but not getting any result back Not sure if i'm doing this well. Can i filter in the foreach or in my if statement Thanks in advance [DateTime] $CreatedDate = $item["Created"] ...
2
votes
2answers
4k views

Do powershell modules load automatically when opening the SharePoint 2010 command shell?

I have a custom module and want to load it in the command shell without having to call it explicitly each time I delve into Powershell. Does it load automatically? If not, how can I make it load ...
3
votes
2answers
4k views

Moving a Discussion from a Discussion Board to another?

I have a SharePoint 2010 Discussion Board and it has many Discussions. Would like to move a discussion from the discussion board to another in the same location (under same site collection). I ...
0
votes
1answer
86 views

Populate MOSS2010 pages with Powershell

Is there a way to populate a MOSS 2010 installation with complete pages. We have a custom development based on MOSS and, given that we are using Agile development, we reinstall the whole solution at ...
0
votes
1answer
3k views

Adding Links to TopNavigation via Powershell

I am receiving the following error when attempting to add a Link to the Top Navigation Bar. "Exception calling "AddAsLast" with "1" argument(s): "Access is denied" Here is the code: $web = ...
0
votes
2answers
992 views

How can I delete all alerts for a user in Sharepoint 2007 without visiting every site?

A user leaves the organisation. Their account is removed from active directory. Their user object does not get removed from Sharepoint, and their alerts remain in place. This generates ...
2
votes
2answers
844 views

Updating a list column thro' a PowerShell script?

I have a sharepoint 2007 list and it has many items, I want to update a column in an item thro' a powershell script even if the item is current edited/locked by someone else. Is it posssible?
6
votes
4answers
10k views

Sharepoint 2010 powershell add-spsolution access denied

I'm trying to do a test deployment to a client server. The site collection backup completed without error. When trying to add a spsolution I get an 'Access Denied' error. I'm adding it with the ...
1
vote
3answers
548 views

Cannot enable feature with feature receiver via PowerShell

I have a problem where I can enable a feature from the UI and code in FeatureActivated method works as expected. However, if I try to enable the feature via powershell as a scripted deployment, the ...
1
vote
1answer
87 views

SP 2010 Debuging problem

Please HELP, I creating custom SP2010 intranet site for last few months. During development i didn't have any particular problem with debuging except this one and now I can't figure where's the catch. ...
3
votes
1answer
2k views

Creating the secure store service master key fails

I have some powershell to create a farm including the secure store service. The code is pretty straight forward: Update-SPSecureStoreMasterKey -ServiceApplicationProxy $id -Passphrase $passphrase ...
3
votes
1answer
1k views

How to remove the builtin “Item” Content Type from a list using powershell?

I have a custom content type and I added this content type to a list. I now want this list to only use the custom content type and I want to remove the built-in "Item" content type. I tried ...
3
votes
3answers
3k views

Nulling/clearing/updating Managed Metadata TaxonomyFieldValue?

In my recent adventures populating Managed Metadata values (aka TaxonomyFieldValue), I have encountered either a bug, potential oversight, or a substantial erosion of my sanity. In short, it does not ...
1
vote
1answer
622 views

PowerShell PostBuild Script - VS2010 Deployment

I am unable to use default Deploy Feature in VS2010, for SharePoint 2010 deployment most of the times due to complicated setup we have here. I usually have to run STSADM commands, one at a time to ...
0
votes
1answer
3k views

set-SPManagedAccount powershell command

The set-SPManagedAccount powershell command used as follows: set-spmanagedaccount -identity "domain\validdomainaccount" returns the following message: The account domain\validdomainaccount was not ...
5
votes
3answers
10k views

Download and delete documents using Powershell

I'm looking to build a Powershell script that does the following to all documents in a SharePoint 2010 document library: Downloads the document to a network file share Deletes the original document ...
1
vote
2answers
90 views

Is there a way to tell if an IIS site is connected to SharePoint?

I'd like to run a script report back what IIS Sites are SharePoint and which ones are normal sites. Using the following command in powershell, I get a long list of properties of the application pool, ...
0
votes
2answers
1k views

How Specify Application Pool and Identity When Creating Central Admin

I notice when executing the cmdlet New-SPCentralAdministration I am not able to specify the app pool name or its identity. What happens is the the cmdlet creates a new application pool with the ...
0
votes
1answer
368 views

Where can I find a powershell script that created full SharePoint 2010 site hierarchy based on an XML file?

Hi I am trying to create a powershell script to automate the creation of a SP2010 site collection. I want to have an XML file that the script can use to create the top site, sub sites, Lists, etc. ...
1
vote
2answers
3k views

Create sptimer job in c# and/or powershell

Can anyone tell me how to go about creating a timer job for sharepoint 2010 either using C# or Powershell. All the best
6
votes
2answers
166 views

What is a good way to build/install/provision a full web application?

I have a fairly simple SharePoint web application, with a publishing front end, an extranet for customers and an intranet portal. I want this web app to be easily redeployable -- pretty much a ...
0
votes
1answer
677 views

Remove-SPServiceApplication Hangs

I am attempting to run the following Powershell command to remove a service application. The command never returns and just hangs and hangs. Anyone now why? Remove-SPServiceApplication -Identity ...
0
votes
2answers
193 views

Deploying a sharepoint web service with Powershell

Is it possible to install a web service to sharepoint 2010 using powershell rather than using a solution package? I'm currently doing this via a mapped folder/ISAPI approach inside a feature but would ...
1
vote
1answer
310 views

Getting a web service with Powershell

I wanted to update a web application web.config via Powershell, and found this post really helpful. I'm intrigued as to how to this bit of code works, particularly the $closedMethod / ...
2
votes
3answers
12k views

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

I have a powershell script that deploys about 12 web parts. They have all been created in the manner through visual studio 2010 and are being deployed to sharepoint 2010. I am getting the following ...