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
486 views

Remove all users from all folders within a Document Library - PowerShell

How to run through all folders in a specific document library to remove inheritance and then remove all users from all folders within a specific Document Library using a Powershell script?
3
votes
1answer
641 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
613 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
387 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
711 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
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
497 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
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
394 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
2k 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
1k views

How to remove the builtin “Item” Content Type from a list using powershell?

I have a custom content type and I added this content type to a list. I now want this list to only use the custom content type and I want to remove the built-in "Item" content type. I tried ...
3
votes
1answer
38 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
1answer
31 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
3answers
304 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 ...
3
votes
2answers
459 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
1k views

How to disable anonymous access for SharePoint WebApplication with powershell

I need to create a PowerShell script that will disable anonymous access to the given SharePoint web application. However, I have thus far been unsuccessful. All scripts have been run under the ...
3
votes
1answer
130 views

Change displayed username for Google claims based users

I have set up a SharePoint 2013 environment and am using Azure ACS to authenticate users via Google. This is working really well, however in the top right corner where my user is logged in, it's ...
3
votes
1answer
1k views

GetListItems Exception

I am trying to get the contents of a Sharepoint 2007 list using Powershell. I'm able to connect to the web service but receive an exception whenever I try to call the GetListItems method. # Create ...
3
votes
1answer
128 views

Hide SPContenType in use

I'm trying to hide (or remove it from the new button drop) a SPContentType that is already in use via Powershell scripting. Even if before: $SPContentType.Hidden = $true $SPContentType.Update() I ...
3
votes
1answer
4k views

creating site collections using SharePoint management shell 2013

I am creating Site Collections for Testing SharePoint. I am using Host Named Site Collection to do that instead of the path based site collection addressing. For that Got a reference to the HNSC ...
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 ...
3
votes
2answers
196 views

Migrating changes from development site to staging site without doing a content database backup and restore

I wanted to find out the best practice to migrate changes from a development site to staging or production site. I think there should be a better way than backing up the content database on ...
3
votes
1answer
851 views

Moving list from one environment to another while preserving the GUID

I have a list template (.stp) file. I would like to restore the list and its contents in any given SharePoint environment. The conditions for restoring are listed below: Restore the list to any ...
3
votes
2answers
2k views

Restoring SPSite not working with different versions

I'm having issues with restoring my .bak files to my own sharepoint environment due to version difference. My version is currently: Sharepoint Server with Enterprise Client Access License Ms ...
3
votes
1answer
309 views

Forefront Run Profiles not created when creating user profile service from PowerShell

I'm trying to achieve a full User Profile setup for SharePoint 2010 using PowerShell, including the creation of the Active Directory connection. My PowerShell source code comes mainly from here. // ...
3
votes
1answer
20 views

SharePoint Online - Adding Group Manager to TermStore Group using Powershell

Is it possible to add Group Manager, Contributor to a TermStore Group in SharePoint Online using PowerShell? Something like: $termGroup.AddGroupManager(“GroupName”) ...
3
votes
1answer
168 views

Cannot find an overload for “Load” and the argument count: “1”

I am working on some utility functions to ease the administration of our O365 tenant by importing some modules as part of my profile. The thing I'm working on currently is being able to provision One ...
3
votes
3answers
96 views

Can I suppress Import-SPWeb log created message

Using the SharePoint Administrator PowerShell command Import-SPWeb, I loop through many backup files, each generates the output: Log file generated: C:\somepath\backup.cmp.import.log With the ...
3
votes
1answer
178 views

Can I use Set-SPOUser to set an O365 security group as a secondary site collection administrator?

Is there a way to use Set-SPOUser to add a security group I created in Office 365 as a secondary site collection administrator? I have the security group's Login Name which begins with "s-1-5-21-..." ...
3
votes
1answer
292 views

PassPhrase is not valid in SharePoint 2013. Powershell not connecting to SharePoint farm to reset passphrase

I have removed Project server instance from my SharePoint 2013 farm. After that when I tried to run the configuration wizard, I found that the old passphrase is not valid. When I open powershell, the ...
3
votes
1answer
128 views

Powershell Command builder

I am trying make a c# application which runs sharepoint cmdlets in management shell 2010. I have tried below code: protected void ExecuteCode_Click(object sender, EventArgs e) { ...
3
votes
2answers
207 views

Identify Started Service App by Powershell

I am using the following Powershell script in hopes of identifying Started service applications by server. Spot checking the results shows something unexpected. For instance, I know Lotus Notes ...
3
votes
0answers
317 views

Update Custom Forms with Powershell

I'm trying to update custom forms of SharePoint lists in a large amount of SharePoint 2010 subsites with powershell. I'm not quite sure what the correct approach is. The form itself can be found as ...
3
votes
1answer
454 views

Import-Spweb is changing the user id if the user does not exist in the organisation anymore

We had to restore a list (which has versionsing enabled) in our PROD enviornment SP 2010 August CU 2012. We used the following command metioned below: Import-SPWeb http://example.com/projects/myList ...
3
votes
0answers
249 views

Filling a External Data field (BCS) in a list trough Powershell [duplicate]

I have a list of which one of the columns is of the "External Data" type, linked to a BCS service. We called this column "Organisation", and when I check the generated fields in powershell (with ...
2
votes
4answers
5k views

How to set columns visible only in Display Form on a Column used by a Content Type

I have a column that we will call C. This Column is associated to a Content Type (CT). If I go to the properties of the CT -> Column C I can set the column to be Facoltative or Hidden: If I put it ...
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 ...
2
votes
4answers
6k views

SharePoint 2010: What is the difference between backing up a Site Collection and exporting a Site Collection?

Lectori salutem, I am reading into backup and restore operations in SharePoint 2010. I have noticed that in Central Administration > Backup and Restore > Granular Backup there is the possibility to ...
2
votes
4answers
6k views

Delete a large number of documents from a site

Can anyone tell me the quickest way to delete a large number of documents from a site library if you are an administrator for the site? Any powershell commands?
2
votes
3answers
13k views

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

I have a powershell script that deploys about 12 web parts. They have all been created in the manner through visual studio 2010 and are being deployed to sharepoint 2010. I am getting the following ...
2
votes
1answer
4k views

Does Update-SPSolution trigger a SPFeature.Upgrade()?

I'm looking into Feature versioning and upgrading in SharePoint 2010 and I don't know exactly if the Update-SPSolution cmdlet triggers a SPFeature.Upgrade(). Are <UpgradeActions> elements ...
2
votes
2answers
6k views

Fetch list item properties using Powershell

I have document library. I want to replace some document properties using powershell. There are multiple properties associated with each document. First I'll need to check for all documents if that ...
2
votes
2answers
5k views

Powershell to list all sites and subsites in SharePoint Online

I know about "Get-SPWebApplication" but it's not available in Online. Anyone? Thanks,
2
votes
2answers
5k views

powershell script to move/copy files from network path to SharePoint sub folder

if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $spWeb=Get-SPWeb -identity ...
2
votes
1answer
1k views

Need to kill all Workflows on a list in Sharepoint 2010

Can someone explain to me how to do this using Powershell?
2
votes
3answers
2k views

Make timerjob runs on specific server?

I have an already developed timer job that is running on front end servers, but I want to set it to run on application servers only. Can I do this with PowerShell without modifying any code of the ...
2
votes
3answers
7k views

Programatically, how do I change the default document content type of a Document Library in SP2007?

I have 40 document library lists and I have to change the default document content type for these document libraries. In UI, this is possible by On the document library, go to Settings > Document ...