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

3
votes
1answer
96 views

Powershell Command builder

I am trying make a c# application which runs sharepoint cmdlets in management shell 2010. I have tried below code: protected void ExecuteCode_Click(object sender, EventArgs e) { ...
3
votes
1answer
227 views

Deploying and Installing Sharepoint apps into App catalog using CSOM

Can anyone suggest me on how to use SP.AppCatalog() in JSOM or CSOM and get the all apps in AppCatalog, Not AppInstances..
3
votes
2answers
109 views

Identify Started Service App by Powershell

I am using the following Powershell script in hopes of identifying Started service applications by server. Spot checking the results shows something unexpected. For instance, I know Lotus Notes ...
3
votes
1answer
328 views

Import-Spweb is changing the user id if the user does not exist in the organisation anymore

We had to restore a list (which has versionsing enabled) in our PROD enviornment SP 2010 August CU 2012. We used the following command metioned below: Import-SPWeb http://example.com/projects/myList ...
3
votes
0answers
249 views

Filling a External Data field (BCS) in a list trough Powershell [duplicate]

I have a list of which one of the columns is of the "External Data" type, linked to a BCS service. We called this column "Organisation", and when I check the generated fields in powershell (with ...
2
votes
4answers
5k views

SharePoint 2010: What is the difference between backing up a Site Collection and exporting a Site Collection?

Lectori salutem, I am reading into backup and restore operations in SharePoint 2010. I have noticed that in Central Administration > Backup and Restore > Granular Backup there is the possibility to ...
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
3k 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
5k 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
1k 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
443 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
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
3answers
431 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
3answers
6k views

Programatically, how do I change the default document content type of a Document Library in SP2007?

I have 40 document library lists and I have to change the default document content type for these document libraries. In UI, this is possible by On the document library, go to Settings > Document ...
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
345 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
830 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
3answers
244 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
538 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
1k 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
4answers
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
4k 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
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
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
2answers
2k views

SharePoint 2010 PowerShell Getting List Column Object From Display Name Intermittently Gets Column

I'm trying to get columns in a list from the display name, however this isn't always working. Here is where I try to get the column, and check to see if it's null. I've tried it on display names ...
2
votes
2answers
724 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
246 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
2answers
10k 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
321 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
822 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
559 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
889 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
2answers
4k 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
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
398 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
107 views

Powershell return properly the selected value from multi-choice field

In my powershell script I want to fetch the value of a mulit-choice-field in a sharepoint list. The problem is that although the value is returned, it is encased in ;# - for example, I would receive ...
2
votes
2answers
476 views

How to change the user profile property value for all users via PowerShell?

We have a bool: User profile property. Is there a way to set the value of this field to 'false' for all users? The user profile property exists only in the SharePoint and not in AD.
2
votes
1answer
170 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"] ...