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
vote
3answers
972 views

What would be powershell version from this c# code?

What would be powershell version of this c# code? I am having hard time get this work in Powershell especially stringbuilder and files.add line where utf8encoding is. Here is my powershell version of ...
4
votes
6answers
575 views

SharePoint related PowerShell tutorials

I am really interested in PowerShell for SharePoint Administration. Please help me with some books, sources or tutotials.
6
votes
3answers
616 views

How to create a site collection

I need to create a site collection so that url looks like http://hr.mycompany.com instead of http://portal.mycompany.com/hr. How do I do that?
1
vote
2answers
2k views

update SPList using csv via Powershell

knowing that is possible in PS, exporting SPList items to PS objects(link1 link2) what is the best way, to go into the other way: Create/Update an SPList from an exported csv or format-table.
1
vote
2answers
3k views

PowerShell to backup a Web application

I need a PowerShell script which could perform the following: How to Back up and Content Database of a Web Application Restore a Content Database on a newly created Web Application
1
vote
3answers
961 views

Map FAST crawled property powershell

I want to map people properties in FAST Search: crawled properties to contents hidden using powershell. I know that I can get crawled properties using Get-FASTSearchMetadataCrawledProperty but this ...
1
vote
2answers
363 views

check if versioning enabled on sharepoint 2010 list

I have a PowerShell script that updates document libraries to make sure that versioning is enabled: $list.EnableVersioning = $true How can I check whether versioning is enabled before making the ...
2
votes
0answers
509 views

Getting Null returned from taxonomy field in PowerShell?

I am trying to update a metadata field when adding an item to document library. All the other columns are updating. The error is on this line and basically $taxfield is returning null. $taxField = ...
9
votes
2answers
2k views

SPWeb being closed when getting list by powershell. What's wrong?

When I run this little piece of powershell code: $w = Get-SPWeb http://localhost $l = $w.List["some list"] I get Unexpected error message to my Sharepoint ULS log Detected use of SPRequest for ...
0
votes
1answer
460 views

PowerShell Script: HashTable error

I wrote a PowerShell script which will loop thru all the sites in the web application and add Field internalname and title to the HashTable. So i pass this HashTable from one function to another. But ...
0
votes
1answer
129 views

How to identify if the list field come from web or site col?

I have a following task in sharepoint 2007 to identify if the list fields come from the parent web or site col, this i'm planning to do with a powershell script. So what I want to do is to iterate ...
2
votes
2answers
2k views

Importing/uploading files from file share to SP 2010 Doc Lib using CSV

Can someone please provide a good link (or if you already have a powershell working) that can import files from file share into SharePoint document library using a cvs flat file. I have about 20 ...
1
vote
1answer
527 views

Add Calendar list to WikiPage using Powershell

I have inserted a Calendar list to a page(SitePages/Home.aspx) using a powershell script, But I want to insert it in to a specific location as shown in image. When I insert the calendar list it insert ...
4
votes
2answers
2k views

Powershell Script to Set Quota

We are planning to apply quotas on our site collections of about 60 which are already created in our web application . i thought of achieving that using power shell but we are facing a small problem ...
1
vote
1answer
239 views

Download Versions of a SharePoint 2007 Document?

Can anyone point me in the direction of downloading all the versions of a file in a SharePoint 2007 document library? Is this possible with PowerShell, C#, or another way?
0
votes
1answer
718 views

Batch updating a new Audience Targeting column

We have a list with around 900 items, and recently the end-users decided to enable "Audience Targeting" on it. This added a new Audience Targeting column. The users now want to assign a default ...
0
votes
1answer
2k views

PowerShell to iterate through all SharePoint Lists

Is it possible to iterate through all the lists in a site collections and create a folder name "Test" using PowerShell? Fine Regards
1
vote
1answer
269 views

Look & Feel - Pagelayouts and Site Templates

I recently ran into a rather unfortunate assignment. It regards the selection of pagelayouts and sitetemplates which subsites should be able to use. As I'm supposed to change this for 20+ site ...
1
vote
1answer
328 views

Is it possible to run Content Deployment incrementally using code?

I am running some Content Deployment jobs using the code but the jobs are not run incrementally, instead they are run by exporting all the objects. Is it possible to run them incrementally using the ...
0
votes
1answer
334 views

How to move content within fields in a page layout?

I'm working on a requirement where I'm adding a few fields in an already existing Page Layout and also renaming all the fields. After adding the fields via code,I want to move content within fields ...
0
votes
1answer
2k views

Error: The file or folder name contains characters that are not permitted. Please use a different name

I took backup from our staging server and restored on my local development machine. My Powershell script is not raising any error while restoration. But when I open the site in browser, it's giving me ...
1
vote
1answer
1k views

Add multiple farm solutions using power shell (Not Deploy)

I am trying to migrate around 200 wsps from one SharePoint 2010 farm to another. I have already copied the wsp files to a folder in the new farm. I need a powershell script that can take the path of ...
3
votes
6answers
10k views

How to delete all items in aList using PowerShell

I am using following PowerShell script to delete all items of the List. It's working fine but take too long for huge lists. Is there any efficient way of clearing list items, something like truncate ...
0
votes
3answers
2k views

Can an InfoPath Form call a PowerShell script that makes use of the submitted form values?

I would like to build an InfoPath form that users can use to request a new Active Directory account (e.g. for a new employee). Once the form is submitted, I would like it to then run a PowerShell ...
0
votes
2answers
1k views

New-SPWebApplication application pool account is not found

I am trying to create a new web application using PowerShell. I keep getting the error application pool account is not found! How do I solve this? I tried adding the new web application to ...
1
vote
2answers
2k views

DisableEventFiring using PowerShell

How can I call DisableEventFiring using PowerShell? C# code like this : Type typeInfo = typeof(SPEventReceiverBase); MethodInfo disable = typeInfo.GetMethod("DisableEventFiring", ...
2
votes
1answer
336 views

Is it possible to use powershell to change the content type of a page layout after its been uploaded to a masterpage gallery?

Im trying to automate as much of the upgrade I am working on and one of the manual steps is to change the page layout of 5 root webs of site collections, each of which has to have this new page layout ...
2
votes
3answers
648 views

Installed TFS 2010, where is SharePoint Management Shell?

I just did a fresh (single-server) install of TFS 2010, which has all the Sharepoint (WSS 3.0) components. But I want to move the SharePoint log files to a different drive, and all instructions point ...
1
vote
1answer
654 views

User Profile Property

In share point i have defined a custom property and in central admin it is showing that 414 users are using this property is there any way that i can get the details of the user using that property ...
0
votes
1answer
85 views

Right Management Sharepoint

I have a sharepoint list. Users should be able to create new items and change some attributes. I gave full access for the users on the list items. But now I think there is a security gap: what ...
0
votes
1answer
99 views

How to open or access a webpart's XML and rename its namespace Using PowerShell?

We have some web parts deployed in our Sites, which are not working due to Migration from MOSS to SPS2010, and I need to replace the namespace used by power shell by accessing the Webpart's XML..
1
vote
1answer
247 views

Using powershell to list managed metadata terms

I'd like to gather statistics on managed metadata use. Instead of quering the content by the terms (one by one), I'd like to run through selected lists, listing the used terms per item. Is this ...
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
2answers
5k views

get Items from Sharepoint-list

I've created a list in sharepoint by using visualstudio. The List is based on a custom contenttype. Because I want to delete the title field I've switched off inheritation of the Contenttype: ...
3
votes
1answer
257 views

Enumerating Features in a WSP or Deployed Solution using PowerShell

I am creating a build script that will automatically create a Test Site, Deploy all wsp to that site and activate all the features. The problem I have is how do I enumerate the feature Names or GUID's ...
2
votes
5answers
3k 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 ...
1
vote
1answer
1k 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 ...
0
votes
2answers
737 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 ...
5
votes
4answers
5k 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
318 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
871 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
115 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 ...
6
votes
1answer
4k 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
660 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
254 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
256 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 ...
2
votes
3answers
8k 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 ...