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)

0
votes
1answer
33 views

Import .cmp file to webapplication

I have exported my site with Central Admin to .cmp Now I use Import-spweb to import it to another webapplication like this : `Import-SPWeb http://srvdev:7070/Linstance/ -Path C:\Bak\Linstance.cmp -`...
1
vote
1answer
45 views

Get the site owners information from a site collection

Can someone share the query to get Site owner and site collection manager information from all sites and sub-sites in a SharePoint 2013 site collection?
0
votes
2answers
261 views

SharePoint Online Management Shell - How to create sub sites

I am trying to automate the creation of multiple sub-sites in a site collection. Which command will do this? I am using SharePoint online 2013. The site collection is already created so now I'm ...
1
vote
2answers
202 views

SharePoint Responsive Package PNP tools not able to enable feature in Package

I am trying to implement Responsive UI Package for SharePoint on-premises (2013 and 2016) from this link http://dev.office.com/blogs/announcing-responsive-ui-package-for-sharepoint-on-premises-2013-...
2
votes
1answer
167 views

Change the home page of a wiki library

I saved an old wiki library as a template w/ content and then created a wiki library from that template. The new wiki, however, shows all the wiki pages in a list of files because the new wiki home ...
0
votes
1answer
91 views

How to checkout file using PowerShell REST API in SharePoint Server 2013 located in subsite?

I'm trying to check out file which is located inside document library under sub site. Site URL : mymainsite/subsite/subsite/My Library/test.xlsx I'm using below PowerShell script function ...
1
vote
2answers
82 views

List installed products & components using powershell

i came across a situation i want to mount a content database in a new environment that i don't know what was installed previously there. Using powershell how i know what installations installed in ...
0
votes
0answers
27 views

Connect to a SharePoint 2010 site having SSO authentication using Powershell

I am trying to connect to a SharePoint Site having an SSO authentication using PowerShell. But i am unable to do so. Please note, I am trying it from an external server so i have to do it using CSOM....
1
vote
0answers
73 views

Add WebPart to Page with PowerShell

So I have the following code that I took from "http://adicodes.com/adding-web-part-to-page-with-powershell/". It works fine, until the $context.ExecuteQuery() in the AddWebPartToPage function, where ...
1
vote
1answer
66 views

Go through specific library and set all subfolders as well as the root folders content type using powershell - Stuck

What I am trying to do is access a SharePoint 2010 document library, change all root and sub folders of that library from their existing content type to a new content type. So far my code has somewhat ...
2
votes
2answers
766 views

How to get specific sub sites Using Get-SPWeb object

In the code below i only want to get following 3 specific subsites using Get-SPWeb Object. which filter command is most appropriate to target only these 3 sites 1. http://myCo.root.site/sites/News/...
1
vote
1answer
72 views

Update more than 5000 Items in a list using PowerShell in SharePoint 2013

I need to write a PowerShell script to update a choice column with a specific value in all the items of a List. Following is the main part of the script $siteUrl = "http://mySharePointSiteUrl/" ...
1
vote
0answers
126 views

Reading Each XML Node in Powershell to create list in SharePoint

I have an XML file which I got from running webservices of below format. It contains each List name in the site collection under node. Now using this file I have to create lists in another site ...
1
vote
1answer
237 views

Cannot uninstall the LanguagePack 0 because it is not deployed

I'm trying to run the following PS command on a SharePoint 2010 Foundation Farm: Update-SPSolution -Identity testwebpart.wsp -LiteralPath C:\ChrisProjects\TestWebPart\TestWebPart\TestWebPart\bin\...
1
vote
1answer
15 views

Auto drop value everyday

So I have created a list that has a field that allows a user to input a rating of 1 - 4 which is then linked to another list that totals up each rating for that specific user. What I need to do is ...
2
votes
1answer
45 views

Error when using the UsageReportWithCSOM Script

Just using your script to grab the OD4B usage details, when running the script I'm receiving below error each time it queries someone's URL. Any ideas? I'm running the script as an O365 Global Admin. ...
1
vote
2answers
61 views

How can you change a rootweb name, url etc?

How can I change the name on a root web? Right now it's http://dev1/sites/dog. I am trying to change it to http://dev1/sites/cat I have tried $web = get-spweb http://dev1/sites/dog $web.Name = "...
1
vote
1answer
559 views

Import-SPWeb : The DateTime represented by the string is out of range?

I am trying to import an exported sub site which exists in a separate site collection to another site collection that is hosted by different web application. I'm running the import command like this: ...
1
vote
2answers
67 views

Set number of decimal places - PowerShell

So I'm building up a PowerShell script, and I wish to set the number of decimal places on a "Number" column. However, I can't seem to find the property necessary to do so. According to MSDN is should ...
1
vote
2answers
85 views

How to delete files from “Manage files which have no checked in version” using powershell

I tried to delete custom content type from Pages library but got an exception "content type is still in use". The I get to know that files should also be deleted from "Manage files which have no ...
0
votes
1answer
34 views

How to prevent Poweshell not showing script processing data

I have created a powrshell script for updating SharePoint List. When i run it shows all the backend processing to the console for example all the list schema info. I want it only show script created ...
1
vote
0answers
52 views

SharePoint Online PowerShell Custom Group in Site Settings

I know how to use PowerShell to create a new SharePoint Site Settings link, but I cannot seem to find how to create a custom group within site settings. Here is the code for creating the Custom ...
2
votes
1answer
173 views

How to set ModerationInformation.Status Values in Powershell?

I have saved $item.ModerationInformation.Status information in HashTable $DeletedItemsIDs and recycled list items. After That I restored items from recycle bin and assign saved ModerationStatus ...
0
votes
1answer
23 views

Maintaining Approval status after restoring list items from recycle bin

I have recycled list items using powershell method $deletedGuid = $item.recycle(). After recycling, I have restored items from recycle bin again using poershell method $site.RecycleBin.Restore($...
0
votes
0answers
48 views

WarmUp script that handles ajax / rest request - System.Net.WebClient

It seams that my warmup script does not work as expected. In my personal.aspx (mysite) we got several ajax /rest request that list several user data (lists, user properties, etc) that runs on document....
0
votes
1answer
42 views

Is there a Transaction Scope when PowerShell scripting in SharePoint?

I've seen that there are transaction scope tools in PowerShell for working with the registry. But, I also understand that PowerShell providers have to specifically be set up to use transactions. ...
0
votes
1answer
172 views

Powershell script to get count of how many files are in a folder and its subfolders

As the title suggested does anyone know of a powershell script or any other way of getting the count of how many files are within a folder and its subfolders within a library? I have tried to look ...
0
votes
1answer
99 views

Using powershell how to get active features and custom features also in a sharepoint farm

How to get all out of the box active features and custom farm solutions features using powershell code in sharepoint 2010 and sharepoint 2013.
0
votes
1answer
122 views

How to get the timer job name from timer job id in sharepoint 2010

how to get the timer job name from a given timerjob id in sharepoint 2010 server farm. ex: i have a timer job id Get-SPTimerJob | Where {$_.id -eq "xxxxxxxx3"} | ft id,name it displaying empty ...
1
vote
1answer
114 views

Error while Overwrite CheckIn using Powershell

I got following error when I tried to Checkin files wich are Checked out by other users using powershell. Exception calling "CheckIn" with "2" argument(s): "You cannot checkin and overwrite a ...
4
votes
2answers
118 views

Export-SPWeb List with spaces in list name

I am trying to backup a list and am getting the error Export-SPWeb : Cannot find an SPWeb object with Id or Url . I'm guessing this is related to the space in the list name. I've tried this ...
0
votes
1answer
57 views

SPCheckinType.OverwriteCheckIn in Poweshell

How we can OverwriteCheckIn in Powershell? Please correct second parameter? $ListItems[$i].File.CheckIn("Checkin automatically",SPCheckinType.OverwriteCheckIn) // second parameter seems wrong
1
vote
0answers
53 views

Error in Powershell with .recycle() method

With the following code, I am getting this error in powershell: I could not find out whats wrong here? I am using recycle() method because in next step, i need to restore items from recycle bin. ...
2
votes
2answers
38 views

How to specify start method in Powershell

I have written a powershell script with couple of methods. I want to start powershell script with some specific method,for example the script should start with method Get-SitesWithNewsPageCT() How I ...
1
vote
1answer
42 views

How to get current Web object from collection

In the code below, I want to pass current web object to function Remove-CT(), How I do that? site | Get-SPWeb -Limit all | ForEach-Object { $currentWeb = $_.SPWeb // please correct this line if ...
2
votes
1answer
164 views

Do we have Secondary SiteCollection Administrator in SharePoint Online?

Do we have Secondary SiteCollection Administrator in SharePoint Online site? Because when I create new Site Collection, I don't see Secondary administrator listed in the form. Also in other posts ...
0
votes
1answer
25 views

User profile service issues

I had this question earlier but did not find any solution. My user profile service synchronization is not starting. I tried stopping the service and restarted it also but no luck. Is deleting the user ...
0
votes
2answers
35 views

Deleting User profile service and recreating it

If I delete the User Profile Service Application from the central administration, will that create an issue for user using SharePoint. I am trying to delete that and recreate again since the User ...
3
votes
3answers
43 views

How do I create a WebPartPage using PowerShell?

I need to learn a PS script to create a WebPart Page on any library I want in my Sharepoint 2010 site. Im brand new to PowerShell and Sharepoint, so far all I know is the little tought on a few MVAs I'...
0
votes
1answer
46 views

How to iterate each User Profile with Powershell

I've trying to iterate each User Profile with this snippet but at the following step: write-host "Job Description for user" $User " is : " $up[$upAttribute].Value the code always return the ...
0
votes
1answer
89 views

How to recover List Items from Recycle bin using Powershell by having item Guid

With following code I have recycled list items and have stored item GUID in $DeletedItem: for($i=$ListItems.Count-1; $i -ge 0; $i--) { write-host "Deleted List Item with ID:$($ListItems[$i].ID)"...
0
votes
2answers
53 views

Upload files to Sharepoint using Powershell and FSRM

I am trying to upload a bunch of files to a SharePoint server. But I want to set the file-metadata before uploading so that it matches with SharePoint property and buckets it. Need help in setting ...
0
votes
1answer
29 views

Create document sets in powershell from xlsx (not csv) file

On occasion we have a need to create multiple document sets in a single library. In the past I have always put the details (e.g. name and any other column values) into a csv file and used powershell ...
4
votes
2answers
176 views

Deleting Content type from “List Items” using Powershell

I want to delete a custom content type from all items that are using that content type in a list/library. Is that possible using powershell? if yes, then I want to know after deleting CT, which ...
0
votes
1answer
127 views

how to get all the pages inside a site?

How to get all the pages inside a site? I will pass the parameter of a site in a site collection example: http://www.category.com/en,using powershell code in sharepoint server 2013. when i try below ...
1
vote
1answer
74 views

Power shell health check up in sharepoint 2013

How to test the health check up for all the site collection under the webappplication in sharepoint 2013 using Powershell.
2
votes
2answers
132 views

Get all links in a site and all subsites using Powershell [duplicate]

We have a public facing site www.productsMainsite.com is our main web application i need only pages and sites information for a site under a web application, for example: www.productsMainsite.com/...
2
votes
0answers
31 views

Removing Items from Recycle Bin that uses specific Content types

I want to delete custom content type from Pages library but it did not allow me to delete and says "content type is still in use". Then i get to know that i need to delete it from following locations ...
0
votes
2answers
36 views

Sharepoint list deleting from powershell

I have got a Sharepoint list. I updeted it in job everyday and everyday refresh by powershell. I have got some column on this sharepoint list. One of this column called [nazwazdarzenia]. And the code ...
1
vote
1answer
26 views

getting Pages library from given URL

I have a URL for subsite mynews: for example: http://something.good/news/mynews I want to add custom content type 'NewsCT' to Pages library of this mynews subsite using powershell. How I do that?