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

2
votes
2answers
46 views

Powershell DownloadFile(,) command giving 403 - Forbidden error

I am using Powershell DownloadFile(,) command for reading a .csv file from a document library in SharePoint 2013 site. When i ran the code on my DEV environment, it ran properly. The DEV environment ...
0
votes
0answers
12 views

Enter New-SPUser without actually authenticating?

Our org has two AD forests (internal users, external users) with no trust between them. When I enter a user manually in SharePoint and I type the username into the people picker, it accepts the user ...
1
vote
1answer
19 views

How do I move a list item to the owner's recycling bin?

I have a need to run a PowerShell script against a list that deletes items older than 15 days. I have the script written, as well as user notifications, however I am puzzled as to how I can recycle ...
1
vote
1answer
15 views

get all the child terms from a parent term

I am trying to get all the child terms from a parent term from my termset. $Group = $termStore.Groups["grp1F"] write-host Connection made with group - $Group.Name $termset = $Group.termsets["ts1"] ...
0
votes
1answer
16 views

Get List Item details from the changelog in PowerShell

I am trying to manage a changelog in a Sharepoint Online custom task list with Powershell and CSOM. I can get changes in a list from the below code and retrieve details like Update type and Update ...
1
vote
0answers
10 views

Unable to add link in the Summary Links web part by power shell script

I want to add links to the summary link web part using the power shell script. I have found a script for it on this link, but is it not working as per the requirement. I have a publishing website and ...
1
vote
1answer
362 views

New-SPWeb : Cannot find an SPSite object that contains the following Id or Url:

While Running Following command: New-SPWeb -url "https://xyz.com/sites/" -name "apple" -template STS#0 I received following error: New-SPWeb : Cannot find an SPSite object that contains the ...
3
votes
1answer
386 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 ...
0
votes
1answer
16 views

License users in O365 with PowerShell

Might be the wrong forums for this topic but someone might have a direction to point me in... Looking for guidance on how I can set user licenses in O365 as they are enabled or disabled in my on ...
1
vote
4answers
4k views

Restore-SPSite : Access Denied

Restore-SPSite : Access Denied You do not have permission to perform this action or access this resource. This is the error I get when trying to restore a Site Collection backup from the integrated ...
2
votes
2answers
22 views

Add AD group to SharePoint Online using REST API

Is it possible to add an AD group into SharePoint. I've created a user group in the Office 365 portal, which appears to be stored in AD. Is there a way of searching for this AD group and adding it. ...
0
votes
2answers
1k views

Trouble using PowerShell cmdlet

I try and run this Script using Powershell ISC run as Admin: #Site URL $web = Get-SPWeb "http://cgprojects/sites/tfs"; $web.AllowUnsafeUpdates = $true; #List Name $list = ...
1
vote
0answers
17 views

Install app for SharePoint using PowerShell - permissions on user profiles

I'm trying to install our app using the PowerShell and after running the application I get an error while accessing the user profile data. We are using the following permissions in our app: ...
3
votes
1answer
317 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?
4
votes
3answers
3k views

Enable versioning on all lists and libraries

Is it possible to enable versioning on all lists and libraries across all web sites of a site collection? Thanks.
1
vote
1answer
373 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 ...
3
votes
1answer
52 views

How to get SharePoint Online list url using Powershell?

I can retrieve a title $list.Title, but a title is not the same as url. In C# I can get list.DefaultViewUrl, which doesn't seem to be an option in Powershell. I found this solution with ...
0
votes
0answers
25 views

SP2013 - <nativehr>0x80070003</nativehr><nativestack></nativestack>

I successfully restored a backup from another farm a few of weeks ago using restore-spsite. I had to delete that site collection, now I want to restore it again with that same backup file. The 2 ...
1
vote
1answer
566 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 ...
0
votes
1answer
17 views

Export large list to excel through powershell

We can successfully migrate a list to the excel through power-shell, but if a list is having 1 Lakh of data then can we transfer through power-shell? Is there any restriction on number of list items ...
0
votes
0answers
12 views

SharePoint 2013 Online: Adding webparts to a page with PowerShell

SharePoint 2007 --> SharePoint Online migration. Moving from teamsites that have web part pages as thier default.aspx location to SPO ones that use Wiki Pages. We're using a third party to do the ...
1
vote
0answers
12 views

Deploy a file to the “Forms” folder of a Document Library using Powershell

I am dynamically building up a file that I then want to upload to SharePoint 2013 using PowerShell. I want to upload this file into the "Forms" folder of a Document Library - So not into the Document ...
0
votes
3answers
23 views

Using list items to create sites programatically

I am looking to programatically create sites based on items in a SharePoint list. The list has 4 columns, Name, Email, ManagerName, ManagerEmail. The aim is to use PowerShell to create a foreach ...
0
votes
1answer
152 views

Need help using powershell to create list items

I based my code from this example it stated it had the ability to create list items with attachments from existing list items in a new list. I liked this example because I would like to archive old ...
1
vote
2answers
4k views

Export-spweb / Import-spweb leaves the lookup columns empty

The export / import operations seems to be working quite well except for lookup columns. The lookup columns and other columns associated with the lookup are all empty. Is this a limitation? Is there ...
1
vote
1answer
19 views

Delete items from document library based on criteria just like WHERE clause in SQL statement

Is there a way to delete items from a document library based on some criteria for e.g. delete all documents whose created date is less than 1/1/2012. I know it can be done through code but I am ...
0
votes
2answers
16 views

Disable inline editing sharepoint 2013 through powershell

I have migrated a sharepoint 2010 list with inline editing enabled to sharepoint 2013 and now this setting is not viewable through the GUI, thus I cannot disable it. Is there a powershell cmdlet for ...
1
vote
1answer
22 views

What is proper way to dispose after getting audit entries?

I'm cleaning up our audit logs exporting to a local disk for archiving. The logs are so big I can only export about a half a month at a time. The script I wrote works fine, but I'd like to automate ...
0
votes
0answers
10 views

SharePoint microfeed cant be migrated?

I just used a 3rd party software to migrate Project sites data from 1 SharePoint site to another. Worked like a charm except for the microfeed. The tool doesn't support migration of microfeed. Anybody ...
0
votes
0answers
22 views

How to iterate list items from two list using where in powershell script

I have two list from where i want to collect common items. I am not able to make use of $caml in my script. My script: Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue ...
0
votes
1answer
18 views

Unable to send email from SSIS(Script Task) package to SharePoint 2013 Document Library

I am trying to send an email from a SSIS package to a SharePoint 2013 Document library. I am using a Script Task for this. The code I am using is as follows. public void Main() { String Sender = ...
1
vote
1answer
27 views

Import-csv command to read a CSV from Document Library is giving error

I am trying to read a CSV file from a SharePoint 2013 Document Library. I am using following Powershell command for this. Import-csv "\\ServerName\sites\SiteName\MyDocumentLibrary\MyCSVFile.csv" ...
0
votes
1answer
359 views

How to associate sharepoint 2013 designer workflow to content type for retention policy using powershell?

I am having a requirement to write a powershell script which should attache workflow to content type in sharepoint 2013. basically it is require to create a retention policy which should start a ...
0
votes
1answer
22 views

Issue while exporting site

We are facing an error while exporting a site: The object of type Web and URL that was configured as part of the Export Settings does not exist. Verified the below options: Ran the Powershell ...
1
vote
1answer
369 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
0answers
15 views

The profile synchronization status stuck stopping?

How to stop this stopping immediately in my SharePoint user profile, using powershell.
0
votes
1answer
33 views

CSOM And FieldURLValue Error

I am trying to set a URL Field to update the Description and every time i run this ClientSide (via Powershell) I get the following error Exception calling "ExecuteQuery" with "0" argument(s): ...
0
votes
0answers
51 views

Uninstalling farm solutions, will not remove the related site collection features

I am facing a problem which I cannot understand how to fix it. Now I have installed third party tools inside my SharePoint 2013 server. Then I wanted to remove them, so i went to "Central ...
0
votes
1answer
10 views

Calculating Content Organizer Destination

I want to find a way to calculate (using powershell) the final destination of an item in a document library. This little snippet is what I'm trying to do but it keeps saying that it doesn't contain ...
0
votes
1answer
672 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 ...
1
vote
0answers
28 views

Executing PowerShell script from SharePoint 2013 WebPart

I've been trying to execute my powershell code from a button click on a SharePoint Webpart. I came across this solution on a forum post. private string RunScript(string scriptText){ Runspace ...
1
vote
0answers
24 views

Activate Site Publishing Features via Powershell for SharePoint 2010 throws exception

We are having trouble activating the Publishing Site Features via Powershell. The 2 features we are trying to activate are: PublishingSite PublishingWeb We are executing the following Powershell: ...
1
vote
1answer
63 views

Copy value from one field to another in large list

I have a larger list (~6000 items) that I want to copy values from one field to another. Is there an easy way to do this? I'm guessing there is a REST or PowerShell way, but only have limited ...
1
vote
1answer
35 views

Field name already exists

All I have backed up a sharepoint site and restored to another environment. I have a specific list which I want to update the default value of a hidden field in powershell I found the field, set ...
1
vote
2answers
437 views

Getting the list name from url with PowerShell

I am trying to parse any given SharePoint URL and get back the site, web and list references using the code below. I would like to achieve this even if I provide the URL of an item. The code below ...
1
vote
2answers
67 views

Get list changes in Sharepoint Online

I am using CSOM library through Powershell to get a list of changes made to a list in Sharepoint Online. I am stuck while creating an object for the changecollection. Not sure how to get the data that ...
0
votes
3answers
707 views

Error creating SPSite using powershell

I am trying to create a web application "http://Intranet" and a site collection "http://Intranet" on SharePoint 2013 foundation farm. Here is my code $sp = New-SPAuthenticationProvider $web = ...
0
votes
1answer
37 views

Powershell understanding piping with Get-SPSite/Get-SPWeb?

I wanted to get a list of all webs within a web application. By accident I wrote the following: $webapp = "http://mywebapp" $webapp | Get-SPSite | Get-SPWeb So, this returned fantastic results, ...
0
votes
2answers
46 views

Setting a Document Sets Columns via Powershell

I have been trying to create multiple Document Sets using Powershell from a csv file. The script creates the Document Sets with the correct Name but doesnt set them up with the Metadata needed for ...
0
votes
1answer
216 views

Adding groups to sharepoint site using powershell

Hi I have added 4 groups to site collection 'A' using the powershell script below. How can I add the same groups in a site under the site collection 'A' `$web=Get-SPWeb ...