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

2
votes
5answers
2k views

Adding new webparts to an already deployed solution

I have a webpart project built in visual studio 2010 and it has been deployed successfully to my production environment. I recently had to make some changes to the webpart and also needed to add a ...
2
votes
3answers
11k 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 ...
2
votes
4answers
2k views

How to set columns visible only in Display Form on a Column used by a Content Type

I have a column that we will call C. This Column is associated to a Content Type (CT). If I go to the properties of the CT -> Column C I can set the column to be Facoltative or Hidden: If I put it ...
2
votes
4answers
4k views

Delete a large number of documents from a site

Can anyone tell me the quickest way to delete a large number of documents from a site library if you are an administrator for the site? Any powershell commands?
2
votes
3answers
952 views

Make timerjob runs on specific server?

I have an already developed timer job that is running on front end servers, but I want to set it to run on application servers only. Can I do this with PowerShell without modifying any code of the ...
2
votes
4answers
3k views

How to download a sharepoint aspx page from server using powershell

I made some changes to sp aspx pages on a environment. I want to move these changes to my TFS. Usually one takes the pages using designer, save it to the desktop, and save that to TFS. But is there ...
2
votes
1answer
3k views

Does Update-SPSolution trigger a SPFeature.Upgrade()?

I'm looking into Feature versioning and upgrading in SharePoint 2010 and I don't know exactly if the Update-SPSolution cmdlet triggers a SPFeature.Upgrade(). Are <UpgradeActions> elements ...
2
votes
1answer
384 views

How to check user has visited site collection first time?

I want to know which users have visited the site first time from the added users. For ex, I have added 40 users in the sharepoint but only 10 users have logged in and 30 have never logged in the site. ...
2
votes
3answers
399 views

Recreate a List in many subsites of a site collection using powershell

I have to recreate the same List in several subsites within a site collection. I saved my List as a template but it will be very time consuming to add the List manually to all of my subsites using the ...
2
votes
2answers
1k views

Powershell backup/restore or import/export to keep all document versions?

I need to move a test SharePoint 2010 site collection and database to a new server (and new database). I want to make sure that I keep user security and all document versions. Does backup/restore keep ...
2
votes
3answers
3k views

How to apply new page layout to all existing pages in a site?

I really need your help. I've created a new page layout in SharePoint Designer 2010 and I want to apply it to all existing pages in a site. Another thing to note, some subsites and pages use ...
2
votes
9answers
2k views

“Specified Cast is Not Valid” in PowerShell When Getting a Display Group for Search

When run, this code returns an error on the last line "Error Calling GetDisplayGroup with 2 arguments, Specified cast is not valid". $site=get-spsite http://xxx/sites/xxx ...
2
votes
4answers
2k views

Executing powershell script from a timer job

Is it possible to call a powershell script from a sharepoint timer job ? or are there any security issues involved in doing so? Regards, Jeevan
2
votes
2answers
87 views

Fetch list item properties using Powershell

I have document library. I want to replace some document properties using powershell. There are multiple properties associated with each document. First I'll need to check for all documents if that ...
2
votes
2answers
137 views

How can I create a new RoleDefinition in powershell

I need to create a new RoleDefinition and apply it to a group. Is that possible? How can I do that?
2
votes
1answer
438 views

Broken Lists Cannot Be Deleted

There are a few lists in a SharePoint Server 2010 development environment that are broken. Due to this situation, clicking the lists in the SharePoint Web interface throw .NET exceptions, and viewing ...
2
votes
3answers
3k views

What is a user friendly way to run Powershell scripts?

I've made several powershell script for my customers. They have very little knowledge about SharePoint and Powershell. I want to let them run these scripts when they want, but don't want them to ...
2
votes
2answers
932 views

PowerShell Scripts

Does anybody know if there's some way to delete items from an SPList using PowerShell scripting? If is this possible, has anybody any good tutorial? Thanks!!!
2
votes
1answer
1k views

STSADM.exe, PowerShell v2.0 and Management Shell

What is the difference between the three? STSADM.exe PowerShell v2.0 Management Shell I understand you can run powershell scripts in the management shell, but I thought I remember reading that ...
2
votes
5answers
10k views

Enable-SPFeature not working

I am using PowerShell script to deploy and activate a feature in the same script. Everything works fine and I can see my feature in the Sharepoint Root folder (14 hive). I run it using Farm Admin. ...
2
votes
1answer
1k views

How do you determine the Consumers for a given Content Type?

Is there a quick powershell script to find out all the consumers who are consuming a given content type? If yes, how do you do this with powershell?
2
votes
3answers
2k views

SharePoint 2010 - Add WebPart to a Web with PowerShell

I want to add a webpart to a great number of existing pages. Is there any PowerShell command to add a webpart to a webpart page?
2
votes
3answers
3k views

How to find the SiteCollection created date in Sharepoint 2010?

I want to find the sitecollection created and last content modified date in Sharepoint 2010, found a SPSite property for last content modified date however could not find any clue to find the created ...
2
votes
3answers
3k views

Why are Taxonomy Term Stores always empty?

Using the following code I should be able to access the Taxonomy Term Stores: $site = new-object Microsoft.SharePoint.SPSite("http://localhost") $session = new-object ...
2
votes
3answers
138 views

Slow CSV writing for huge document libraries in powershell

by using below PowerShell script, i get all the items list from the document library including sub folders hierarchy in a CSV file. This script works very fine for small data but for huge data like ...
2
votes
2answers
515 views

Powershell to delete checked-out documents with no checked-in version

I have created a script to delete all documents inside a library, including documents in folders and the folders themselves. However, it seems that the script will not remove documents that have no ...
2
votes
2answers
213 views

EnsureSiteAssetsLibrary throwing exception

The short story, when trying to execute SPListCollection.EnsureSiteAssetsLibrary I get: Exception calling "EnsureSiteAssetsLibrary" with "0" argument(s): "A list, survey, discussion board, or ...
2
votes
3answers
3k views

Retrieve All Lists With Specific Name Using Powershell

I have a powershell script that I am trying to use to add a column (Created) to a specific view in a specific list in multiple webs. The list exists in every sub web. The view exists in every list. ...
2
votes
2answers
8k views

Powershell command to find active features for site collection

Im trying to find active futures for my site from below script but im prompt with error ( cannot call a method on a null-valued expression) Appreciate your help $activeFeatures = Get-SPFeature ...
2
votes
1answer
2k views

Need to change the owner of an existing SharePoint group using Powershell

I have succesfully been able to create a SharePoint group and assign it an owner. But now I noticed that it only works if the group has not been created. So now I need to add a way to modify the ...
2
votes
2answers
302 views

SharePoint 2010 - List CanReceiveEmail Disable/Enable

After migration from SharePoint 2007 to 2010 the list feature to receive emails is not working on migrated sites. The functionality is enabled in the UI and when I´m checking $list.CanReceiveEmail ...
2
votes
2answers
717 views

Powershell Enumerate through all site collections but not include one specific site collection

I am partially not even sure how to Google this question because whatever I type never seems to bring back any relevant search results. I currently have a working script that is set to go through and ...
2
votes
1answer
503 views

Can You Add a WebPart to a Wiki Home Page via Powershell?

Salvete! Is it possible to add a webpart to a Wiki Home Page via Powershell? I have 100 sites for which I need to add a web-part to their home-pages. I know this is easily possible with normal ...
2
votes
1answer
849 views

Why am I still getting quota reached upload error after increasing the quota for a site collection?

A user was trying to upload documents to their site collection and reached the quota limit. I increased the quota for him but he is still getting the same error that the quota has been reached when he ...
2
votes
3answers
199 views

How to check if there is any active solution deployment running on the server?

Is there a way to know if there is any active solution deployment running on SharePoint server? I'm wondering how to do this using a PowerShell script?
2
votes
1answer
391 views

Enabling a Sharepoint Feature with Powershell

I am new to PowerShell and have been asked to modify a script that is used to activate features on a site. The script has some latency issues between the two feature activations, so I decided to make ...
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 ...
2
votes
2answers
3k 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 ...
2
votes
2answers
287 views

Powershell to list all sites and subsites in SharePoint Online

I know about "Get-SPWebApplication" but it's not available in Online. Anyone? Thanks,
2
votes
1answer
161 views

How to get a list of items from a particular folder

The Following code write all the items from the list to CSV file. $list.Items| foreach { $obj = New-Object PSObject -Property @{ "Title" = $_["Title"] ...
2
votes
1answer
157 views

SharePoint deployment - Deployed to: GAC (WebURL/Global) / BIN

I know that when we deploy farm solutions then they are available under Central Admin --> System Settings --> Manage farm solutions. In this list of solutions, there are 3 columns. Name, Status and ...
2
votes
1answer
102 views

RoleAssigments are being assigned by default to all new pages

I am pretty new to SharePoint, so please let me know if there is some more info or clarification required. I am creating a webapplication with certain SP groups, libraries and pages in that order by ...
2
votes
1answer
219 views

Is there a service that controls PSSnapin Microsoft.SharePoint.Powershell?

Got a service call yesterday that the backup hasn't been done for three months. Looking at the task scheduler history, there where no errors. So I run the PowerShell script myself, and got an exeption ...
2
votes
1answer
534 views

Problem with PowerShell script in Tasks Sheduler Windows Server 2008 R2 - SharePoint Shell Access?

I have a problem with PowerShell script in Tasks Sheduler in Windows Server 2008 R2. I try to run Sheduler Tasks which run batch file which run PowerShell script to Backup Farm and while I choose "Run ...
2
votes
2answers
3k views

Change Document Library folder's Modified timestamp to latest timestamp inside

I have a Sharepoint 2010 Document Library with a range of subfolders and some files within each of them. The problem is, right now every subfolder has the same Modified timestamp, and I want each ...
2
votes
2answers
2k views

Can I edit a publishing page using Powershell?

I have a bunch (technical term) of publishing pages within a single subsite of my site collection that contain a broken link. I'm wonder if it's at all possible to use Powershell to perform a 'global' ...
2
votes
1answer
619 views

Can't save webpart after editing with PowerShell

I'm using the code below to edit the image in a webpart: $webPartCollection = $web.GetWebPartCollection("default.aspx","Shared") $imagePart = $webPartCollection | Where-Object { $_.Title -eq "Site ...
2
votes
1answer
1k views

Indexing sharepoint lists with ps

I would like to index a column in a list with powershell. I have a problem, when i retrieve the list how can i set what field should be put to index? Is there a special command, can anyone provide me ...
2
votes
1answer
1k views

change maxlength of an existing column in a list via powershell?

I have the following code to create a list, however I need to increase via powershell the maxlength of one column $spWeb = Get-SPWeb -Identity http://ost-dev1.ciredev1.local $listTemplate = ...
2
votes
1answer
2k views

Powershell script to update pages. Dispose page afterwards?

I'm using a PowerShell script to update page titles and PublishingPageLayout's in a particular web that has 391 pages. However, I'm finding that the longer the script runs, the slower each pages is ...