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)

2
votes
2answers
18k 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
918 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
521 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
2k 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
1answer
2k 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
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
3answers
936 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
2answers
2k views

Is there a way to create site pages and insert webpart into it via PowerShell?

We are creating a powershell script to create lists, groups and to install wsp packages. There are 5 wsp each containing 1 webpart. Is there any way via powershell to create 1 site page and embed 1 ...
2
votes
2answers
4k 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
795 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
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
12k 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
4answers
3k 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
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 ...
2
votes
3answers
513 views

How to get the active farm-scoped features in PowerShell?

If i want to get the Features that are activated on a WebApplication, i can use the SPWebApplication.Features property, which will return a SPFeatureCollection with the Features activated for the ...
2
votes
2answers
404 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
1answer
3k views

How to update document meta data using powershell

I'm iterating through all files of a document library using powershell trying to update some files in some folders. I can read the file properties but I'm not able to update them. Here is my code: ...
2
votes
1answer
3k 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
468 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
1k 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
997 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
218 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
416 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
1answer
63 views

Remove characters in string - and add it to array - Regex - Powershell - Migration

I'm trying to migrate data from a Excel spreadsheet to user profile properties. Data ex: Energy & Resources;#67777;#Financial Services;#137;#Consumer Business & Transportation;#23;#Real ...
2
votes
1answer
136 views

Edit Lookup table programmatically via Project Server Interface (PSI)

I have a standard lookup table database table "LOOKUP_TABLE_VALUES" in a SharePoint 2013 solution with columns like: LT_UID - for the Lookup table GUID LT_VALUE_FULL - storing the values with the ...
2
votes
3answers
509 views

How to find all empty folders within a document library, maybe with a PowerShell script?

We have discovered a library where a user has written script to create auto numbered folders, within a library... we now have 32000 of them!!? I need a powershell script that will list the folders, ...
2
votes
1answer
210 views

Check If Document Library Already Exists Using Powershell

How can I perform a check if a document library already exists using Powershell in SharePoint 2010?
2
votes
2answers
789 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
123 views

good tutorial to learn using Sharepoint 2013 with powershell

I am looking to create some scripts that I will need for my SharePoint, but my power-shell skills are very bad. Is there any good tutorial that will help me become better at it ? It can be anything ...
2
votes
2answers
2k 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
212 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
639 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
2k views

PowerShell script that deleted quicklaunch entries

I'm running a PowerShell script that deletes about 10 entries per minute. Is there a way to do this more efficiently/quicker, i.e. directly from the database? How can this be achieved? $web = ...
2
votes
1answer
1k views

Undo checkout with PowerShell

I'm trying to undo a checkout with PowerShell but the function name doesn't seem to be recognized. Here is the code that I used. $dList = [Microsoft.Sharepoint.SPDocumentLibrary]$list ...
2
votes
3answers
6k views

Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url

I'm trying to activate a web level feature using powershell with the following command: Enable-SPFeature –identity 3ad4787b-e859-432c-be22-c772725e0dbc -URL ...
2
votes
1answer
124 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
1k views

Powershell to set a Web Application's Trusted Identity Provider to an STS and NTLM?

I've created a custom STS and have setup trust with SharePoint via New-SPTrustedIdentityTokenIssuer. I can use Central Admin to configure a Web Application to use both NTLM and the STS, however I ...
2
votes
1answer
253 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
733 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

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
700 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
2k 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
2k 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
3k 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 ...
2
votes
1answer
224 views

Is there a way to execute commandline-arguments via code from a feature/webpart (Sharepoint 2010)?

I mean, for example, something like a deployment. Is it possible to force something like this from within a webpart using the "standard" sharepoint functionality? Using the central-administration is ...