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)

1
vote
0answers
13 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 ...
2
votes
1answer
690 views

Creating SiteCollections using SharePoint Management Shell 2013

I am following the below instruction to create a NHSC, but at point D when I am creating a Team Site, I get the message that the new URL is not found! Do I need to create that before? Am I missing ...
1
vote
0answers
11 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 = ...
3
votes
1answer
461 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 ...
1
vote
0answers
8 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 ...
1
vote
1answer
19 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 ...
3
votes
3answers
2k views

how to know Exact Document Library size

How to know exact document library size. any PowerShell code required? I used http://XYZ:4444/_layouts/15/storman.aspx but it doesn't show true size. I have Just Modified Nikhil's Script which ...
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 ...
0
votes
0answers
13 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
25 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
33 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 ...
4
votes
2answers
47 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
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" ...
2
votes
1answer
675 views

SPSiteDataQuery for Documents using caml query

I am tring to query an entire site collection for all the documents where a certain field is equal to something. For example where LoanCategory = Insurance. I am trying to do this using an ...
1
vote
2answers
29 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
153 views

Create Calendar powershell CSOM

How would I go about creating a calendar in powershell using CSOM. I have created a custom list before, using this : Add-Type -Path 'C:\Program Files\Common Files\microsoft shared\Web Server ...
4
votes
0answers
326 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 ...
0
votes
4answers
1k views

Restore-SPSite fails without any useful error

I'm trying to restore from a backup via PowerShell with the following commands: add-pssnapin Microsoft.SharePoint.PowerShell restore-spsite -Force -Confirm:$false -Identity ...
1
vote
1answer
38 views

Retrieve all sitecollections and its subsites using PowerShell

How to retrieve all the Site Collections along with its subsites from SharePoint online using PowerShell. Please suggest.
0
votes
2answers
2k views

How to activate web application and site collection level feature via PowerShell?

We have deployed a wsp using: Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -GACDeployment -Force This wsp has 2 features, one scoped at application level (FeatureA) and ...
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
1answer
34 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
2answers
1k views

App Pool created with Powershell name appears as GUID in IIS

I just installed SP 2013 in a test environment. I created an app pool to be used by the service applications using the Powershell command below: New_SPServiceApplicationPool -Name "Default ...
4
votes
3answers
153 views

No. of subsites in a site collection?

How to get number of subsites in a site collection using Powershell?
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 ...
13
votes
6answers
26k views

Powershell: cannot access the local farm

Yes, I am logged into the machine as an administrator, and my domain account id a farm admin as well. The site is running properly, and nothing seems wrong in SP Central Administration. But when I ...
1
vote
0answers
971 views

SharePoint 2013 MetaNavigation Problem deleting Termsets

The following is just a test script borrowed in part from http://goo.gl/Cw1D8h "PowerShell to create and reuse Managed Navigation for multiple sites in SharePoint 2013" The following script works ...
2
votes
0answers
575 views

Getting Null returned from taxonomy field in PowerShell?

I am trying to update a metadata field when adding an item to document library. All the other columns are updating. The error is on this line and basically $taxfield is returning null. $taxField = ...
0
votes
1answer
32 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" } } ...
2
votes
1answer
38 views

How to set document-template using PowerShell

<DocumentTemplate TargetName="/_layouts/CreatePage.aspx" /> How could I set this using powershell? $dst = ...
1
vote
1answer
514 views

Issues updating/setting multi value lookup columns via powershell

I have an issue updating multi-values in a lookup field via powershell I can update a single value lookup field as below but can't get to update if its multi- value. As stated below when I hardcode ...
0
votes
1answer
11 views

LastContentModifiedDate of A Site Collection

How to determine the LastContentModifiedDate of 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 = ...
1
vote
1answer
80 views

Office 365 pre-provision my site issue with Powershell

I am creating personal sites using powershell csom. My issue is on below line $loader = [Microsoft.SharePoint.Client.UserProfiles.ProfileLoader]::GetProfileLoader($ctx) I get following error. ...
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
12 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
1answer
2k views

Local farm is not accessible, cmdlets with featuredependencyid are not registered

So after moving all my databases to the new SQL server I run this on my SharePoint central admin box, http://technet.microsoft.com/en-us/library/cc512725(v=office.15).aspx#Man Everything goes through ...
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
7 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
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
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
1answer
665 views

How to register a new SharePoint App using PowerShell (instead of appregnew.aspx)?

I'm uploading my SharePoin Provider Hosted App and installing everything via PowerShell, but the only thing that I cannot find is if it's possible to register a new app using a PowerShell command ...
1
vote
1answer
417 views

How do I add a lot of contenttype aliases to a new Content Organizer Rule using Powershell?

NOTE! This post is about adding MANY, BUT NOT ALL content types to your rule. If you simply need to create a rule for ALL content types, go straight to the bottom of this post. I'm creating a ...
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
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 .
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
20 views

How to fix broken url images in SharePoint pages uisng powershell?

We have done a migration from SP2007 to SP2013 but we have got some broken images URLs. I have searched around for a solution but they all are about either top menu or left menu and the publishing ...
1
vote
2answers
368 views

Powershell script to get list of AD groups used from site collections in SharePoint 2010

I need to list all the AD groups used in all the site collection. Can any one please help. $SPWebApp = Get-SPWebApplication https://*******.com/ foreach ($SPSite in $SPWebApp.Sites) { write-host ...