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)

2
votes
1answer
3k views

Remove-SPWebApplication not working if SPAdminV4 service is run by Local System?

I have sucessfully removed my Web Application with the following script: PS C:\Users\SP2013Farm> Remove-SPWebApplication http://portal.com -Confirm -Dele teIISSite -RemoveContentDatabases Confirm ...
4
votes
2answers
259 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 ...
1
vote
1answer
114 views

Restore-SPSite exception: SPStoredProceduresContent

I'm trying to restore a site collection backup from one server to a different server in powershell, but I get the following error: Restore-SPSite : The type initializer for ...
1
vote
2answers
340 views

Advantage of PowerShell? [closed]

I don't really clearly understand what benefit of PowerShell can be used in relation to SP 2013? What concrete example can it provide business value?
0
votes
1answer
182 views

Is it possible to add a Shell Admin when the SP server is installed on the DC?

I know there are many reasons why a SharePoint 2010 Server should not be on a Domain Controller but this is for a test Server that was rolled up quickly. The current problem is I need to run ...
1
vote
2answers
1k views

Add a level 2 subsite to quick launch of its level 1 subsite

How can I add a link on the quick launch of a subsite, which bring us on the level 2 subsite ? if I do $spweb = Get-SPWeb http://url:portwebapp/SiteCollection/SUBSITE1/SUBSITE2 Then ...
1
vote
2answers
4k views

How can i delete with powershell all sites from a sitecollection without the rootweb?

How can i delete with powershell all sites from a sitecollection without the rootweb? I found this: Get-SPSite <SiteUrl> | Get-SPWeb -Limit All | ForEach-Object {Remove-SPWeb -Identity $_ ...
0
votes
1answer
94 views

Export root site content types and selected properties to csv

I want to recreate a clients' ct structure using VS2012 so some cts and their guids I did have a go but it would be nice only to add the properties I want to my csv file rather than whole lot.. Any ...
2
votes
1answer
3k views

Set group as secondary owner of a Site Collection

All is in the subject. Is it possible to use an AD group (instead of a user) as the secondary owner of a Site collection ? Both in graphical mode and with powershell (New-SPSite ... ...
1
vote
0answers
226 views

PowerShell - Csv : foreach with conditions?

I have to import a csv file, and I want to put a condition directly in the foreach. I mean : To read the csv, i do (yes my delimiter is \ ) : $csv = Import-Csv -Delimiter \ -Path $mypath -Header ...
2
votes
1answer
129 views

Changed URL to pages, but still redirects to Pages?

I have an external website which needs to show URL in lowercase only. I don’t want to use URL Rewrite or any third party tool. Instead we decided to change the actual URL’s of the Pages Library. I’ve ...
0
votes
2answers
1k views

How to get all the SharePoint web parts that are there inside a page and not inside a web part zone

I need some C# or powershell script where I need to list down all the web parts that are defined inside a page and not inside a web part zone. I tried with GetLimitedWebPartManager, but that API, ...
3
votes
1answer
149 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 ...
0
votes
2answers
5k views

List all Pages Libraries using PowerShell and SPSiteDataQuery?

I use foreach in my scripting to make sure I get every web in every site in a specific webapp to, in this case, list (and eventually update) all Pages libraries in the SiteCollection. I've been ...
2
votes
0answers
532 views

Configure welcome pages on sites and subsites with powershell

I have to configure the welcome page for all my sites, and sub-sites. Is it possible to add content in the welcome page ? I mean : a little text, a calendar, and sections on the page's right side ...
0
votes
1answer
452 views

How to deny the requests access on a site collection

SharePoint 2013, In graphical mode, in the authorizations properties of a sites collection, we can decide if users can request the access or not. I'm wondering how to do this in powershell. $spsite ...
0
votes
1answer
1k views

Copy a Site Template to another SPWeb

I've got the following problem: There is a solution I didn't develop, that creates and configures a new Website. I have to change the Site Template that is used for this. So I changed the template ...
0
votes
1answer
28 views

Using powershell to get the connection parameters of the sql server

I'm creating a script to get the CNAME and port that the SharePoint servers use. Is there an out of the box way of doing this? I know that there are plugins I can use but would prefer not to.
1
vote
0answers
64 views

create a content/configuration database using local account with powershell

so someone set up a sharepoint dev environment for me using SP2010 on Windows 2008 R2, and SQL 2008 R2, but they didn't install it as a stand alone which is what I was going after. There is no domain ...
0
votes
1answer
546 views

How can I access/set stsadm properties from code?

I'm trying to set the ChangeLogRetentionPeriod stsadm property from code, which is normally set from the SP powershell. What is the best way to go about setting this property from code? Background: ...
0
votes
1answer
413 views

Adding Calendar Webpart to a publishing page

I am working on a script to create a Calendar in SharePoint site and then add it to a publishing page as part of site provisioning. By using the similar to what is shown in this forum, i am able to ...
0
votes
1answer
216 views

Recreating Host-Named Site Collection Fails To Show Site

I have decided to go with host-named site collections during our SharePoint 2013 migration and have been testing a single site collection to start and everything worked great. I was able to add a ...
0
votes
2answers
2k views

SharePoint 2013 : Updating user profile property using PowerShell

I am working on a powershell script to update the following user profile property on my SharePoint 2013 enviornment, Personal Site Personal Site Capabilities: 0 Feed service provider defined ...
0
votes
1answer
711 views

How to remove specific file types (i.e. docx) from multiple specific Sharepoint libaries?

I am a newbie when it comes to Powershell so I'm asking for help. In Sharepoint 2010 I have several document libraries in a single site collection that all start with the name of 'PT-' and in those ...
0
votes
1answer
87 views

If-exist-then-do condition

I'm new to powershell and I don't get how to do this: if exist $versions | select * | where {$_.versionid -eq "1024"} then do $List.GetItemById($_.Id).file.undocheckout()
2
votes
1answer
697 views

SharePoint Error when I run PSConfig

I am getting the following error when I attempt to manually run PSConfig following an update on this server from the June/July 2012 CU to the April 2013 CU (this is from the logfile): 06/10/2013 ...
1
vote
1answer
978 views

Delete List Items Using PowerShells with Date Filtering

I've been trying to delete more than 10,000 list items in SharePoint using PowerShell. So far, this is what I've had [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, ...
1
vote
2answers
6k views

Need to remove permission level from a SharePoint group using PowerShell

I was able to create a PowerShell script that creates a new permission level and assigns it to a group. However, I noticed that it doesn't replace the previous permission level of that group. So how ...
1
vote
1answer
627 views

Get All Users in Powershell Not Returning All Displayed User Accounts

I am using the following powershell command to list all users in a site collection: $sites = get-spsite "http://mysite/sitecollection/" $web = $site.RootWeb $web.Users | select-object $web.sitegroups ...
3
votes
2answers
2k 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
5k views

Need to change the owner of an existing SharePoint group using Powershell

I have succesfully been able to create a SharePoint group and assign it an owner. But now I noticed that it only works if the group has not been created. So now I need to add a way to modify the ...
0
votes
2answers
441 views

Locate empty folders in Sharepoint 2007

I'm trying to work out how I can locate empty folders in Sharepoint 2007 using Powershell. Folder.itemcount doesn't appear to work in 2007.
3
votes
3answers
6k views

What is a user friendly way to run Powershell scripts?

I've made several powershell script for my customers. They have very little knowledge about SharePoint and Powershell. I want to let them run these scripts when they want, but don't want them to ...
1
vote
2answers
1k views

Copy picture from Document Library to Mysite Profile Picture

Today we have picture of all the users in a document library. https://site.url/.../username_jpg.jpg I would like to use these pictures of them on mysite. Can I use powershell or something else that ...
2
votes
1answer
446 views

check for password protected office documents

I have a need to check through a site collection and find all password protected office documents. My organisation has decided on a policy where password protection on documents will no longer be ...
0
votes
2answers
505 views

how to change Catalog settings of a list by powershell

I would like to change catalog settings of Pages list to make it act like a Catalog by using powershell. It includes adding Title as "Catalog Item URL Fields" and choosing a Term Set for "Navigation ...
4
votes
2answers
1k views

SharePoint 2013 Create Variation Labels with powershell script

I'm actually trying to add variation labels to a site using powershell script (SharePoint 2013), and i know there is no powershell script for the job so im looking at some c# object model and i found ...
1
vote
1answer
1k views

Automatic Logout the User after “X” time in Sharepoint 2013

I need to logout the user in SharePoint 2013 after x amount of inactive time. I tried these options: Modify the node with the timeout attribute. Run some PowerShell code to modify the ...
0
votes
2answers
156 views

Cannot retrieve a list by display name via PowerShell

I am replacing a colleague for the support of a SharePoint 2010 intranet. In PowerShell console : I can retrieve a list by its display name from the Lists collection of a SPWeb object. In a PowerShell ...
2
votes
2answers
768 views

How to collate/merge two different lists, with the same colums into one list

I have got two different lists. One is live updated by many users. The second list has the same fields and works as the master. I want to every day, at 6:00 o'clock a.m, merge List one with list two. ...
4
votes
3answers
3k views

How do I fully automate Restore-SPFarm?

I have heard that it is a best practice to maintain a QA environment for SharePoint. I would like to script a nightly restore from our production SharePoint 2013 farm, which I'm successfully backing ...
1
vote
1answer
2k views

Get SharePoint Group Permissions Via PowerShell

I am looking for a PowerShell command to get the permissions of a SharePoint group on a securable object. I have googled for a while but without success. I am aware of the ...
0
votes
1answer
129 views

Restore SharePoint 2010 Site - Different schema version

I have a backup of a SharePoint site (14.0.6114.xxxx December 2011 CU??) and I tried to restore it to a different farm with version 14.0.6106.xxxx April 2011 CU???. As expected I got the schema ...
2
votes
3answers
684 views

Recreate a List in many subsites of a site collection using powershell

I have to recreate the same List in several subsites within a site collection. I saved my List as a template but it will be very time consuming to add the List manually to all of my subsites using the ...
6
votes
0answers
508 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 ...
2
votes
1answer
249 views

“User cannot be found.” error in Powershell

I am writing a PowerShell script to re-sync my users to the AD because of a problem I have described Here. From time to time I get a "Set-SPUser : user cannot be found." error but when I call the same ...
1
vote
2answers
1k views

Backup-SPFarm hangs silently on MOSS 2013

I have a 3-server SharePoint 2013 farm (db, app, web) set up and working enough to put in some demo content, and am trying to configure backups. I've successfully backed up using Central Admin but I'm ...
2
votes
1answer
6k views

PowerShell: Upload documents to folder in document library

I'm using SharePoint Foundation 2010. I have to make a PowerShell script that copies a structure found on a network share. Its all good except for one thing... I know how to make Document Library's ...
2
votes
3answers
9k views

Enable-SPFeature : The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url

I'm trying to activate a web level feature using powershell with the following command: Enable-SPFeature –identity 3ad4787b-e859-432c-be22-c772725e0dbc -URL ...
1
vote
1answer
5k views

Powershell Script to generate site collection administrators, site URL, Site Name,Members in the group named 'owners'

I have a requirement currently to generate all the Sharepoint site in a Web application with the following information: Site URL Site Name Site Collection Administors : ID or name Members in the group ...