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)

5
votes
1answer
9k views

Adding a site column and add it to a content type from PowerShell issue

Within a PS script, I'm trying to add a site column and add this column to a custom content type. Here is my script : add-pssnapin Microsoft.SharePoint.PowerShell -EA 0 function ...
5
votes
5answers
10k views

SharePoint 2010 - Backup Term Store as CSV

Is there any PowerShell Script to export the Term Store? I have not found any OOTB solution, only import as csv, but no export as csv. Is there a script which can export the Term Store as csv? (So ...
5
votes
3answers
7k views

Use Powershell to iterate through all UserProfile properties

The following script spits out all UserProfile properties for users on Sharepoint 2007: [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") ...
5
votes
1answer
7k views

Get User by loginname using powershell

We have the following script that was running on sharepoint 2010 where we had clasic windows authentication. When we moved to SP 2013, the authentication was changed to Claims. The following code ...
5
votes
2answers
3k views

I dont have permissions to use SharePoint PowerShell, what to do?

I am a developer and would like to deploy a wsp to a server (win2k8r2) from my customer. I log in with some user created special for me. When I start SharePoint PowerShell I got this error: The local ...
5
votes
1answer
1k views

How to import term sets to Managed Metadata Service using PowerShell and CSV file

How do I import a CSV file to metadata service using PowerShell? The CSV file has 500 rows and seven levels in it (Importing of term store).
5
votes
3answers
526 views

Powershell, why did the development team decide to only support async executions?

I've been getting into power shell recently. I am beyond impressed with it, and I think its perhaps the most exciting SharePoint tool yet. It is extremely versatile and it really does live up to its ...
5
votes
2answers
4k views

Is it possible to change an existing list's URL?

Is it possible to change a list's URL from something like /site/Lists/ListName to /site/ListName in SharePoint 2010?
5
votes
1answer
2k views

Get total size of attached files on all list items in SharePoint 2007with PowerShell v2.0

Using Powershell, I have to get the total size of all attached files on all list items for a generic list. I tried using the function below but this displays the total length of names for the attached ...
5
votes
2answers
1k views

Automate SharePoint Site build with NAnt

As part of a new SharePoint 2010 project I am trying to automate the build of the SharePoint site on our staging system using NAnt, something we use a lot with our C# builds. I have created a ...
5
votes
2answers
82 views

Create new SharePoint user using SharePoint Online Management Shell

I have a *.sharepoint.com tenant provisioned through singing up for Office 365. Is there a way to create a new user for the tenant using PowerShell (for SharePoint Online)? This would normally be ...
5
votes
4answers
1k views

Deploying and Installing Sharepoint apps into App catalog using CSOM

Can anyone suggest me on how to use SP.AppCatalog() in JSOM or CSOM and get the all apps in AppCatalog, Not AppInstances..
5
votes
1answer
693 views

What update I have to install in Foundation 2010 to run a backup that asks for version 4.1.13.0?

I'm trying to run a backup from a Sharepoint Server 2010 that runs a version 14.0.6101.5008: The version of my local Sharepoint Foundation 2010 server is 14.0.6114.5000: When I run the backup ...
5
votes
1answer
157 views

Multilingual user interface: Is it possible to Export Translations using PowerShell?

I have a SharePoint Server 2010 Enterprise with several language packs installed. The Alternate Languages have been enabled in the Site Settings and several items have been translated. Is it possible ...
5
votes
2answers
276 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-..." ...
4
votes
3answers
289 views

No. of subsites in a site collection?

How to get number of subsites in a site collection using Powershell?
4
votes
5answers
8k views

I cant delete or restore a site collection or repair database

When I try to do a restore of a site collection, restore-spsite -Identity https://xx/10014628/ -Path D:\SiteCollectionBackups\10014628.bak -Force -Confirm I get: restore-spsite : ...
4
votes
1answer
7k views

Using PowerShell and the New-SPWeb command, how can I add a site to a site collection with the -UseParentTopNav argument?

Whats the correct format of the New-SPWeb command when using the UseParentTopNav argument? I'm trying to add a new site, I've tried passing in the following New-SPWeb -url "http://server" -Template ...
4
votes
6answers
797 views

SharePoint related PowerShell tutorials

I am really interested in PowerShell for SharePoint Administration. Please help me with some books, sources or tutotials.
4
votes
4answers
15k 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?
4
votes
2answers
8k views

Powershell and checking for Site existence

I am an nube to Powershell, so I think I have a pretty basic question here.... How do I determine if a SPWeb exists? I want to perform some operations on a site based on a URL passed in as a ...
4
votes
1answer
10k views

How to update a deployed content-type?

I created a content-type and applied it inside a document library. Now, if I go to the conent-type gallery and delete one of the fields, and then go back to the library and view the available ...
4
votes
2answers
16k views

How to add Add-PSSnapin Microsoft.SharePoint.PowerShell to machine without SharePoint

How I can add Add-PSSnapin Microsoft.SharePoint.PowerShell to machine without SharePoint 2010? I try to run PowerShell script to Backup Farm on Windows Server 2008 R2 without Sharepoint but while I ...
4
votes
3answers
8k views

powershell script to add a managed metadata column

I'm looking for a powershell script that allows me add metadata column in SharePoint list. Thanks
4
votes
3answers
558 views

SPO Retrieve HasUniqueRoleAssignements property using Powershell

I am trying to retrieve HasUniqueRoleAssignements property for multiple SharePoint Online lists using Powershell. I can do it for each one in SharePoint on-premises: ...
4
votes
3answers
2k views

Deploying a site template and instantiate it in the same PowerShell script?

I want to create a PowerShell script that : add a farm solution that only contains a site template deploy the solution globally wait for the deploy job to finish create a site collection based on ...
4
votes
4answers
3k views

How to programmatically determine which application pool a service application is using?

Is there a way to programmatically determine which application pool a service application is using? Further i would like to get the information about the service account the app pool is using.
4
votes
2answers
3k 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 ...
4
votes
2answers
1k views

How to modify a list's template?

I have a list that was created from a Custom List template. Most users have been interacting with it through a calendar view that was created. Now, some users would like to connect this list to their ...
4
votes
2answers
3k views

Is there a PowerShell cmdlet to delete a Timer Job?

Is there a PowerShell cmdlet to delete a Timer Job in SharePoint 2010?
4
votes
4answers
25k views

Iterating through a SharePoint List and Items with PowerShell

I am trying to iterate over a List and view properties on some items that live within that list, and down one or two levels; this is on a SharePoint 2010 server. So far I have been able to connect to ...
4
votes
1answer
56 views

delete Site collections sharepoint 2010

I need to delete all site collections that contains personal in it. I get all the site collections by the cmdlet $sites= get-spsite -limit all| Where {$_.url -like "*personal*"} foreach($site in ...
4
votes
1answer
1k views

SharePoint feature deployment and scope via PowerShell

We use SP2013 and PowerShell to deploy wsps. When installing the wsp via PowerShell: CASE 1: Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -GACDeployment Above ...
4
votes
2answers
242 views

What are the cmdlets for SharePoint 2013 that have no GUI equivalent?

I've not found a comprehensive list on anywhere of the PowerShell cmdlets for SharePoint 2013 whose function or output cannot be achieved via the GUI (Central Admin, Site Settings, etc). I would ...
4
votes
3answers
7k views

PowerShell and the client object model: “The collection has not been initialized”

I'm trying to grant a user permission to a SharePoint site using PowerShell and the client object model. The code I'm using is as follows: # Setup context $context=New-Object ...
4
votes
1answer
42 views

Connect-SPOService : Could not connect to SharePoint Online

I've followed these steps on technet but had no success: https://technet.microsoft.com/en-us/library/fp161372.aspx PS Command: Connect-SPOService -Url "https://<mydomain>-admin.sharepoint.com" ...
4
votes
2answers
297 views

Upload Master Page / Page Layouts using PowerShell

I want to know how to provision a page layout using PowerShell (CSOM) for Sharepoint Online? Any information,examples etc are welcome. I know this can be done using SharePoint hosted App as well. I ...
4
votes
2answers
70 views

Status Script in PowerShell

As a newly SharePoint supporter, I find it difficult to get overview for my company's customers SharePoint Server; e.g. installation, setup, topology. Is there a PowerShell script which can provide ...
4
votes
3answers
8k views

How to export a list in SharePoint 2010 and import it into 2013

Is there a good free way of exporting a list in SharePoint 2010 and importing it into 2013. Need to keep structure, data, attachments and other data but revisions, permissions etc not necessary. ...
4
votes
2answers
2k views

Using PowerShell how do I change the column ordering for a SharePoint List

Been trying to search for the answer to this, what I need to do is re-order the fields of a SharePoint list and propagate that change down to 300+ sites (should have used a content type, but oh well) ...
4
votes
2answers
11k views

How to use GetItems in Powershell to retrieve list items

I'm having issues with this powershell script below. It does work with SP 2007 but won't work with Sp 2010. My goal as you can see is to filter the list returned using the field Date - 1. But getting ...
4
votes
4answers
8k views

Possible to checkout a file using PowerShell?

I have a powershell script that inserts webparts onto a page. The problem is that if I don't have the page checked out it will throw the following error: Exception calling "AddWebPart" with "3" ...
4
votes
1answer
1k views

powershell not finding shared document library?

There is a document library called "shared documents" in the site I type at the prompt when running this script. The script returns the titles of several document libraries, but not "shared ...
4
votes
2answers
7k views

Error: Access Denied (Including Site Collection Admins) for all users

I have migrated to Sharepoint 2010 successfully but Search service wasn't working every time I get system error when I perform search. Today I have tried following things on server, 1] Application ...
4
votes
2answers
240 views

Uninstalling PowerShell 1.0 before installing SharePoint 2010

While going through the book "Beginning SharePoint 2010 Administration", the author was discussing how to prepare for a SharePoint 2010 server installation on a Windows 2008 R2 server. In that one of ...
4
votes
1answer
5k views

Traverse through List of Documents using PowerShell

I am new to PowerShell and would like to achieve the following tasks on a SharePoint 2010 Document library: 1) Using PowerShell, how can I display the List of Documents in a simple Document Library. ...
4
votes
1answer
2k views

how to iterate through all folders inside subfolders of root level folders

below is the code to iterate through root level folders which downloads folder starts with "a" and download sub folders from it starting with any letter. I want to download all the folder levels and ...
4
votes
1answer
2k views

Powershell: Cannot update taxonomy type column item with multiple values

I'm having a strange problem. I try to populate items' property which is of managed metadata (taxonomy) type and the update method doesn't work. This field has "allow multiple values" property ...
4
votes
1answer
190 views

Download RSS feed as xml file from Sharepoint Online using PowerShell

How it is possible to download xml file out of this feed (website) using PowerShell? I can authenticate with sharepoint using CSOM but do not what to do next. As service user is not administrator I ...
4
votes
1answer
573 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?