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
2answers
16 views

Sharepoint online 2013: Powershell Stop permission inheritance after creating a new site

As the question basically says, is there a way to stop permissions inheritance after create a new website using powershell? Thanks a lot!
0
votes
0answers
15 views

Write-Output Powershell fails within RunWithElevatedPrivileges Block

This is possibly a heads-up as much as anything. I have found that if I write a Powershell with write-output statements, they do not appear when using RunWithElevatedPrivileges i.e Write-Output ...
2
votes
1answer
10 views

List default content type across a site

Is it possible to list the Default Content type per Library via PowerShell?
1
vote
0answers
21 views

EnsureUser has a limitation?

We're converting all SP permissions into ActiveDirectory groups (one per uninherited object, per role level). I wanted the group names to reflect where the permissions were/are, so I assigned each ...
1
vote
0answers
13 views

Changes made in Sharepoint web interface to list aren't reflected when using REST method

I've got a Sharepoint list to which I've added some columns, like so: Now, I've been able to pull data from Sharepoint using the super awesome Rest API, using the below PowerShell code: $Items = ...
2
votes
0answers
10 views

Updating Global Managed Navigation

Consider the following PowerShell script to update a Term Set 'Global Navigation' which is pinned throughout the farm: Add-PSSnapin Microsoft.SharePoint.PowerShell -ea SilentlyContinue Write-Host ...
3
votes
1answer
31 views

Delete items from document library using PowerShell

I am trying to delete all items from my Document Library using PowerShell using the below code. But its not deleting the checked out items from the Document Library. How to delete the checkedout ...
0
votes
0answers
14 views

How to insert a document to version history library using powershell?

We did a migration from SP2007 to SP2013 using DocAve tool but we got some errors when migrating some document versions. We tried it a couple of times via the tool but still it will not migrate those ...
2
votes
1answer
28 views

How to get property value from webpart

I want to get webpart property value using powershell $path="C:\Webparts\MyPart.webpart" $path [xml]$xmlPath = Get-Content $path $myrespath = $xmlPath.data.properties.name.UrlWebPart $myrespath ...
1
vote
1answer
20 views

powershell script to re-run workflow for each items in list

I have a workflow in list and i have changed something in workflow. List has already 2000 items, new modified workflow works for new item added. can someone provide me powershell command to re-run ...
1
vote
0answers
21 views

How to add two webparts to different pages

I want to add two webparts to two different pages, using PowerShell Webpart1 to sites/customers.aspx Webpart2 to sites/support.aspx $FullPageUrl = $SPWeb.Url + "/" + "sites" + "/customers.aspx" ...
4
votes
2answers
54 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 ...
1
vote
1answer
34 views

Upload file into doument library and update the metadata using PowerShell

How to upload the file into the document library and insert/update the metadata columns.I am having 3 people picker data types/user group columns and one choice field and 2 single line of text ...
0
votes
1answer
18 views

How to remove the orphaned SPD Workflow Instance using PowerShell [duplicate]

How to clean-up or remove the orphaned workflows in a site collection? I have created a SPD 2010 reusable workflow and deployed in SP 2013 environment. But for some of the sub sites and some ...
0
votes
1answer
20 views

How to get the SPD Workflow Instance column name from the document library using PowerShell

I am having a SPD 2010 workflow created and deployed in my site collection and published globally as a reusable workflow. I have configured the workflow in my document library by associating it with ...
2
votes
2answers
11 views

Remove a Subsite which has other subsites and apps in it

I am creating a PowerShell script to delete the subsites by importing URLs from a CSV file. The problem is that Remove-SPWeb does not remove a subsite having other subsites and apps beneath it. I want ...
4
votes
3answers
166 views

No. of subsites in a site collection?

How to get number of subsites in a site collection using Powershell?
0
votes
1answer
16 views

How to upload document to only 1 site

How can I upload documents only to one site and not all sites? Add-PSSnapin Microsoft.SharePoint.PowerShell; $files = ([System.IO.DirectoryInfo] (Get-Item "C:\DP")).GetFiles(); $templateFolder = ...
0
votes
1answer
11 views

LastContentModifiedDate of A Site Collection

How to determine the LastContentModifiedDate of a Site Collection using Powershell?
0
votes
1answer
55 views

How to rename termset name in 1033 only

how could i only rename a termset.name in 1033? foreach($TermSet in $TermStoreGroup.TermSets) { $TermSetNamee="Hej" if($TermSet.Name -eq $TermSetNamee) { $TermSet.Name="Hello" } } ...
0
votes
1answer
19 views

Create an external content type with PowerShell

Is it possible to create an external content type in SharePoint 2013 using PowerShell? For example, I have a view in a SQL database, and normally I would use SharePoint Designer to create an external ...
1
vote
0answers
13 views

Delete site collection level managed property using powershell

I have a managed property created at both Search Service Application level and Site collection level. The one at Site Collection level does not have Refine and Sort attributes True, so I want to get ...
0
votes
0answers
16 views

Add level permisions to User in Sharepoint Online with Powershell

How as assigning roles to a given user at a given site in sharepoint online with PowerShell $ctx.Load($ctx.Web.RoleAssignments.Add($account,$roleAssignment)) $ctx.Web.Update() $ctx.ExecuteQuery() ...
0
votes
0answers
9 views

how to re-use an existing term under another term but not termset

My problem is I can't reuse a term under another term. But reuse term under a termset works fine. How can I reuse a term under another term. What I'm trying to do here just works fine with web ...
0
votes
1answer
18 views

stsadm addsolution causes processor to hang

Running the stsadm –o addsolution –filename tec.solzip.wsp causes the processor to hang, running on SP2010. would anybody know any reason why this could be happening?
0
votes
0answers
13 views

Pin childs using PowerShell

Is it possible to pin terms with children using PowerShell? I couldn't find any useful code for that online. I have a group name and and a second group name that I want to pin to the other group. ...
0
votes
2answers
24 views

How To Upgrade Custom Workflow WSP Using PowerShell

I have a custom Visual Studio workflow. There are hundreds of instances of it running in a site collection. I now need to update it. The workflow consists of some custom task forms and the workflow ...
0
votes
0answers
10 views

Upload and add a content editor web part in Search Center sub site using PowerShell

How to upload and add a Content Editor web part in Search Center sub site using PowerShell?I am having a .dwp file in my filesystem and I want to upload this into the results.aspx page of my search ...
0
votes
1answer
28 views

Language code of a site collection

Is there a way to get the language code of a site collection using powershell?
0
votes
2answers
41 views

How to filter the modified date column to get documents today 8 am to 10 am

How to filter the modified date column, I am creating a view based on I want to show documents which are uploaded by today only but from morning 8 am to 9am .
-1
votes
1answer
25 views

get user name and email using powershell script from a document library

1) i want to get the user email and send email , who uploaded the documents from 8 to 9 PM using power shell script. i want distinct users these users are domain users who uploaded documents.
1
vote
0answers
32 views

Problem when running PowerShell

I've a PowerShell script file to create results source. It works well on staging, but has some problems on UAT. First of all is the trouble with Get-SPSite. I've managed to resolve it. However, when I ...
1
vote
1answer
8 views

Programatically remove “custom xml data” from Office docs in SP?

In Word 2013, if you open a document there's an option to "Check for Issues" and this gives you the option to remove custom XML data. Is there a way to achieve this programmatically with powershell? ...
1
vote
1answer
9 views

SharePoint 2007 Powershell - Overwrite documents that require check out

I'm trying to build a PS script for a SharePoint 2007 which will loop through a list of site collections and update files within the 'Style Library' folder. foreach ($file in $files) { $stream = ...
0
votes
1answer
23 views

Remove the workflow associations on the content type and document library using PowerShell

How to remove the workflow associations on the content type and document library using PowerShell? Currently I have added PowerShell to configure workflow in my document libraries and its associated ...
0
votes
1answer
11 views

powershell script to exe with command line arguments

I use the following PowerShell code taking command line arguments for creating site collections and it works fine. However when I convert it into an exe and execute it? param( ...
0
votes
1answer
13 views

Configure Record Center and Content Organizer Rules using PowerShell

How to create content organizer rules and configure these rules with the help of PowerShell.I have created a Record Center site collection using OFFILE#0 as template name and with the help of ...
2
votes
1answer
35 views

How to use kerberos for remoting powershell

I am trying to set up a remote powershell session to a sharepoint server in order to do remote management. I am running as a user with full mgmt rights at the sharepoint server If I use Credssp and ...
1
vote
1answer
24 views

Download page from SharePoint Online using PowerShell

How can I download the contents of a page on my SharePoint Online (Office 365) environment using PowerShell? This is an .aspx page - I am looking for the rendered/html version, same as if I went there ...
3
votes
1answer
47 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 ...
0
votes
3answers
23 views

Enable-SPFeature - issue

I am stucked on this error: Operation is not valid due to the current state of the object while tryng to enable a feature (site scoped) with Enable-SPFeature powershell command. I tried to ...
0
votes
1answer
16 views

how to assign data files path in sql server when creating new web application in share point

recently we migrated storage of all sql server databases to diffrent storage. and mounted back all content databases , and now sharepoint farm is working fine but, when i try to create new web app i ...
0
votes
1answer
29 views

PowerShell - Call function within a function

How to call one function inside another function along with passsing arguments in Powershell? Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue ...
0
votes
1answer
27 views

Get SP online site content via PowerShell or C# (for BackUp SharePoint Online Site content into local storage)

I need to BackUp SharePoint Online Site content into local storage. I know there is no tools for it (for SharePoint Online version). I want to write my own tool that will copy all site content to a ...
1
vote
1answer
26 views

Source content DB Size after moving site collections

I have one content DB (Source content DB) with 500+ site collections in it. Recently i have moved all site collections to 10 different content DBs (using Move-SPSite command) in order to improve ...
1
vote
1answer
19 views

MissingSetupFile issue - file does not exist

I am trying to get rid of the health error [MissingSetupFile]. I followed some guide to get (querying the contentDB) the Id of the file (and of the Site and Web). The issue is that the file does not ...
1
vote
1answer
40 views

Splitting one Content DB into 10 DBs in SP 2010

We have 650 site collections all in one Content DB with 800+ GB in size. Because of this huge size, performance goes down and we have decided to split the DB into 10 different content DBs with maximum ...
1
vote
2answers
30 views

How to create SharePoint provider-hosted-apps without Windows PowerShell

I already had create SharePoint provider-hosted-apps. But with Windows PowerShell there was an error and all SharePoint services was changed so I need to create SharePoint provider-hosted-apps without ...
1
vote
1answer
13 views

Determining size in MBs and user count for 'one particular' site collection

I need to determe the size of a site collection in MB. I tried: Get-SPSiteAdministration | select Url, DiskUsed, UsersCount But it returns DiskUsed and UserCount for all the site collections in the ...
0
votes
1answer
20 views

Extract Site Collection Properties to File

Is there a way to extract all the Site Collection properties to a file using SharePoint Management Shell