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
9answers
1k 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
1answer
267 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
1answer
246 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
2answers
836 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
9k 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
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
56 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
197 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
145 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
1k 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
5k 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
3k views

Powershell to list specific user profiles

Is there a way to list specific user profiles instead all the users? Ex: List all the accounts starting with IT. It should list all the users with ITUser1,ITUser2, ect.... The following script ...
2
votes
2answers
265 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
569 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
453 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
789 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
195 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
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
1answer
384 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
1answer
134 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
58 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
96 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
207 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
392 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

Sharepoint Master Page Powershell

We have over 80 Site Collections in our Web Application is there a way through power shell that i can set the same master page for all the site collections.
2
votes
1answer
581 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
843 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

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
177 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 ...
2
votes
2answers
6k views

Permissions error setting up SharePoint 2010 PowerShell account privileges

SharePoint Foundation 2010 SP1 on Windows Server 2008 R2 Std SP1 (Domain Controller) in a simple farm with a single SQL Server 2008 SP1/Windows Server 2008 Std SP2 backend I realise installing SP on ...
2
votes
2answers
3k views

How to read items in a BCS external list with PowerShell?

Is there a way that you get information from an external list (created from SPD for a specific ECT) differently than you do from a "normal" SharePoint list when using PowerShell? I did the following: ...
2
votes
2answers
516 views

Updating relative links and images in wiki library

I have a wiki library which contents is automatically copied onto another site. Some of the pages in the library contain images, the links to those images are relative. Example: page: ...
2
votes
2answers
2k views

How can I use Powershell to move a list from a development to a production Sharepoint 2010 box?

I'd like to copy a list (and its contents) onto our production server. I've been trying to use the Export-SPWeb cmdlet, using this article as a reference, but I can't seem to get it to cooperate. I've ...
2
votes
2answers
504 views

MOSS2007 PowerShell vs Console Application

I'm looking for a few examples of when you would be better off writing a PowerShell script vs writing a Console Application to perform some operations against the Object Model in a MOSS2007 or WSS 3.0 ...
2
votes
1answer
37 views

How to turn off MDS on all site collections and sites?

We have got a web application with 400 site collections and multiple sites, is there a way to turn off the MDS feature for entire web application?
2
votes
1answer
28 views

Need site inventory tool for SharePoint 2007 that doesn't require server access

We're migrating from 2007 to 2010 and I need a full inventory (site, libraries, lists) so I can remove stuff that's no longer being used. However, everything I've found so far requires server access. ...
2
votes
2answers
73 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
110 views

List Template does not show up in PowerShell

I have about 15 List templates in the (gallery > List templates) and none of them show up when I run following script: $web.ListTemplates | ForEach{ write-host $_.Name } I think that is the reason ...
2
votes
1answer
51 views

How to display the values in powershell in Excel format

I have got certian output of list properties using powershell script. I need to display it in an excel format. I require the code to display the result in excel format?
2
votes
1answer
159 views

using powershell script update the page name in sharepoint 2013

I wan to change the page name with Power shell script. When I had run the script I was given an spexception error: Exception calling "CheckOut" with "0" argument(s): "The URL ...
2
votes
2answers
87 views

Is it possible to export/import a Sharepoint 2010 subsite?

Is there a way to import/export or backup/restore a sub site? I have a site collection at http://someurl.mycompany.com/sites/content. I have sub sites under that site collection that were created by ...
2
votes
1answer
30 views

Copy of Test Phase to Production Phase

If you have two phase, test and production phase and test phase has a database with 40 table + 55 views + all cubes from analysis service. The production phase is a reflection of test phase. Is it ...
2
votes
2answers
50 views

is it possible to compare environments?

I'm trying to find a tool or a PowerShell script which allow me to compare 2 environments, my goal is to compare my production farm and my pre prod farm and to compare as many settings as possible, ...