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
2k views

Setting Document Library's Created and Modified timestamps to reflect actual file's timestamps

I have a Document Library in SP 2010 with a bunch of files organized into folders. Each file has the Last Modified timestamp and Created timestamp set to the time they were uploaded. However, we need ...
1
vote
2answers
1k views

PurgeNonImportedObjects doesn’t remove user accounts?

Our customer has switched his AD to a new one. We have migrated users in SharePoint, but the User Profile Service doesn’t work for 73 of 7024 users. These users can log in to SharePoint, but doesn’t ...
6
votes
4answers
8k views

Update-SPSolution does not Deploy Solution

I am trying to deploy or update a WSP solution to SharePoint in a script using Update-SPSolution. The problem I have is that if this is the initial install I need to use Add-SPSolution and then ...
0
votes
1answer
490 views

PowerShell or script to make all lists and libraries unsearchable?

I realize I can do this at the site or site collection level (can't remember which). However, I need every one turned off individually so that I can then go back and choose which libraries/lists are ...
3
votes
2answers
3k 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.
0
votes
2answers
980 views

Powershell to find specific feature in a list or library

I have a particular feature which has been orphaned and I no longer have access to re-install it. However it is locked in to three lists that I have in my site collection. I can find it in one of the ...
0
votes
1answer
116 views

Trying to create list with ECT

I'm trying to create list from External content types with powershell. I'm trying to get the model, through this line : $Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType Model -Name ...
7
votes
1answer
7k views

Remove a single user from all site collections in a web application using powershell

Is there a way I can choose to remove a single user from all site collections within a single web application using powershell. There are number of user profiles whose domain account has been blocked ...
0
votes
1answer
701 views

Remove all custom sharepoint 2010 features

I want to remove all custom sharepoint 2010 features from my farm: The scritp below gets them, but doesn't remove them. How should this be modified to remove them? $url = "Your site URL here" ...
0
votes
2answers
275 views

How to update values in a list for everyone's personalizedView?

We have a custom list that has a personalized view of important links for each of our employees. ListName is "Important Links". Column names are: URL, OwningUser, etc. For example, CNN could be one ...
2
votes
3answers
1k views

How do I set the OSearch14 Service Account via PowerShell

I'm in the process of Scripting a deployment of SharePoint 2010 and FAST. Normally to set the Service Account of a SharePoint service one would use the ProcessIdentity property, like so: $procId = ...
0
votes
1answer
444 views

people picker in sharepoint

I have recently configured a two way domain trust between two domains.And I want people picker to be able to see across only one domain. I have done this by setting stsadm property through command.I ...
1
vote
3answers
1k views

Cant´t activate a custom feature with PowerShell but with the GUI

I want to activate a custom feature with PowerShell on a few sites in my environment. When I´m doing this job over the GUI, everything is perfect. But when I´, doing it with my script, the feature ...
3
votes
3answers
11k views

How do I programatically change the content type of an existing file?

Is there some way to change the content type of a file using PowerShell? Ideally I'd like to write a function that one would point at a specific document library and it would pull down an array of ...
0
votes
1answer
215 views

Site Provisioning in Hosted Environments

I am looking for a solution that would allow me to provision sites, in environments where I don't have server access (hosting, Office 365). My issue: I need to provide site collections or sites to my ...
0
votes
2answers
2k views

Script to reset list item versions for all Sites

I'm looking for a way to reset the number of versions to "2" for all lists and libraries that have version control enabled. Is there a PowerShell script or something that can handle this? The idea ...
4
votes
4answers
1k views

Add a Web Part Zone to “My Newsfeed” Page via PowerShell

I've done a fair amount of looking into this idea without promising leads. Let me define my problem: I need to add a third column (as a Web Part Zone) to the "My Newsfeed" page in My Sites. The ...
2
votes
1answer
4k views

Filter return results on Get-SPUser?

Having an SharePoint 2010 installation I try to filter the return result of Get-SPUser but I don't see any possible ways to get a single user or filtered users back. Get-SPUser -Web ...
1
vote
3answers
2k views

Is there any powershell editor available for sharepoint?

I am looking for a free powershell editor that supports intellisense for SharePoint related object and methods. Can anyone suggest me anything?
4
votes
4answers
14k views

How to activate feature using powershell script?

I need to activate specific feature to all site collection which is inside the particular web application using powershell script?
2
votes
1answer
901 views

How can i update a cross site list (all items) from another list with the same ID numbers

I am trying to copy a list from one site to multiple other sites, i have tried to do this in powershell on an hourly basis using scheduled tasks, i was intending to write a powershell script to do the ...
3
votes
1answer
1k views

Update vti_author in SPDocumentLibrary item using PowerShell?

I want to update the property vti_author in an item in a SPDocumentLibrary, but it doesn't work. The items original vti_author is the same even after running this script, why? $spSite = Get-SPSite ...
1
vote
1answer
738 views

How to add file to a SharePoint Library that is in a subsite

I can successfully connect to the "Shared Documents" library at root site and add a file to it. What I can't do is connect to a library that is a few layers down so I can add the file: The Root Site ...
1
vote
2answers
3k views

PowerShell to Remove Site User Permission

I am looking for some help removing a User Permission from a site using PowerShell.
4
votes
4answers
8k views

Get name of Farm account using Powershell

How can I get the name of the Farm account ? I can see it listed in Get-SPManagedAccount, but do not see any properties on the SPManagedAccount objects to be able to dynamically filter by and ...
0
votes
2answers
617 views

foreach “Webs” works on dev but not in staging

I had a script I was working on a while back that got put on the back burner, but now I'm trying to finish it up, and I thought I had reached that point. I was running this script on our development ...
3
votes
2answers
1k views

PowerShell - Create Search Service App Pools (All 3)

How many App Pools are created when you create the Search Service Application? How can I create all the Search Service Application App Pools using PowerShell and give them all unique names? I've ...
0
votes
2answers
3k views

Using Import-SPweb -IncludeUserSecurity slow

I am quite often asked to move lists/document libraries etc. between Sharepoint sites and retain the Author, Modified by data and the like. Now I can do this fine using the -IncludeUserSecurity switch ...
0
votes
2answers
305 views

Is it possible to start a workflow instance on a list item when the workflow is not associated with the list?

I am writing a powershell script to find out all the In-Progress workflow instances in a site collection. Usually, the suggested way to do this is to find associated workflows to a list and check the ...
0
votes
2answers
3k views

Getting SPUser object from “Group or People” SPListItem field

I am using a Powershell and CAML query to return items from a list. The list contains a "Group or People" field in which I have not seeing how to get the email and login information of the user. I ...
0
votes
1answer
2k views

User profile Audience Using Power shell

#Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin ...
0
votes
1answer
211 views

how to set webapplication.RightsMask via PowerShell

trying to change one of the rights assigned in RightsMask with Powershell on a SharePoint 2010 server. $webApp=get-spwebapplication http://myWeb $webApp.RightsMask I want to be able to enable/disable ...
1
vote
1answer
1k views

Using get-spuser returns null SIDs

I am very new to SharePoint (2010 in this case) and have been tasked with writing a PowerShell script that will synchronize some information between Active Directory and SharePoint users. I figured ...
1
vote
2answers
553 views

Share Point Activity feed power shell script error

#Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin ...
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' ...
0
votes
2answers
2k views

add columns to a list via powershell

I am trying to do the following but I have some exceptions, I dont know whats wrong with this. Update 2: $site = Get-SPSite -Identity "http://url/workspaces/TS1/" $list = ...
1
vote
2answers
795 views

How to determine SharePoint version used during backup creation in order to restore it?

I have a SC backup, but when trying to restore it on my test environment with PowerShell, got the following error: SharePoint server version mismatch. SharePoint versions on both servers should match. ...
1
vote
2answers
560 views

Powershell query features returns wrong result

I'm currently writing a powershell script which upgrades a set of solutions then a set of features from those solutions. After the solution upgrades everything looks great until I Call QueryFeatures ...
2
votes
1answer
716 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 ...
0
votes
2answers
3k views

SharePoint 2010, Powershell - problem with looping through all Document Libraries, create view and set it as default

I'm hoping that someone can give me a hand with two issues in Powershell that I have with modifying views in SharePoint 2010. I've had some help on this from someone over at stackoverflow but hasn't ...
2
votes
2answers
1k views

Activate Feature in Powershell and specify custom properties

I want to activate a feature with custom properties. It is easy to do in onet.xml by providing Properties: <Feature ID=“78277796-98D9-4276-B7D2-E3374AAC43D8“> <Properties> ...
1
vote
2answers
2k views

Running Sharepoint PowerShell from C# code

I am looking for a way to run PowerShell from C# code. What is more, I need the code to activate the following features in my Sharepoint site that gets created: 1) SharePoint Server Publishing ...
0
votes
1answer
516 views

field type URL. how to prepare csv for this?

I am running a powershell to import csv into a list. There is one field "ProviderURL" in the list. In the csv I had http://www.contoso.com and it imported fine. Howerver, I would like it to be Contoso ...
0
votes
1answer
747 views

How to deploy all farm solutions in PowerShell?

Please tell me how to write a Powershell script that will deploy all added farm solutions.
0
votes
1answer
2k views

delete field (column) from a list powershell, error Collection has been modified

following is my code: foreach($field in $list.Fields) { if($field.StaticName -eq "temp1" -or $field.StaticName -eq "temp2") { if($field.Id -ne $depId) { ...
0
votes
2answers
507 views

sharepoint 2010 custom wiki library

I am trying below powershell script for change wiki content Add-PSSnapin microsoft.sharepoint.powershell -ea silentlycontinue $web = Get-SPWeb "http://dooku/enterprisewiki" $list = ...
2
votes
1answer
2k views

Powershell CheckIn Throwing null-valued expression error

I've got a script that goes through subwebs of a sie and adds a webpart to the page. Everything is functioning correctly, until it's time to check the file in. I get the following error: You ...
2
votes
1answer
948 views

SharePoint 2010 People Picker Does Not Resolve USERS/GROUPS.Please Help!

I am Running SharePoint 2010 Site , recently we migrated Web App from Development Server to Production Server(Different Domain Controller). In Development Server I used to be able to Use People ...
0
votes
3answers
2k views

SPSite Object Problem When Trying To Loop Through Sites

I'm working in a Sharepoint 2007 environment. I'm trying to loop through a site, and it's subsites, and add a webpart to any pages found. #Add SharePoint assemblies ...
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 ...