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)

3
votes
1answer
2k views

How to authenticate when using powershell

I am trying to perform some tasks on user profiles and so, need to connect with different permissions using an account created for that. And, I am doing this with Powershell. Try { $site = ...
3
votes
5answers
3k views

Access Denied Retrieving Sites (Webs) Using PowerShell

My goal is to retrieve all the alerts for a given domain user, in SP 2007, then delete these alerts. I have referenced the following script on this site. In DEV environment, when I run the script I ...
3
votes
2answers
810 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: ...
3
votes
3answers
4k views

Nulling/clearing/updating Managed Metadata TaxonomyFieldValue?

In my recent adventures populating Managed Metadata values (aka TaxonomyFieldValue), I have encountered either a bug, potential oversight, or a substantial erosion of my sanity. In short, it does not ...
3
votes
1answer
107 views

Rename Term store (root) with powershell - managed metadata service

Is there a way to rename Term store "root" node? (yellow in the picture below) I've tried $taxonomySession = Get-SPTaxonomySession -Site $gurl $termStore = $taxonomySession.TermStores["Managed ...
3
votes
1answer
626 views

How to activate hidden features using Powershell

I want to activate site scoped and web scoped hidden features using Powershell Command. What will be the command?
3
votes
1answer
500 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?
3
votes
1answer
5k views

Find a farm's database server and instance in PowerShell

How can I find the SQL server name AND instance where my databases are stored using PowerShell? Assuming I am not using an alias and can't check cliconfg. In servers in farm, I can see the server ...
3
votes
2answers
3k 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.
3
votes
3answers
408 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 ...
3
votes
1answer
823 views

How to remove duplicate EventReceiver entries

Lately i had a bug that time-to-time added duplicate event receiver entries in SPEventReceiverDefinitionCollection. So how do i easily enumerate and remove these duplicate entries?
3
votes
3answers
3k 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 ...
3
votes
2answers
5k views

Moving a Discussion from a Discussion Board to another?

I have a SharePoint 2010 Discussion Board and it has many Discussions. Would like to move a discussion from the discussion board to another in the same location (under same site collection). I ...
3
votes
1answer
51 views

list all users in an office 365 site powershell csom

How can I list all the users from an office 365 account. I have tried this: $users = $Context.web.SiteUsers; $userinfos = $Context.web.SiteUserInfoList; ...
3
votes
2answers
686 views

Cannot delete site collection in Central Administration

I had created a site collection. But there is a problem of web-frontend server (I did not know when I created the site), so the page is always in processing. After waiting 40 mins, I closed the page. ...
3
votes
1answer
968 views

How to get SharePoint Online list url using Powershell?

I can retrieve a title $list.Title, but a title is not the same as url. In C# I can get list.DefaultViewUrl, which doesn't seem to be an option in Powershell. I found this solution with ...
3
votes
1answer
1k views

Access denied after creating site collection by using Powershell

I am using SP2013 single server dev environment. I use following scripts for creating web application and site collection. but when I browse to it, it says this site has not been shared with you. I am ...
3
votes
1answer
6k views

Uploading a file using powershell and updating column values

I am trying to upload a file from a local drive to a sharepoint doc lib, this much I have been able to find, however, I also want to update a column relative to the file, foe example, I have a company ...
3
votes
3answers
3k views

How to import term set with Use this Term Set for Site Navigation property selected using PowerShell?

$session = Get-SPTaxonomySession -Site $sitename $termStore = $session.TermStores[“Managed Metadata Application”] $group = $termstore.CreateGroup(“My New Group”) $group.Description = "My Term Group" ...
3
votes
1answer
1k views

How can I update a publishing page's page layout via PowerShell?

I have a few publishing pages that need a page layout change. The layout includes a Content Editor Web Part pointed to an html file in the site assets folder. The layout changes but the Web Part ...
3
votes
1answer
5k views

how to Update/Add list items via New-WebServiceProxy in powershell?

Over View:   I’m trying to automate updates to a SharePoint list using PowerShell via the Web service object.   The end goal is to remove items all from the list, then import new data via a csv file. ...
3
votes
1answer
287 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 ...
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.
3
votes
1answer
1k views

I am trying to rename a site using Set-SPSite command

I have created several host-named site collections and now I have to rename a couple. I used the command New-SPSite to create 'http://test1.domain.com' and was able to get everything going fine, but ...
3
votes
1answer
3k views

PowerShell Script to execute a console application

Can you please let me know how to run an exe or console application through a powershell script in SharePoint 2010.
3
votes
1answer
4k views

export / import spweb problem with DataConnectionLibrary feature

I'm attempting to export a subsite from staging to production using powershell and export-spweb and import-spweb. This worked just fine from staging to development. When we try to run this on ...
3
votes
1answer
130 views

How to show 'Created By' user name in a survey set to not show user names in results

I have a SharePoint survey configured to "Show user names in survey results = No". I need to run a report showing the name of each person who responded to the survey. I do not need to know who ...
3
votes
1answer
497 views

Add columns to existing libraries in SharePoint 2010 using Powershell

I need to add five new columns to existing SharePoint 2010 libraries using powershell. I am using below script: $ver = $host | select version if($Ver.version.major -gt 1) ...
3
votes
1answer
47 views

How can I get a listitem/page related resources from code behind

In the GUI it is possible to get the resources used by a page as shown by the image. Now I would like to get this information in the code behind so that I can modify only pages that are using a ...
3
votes
1answer
791 views

Get ULS log records programatically

Is it possible to retrieve records from ULS log using C#/SharePoint API without having to manually parse log files? I would like to display logged messages on a custom web page, and I would like to ...
3
votes
2answers
640 views

Access Denied from Migrated SP2010 -> 2013 Web App

I've migrated a web application's content database from SP2010 to SP2013. After the migration was complete, I am completely locked out of the web application. Navigating to the root site collection ...
3
votes
2answers
462 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, ...
3
votes
2answers
687 views

SharePoint 2010 - Automatically create a new content database when a size is reached

I've been asked a question today regarding the automatic creation of a new content database when the current one reaches a certain size limit. Does anyone know if this is possible? Possibly with a ...
3
votes
1answer
424 views

Add Administrator to User Profile Server via Powershell

I was recently directed to an article that explains how to add a user to the permissions list for the User Profile Service using Powershell, which worked a treat. [My original question] I'm now ...
3
votes
1answer
2k views

Create a site using powershell for a custom site definition

I have created a custom site definition which I can see and create a site using my custom definition with the UI. However, if I try to create a site using powershell I get an error saying WARNING: ...
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 ...
3
votes
1answer
550 views

How to create a content source of type “web” with the option “Only crawl within the server of each start address” via powershell

I have a requirement to create a content source of type "web" with the option "Only crawl within the server of each start address" via powershell. I am trying the below command : ...
3
votes
1answer
720 views

Connect all SSRS Reports in SharePoint library to DataSource using Powershell

We are migrating MOSS to SP2010 and have a library with hundreds of SSRS reports that use a Shared DataSource (in SharePoint Integrated mode.) Since the ReportServer database location has also ...
3
votes
2answers
3k views

Enable feature of SharePoint sandbox solution

I have a .wsp file that is deployed to the remote server by powershell script. The solution is deployed successfully and I can see the solution feature in the site collection features, I can activate ...
3
votes
1answer
409 views

User not showing on People page although listed when using Powershell

I'm using SharePoint 2010 (14.0.4763.1000) and have a user that is not showing on the People page (_layouts/people.aspx?MembershipGroupId=3). MembershipGroupId=3 is the Owner's Group. When using ...
3
votes
1answer
3k views

Set SPWeb title on a SharePoint site using PowerShell

I'm having problems setting the title of a root web in a site collection when creating it in an other language then English. When i run the script under using 1033, it works fine the site title is set ...
3
votes
1answer
3k views

Creating the secure store service master key fails

I have some powershell to create a farm including the secure store service. The code is pretty straight forward: Update-SPSecureStoreMasterKey -ServiceApplicationProxy $id -Passphrase $passphrase ...
3
votes
1answer
48 views

modifying a site column using powershell without affecting its child list columns

I have a site column of type "Text", and users have assign this column a default value at the list level. so now my site column contains null default value, while its child list columns are having a ...
3
votes
1answer
79 views

Uploading a large file to Office 365 via CSOM PowerShell

I have the following code : $FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open) $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation ...
3
votes
2answers
112 views

Changing User Profile Property for all the users in sharepoint 2010 using powershell

I want to change the edit setting and Display setting value of a user profile property called Department for all users. Can someone please tell me how to do it. I can get to the department ...
3
votes
1answer
100 views

2010 to 2013 Migration Site Collection Upgrade goes to white screen

After mounting my WSS_Content database, I went back to the migrated site collection to upgrade it, once I click "Im ready" to start the site collection upgrade, the processing screen flashes and then ...
3
votes
2answers
539 views

Office 365: Publish and deploy .app through PowerShell

Can we deploy a SharePoint hosted app in Office 365 (SharePoint online) using PowerShell? Like in SharePoint 2013 apps, we will import the .app file and then install it. Can this be done in Office ...
3
votes
2answers
277 views

Create a People Search Result Source Using PowerShell

I want to set Type="People Search Results" and in Credential Information want to set default authentication using PowerShell. I have used below code to create result source but I am not able to set ...
3
votes
3answers
334 views

How do I create a list from a template and create all views with Powershell?

I am trying to imitate the process of creating a list from a template in the UI by using a Powershell script. When you create a list from a template with the UI, all of the original list's views are ...
3
votes
2answers
2k views

List item with specific ID value

I want to copy a list items one by one to another list using PowerShell. Some items in source list are misssing. I don't want to create and delete empty items for missing ID values in source list. I ...