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
32 views

Powershell Error handling CSOM [closed]

I am currently writing some scripts in powershell client side and I haven't got much error handling. Can anyone give me any advice I have a few try and catches but that's about it. I noticed ...
0
votes
1answer
34 views

Huge padding in powershell created webparts

I add a webpart page via powershell like this: $idLayout = 2 $list = $oSP.GetList( $sList ) $xml = "<?xml version=""1.0"" encoding=""UTF-8""?><Method ID=""0,NewWebPage""><SetList ...
0
votes
1answer
84 views

Deleting Search Nav node in powershell CSOM

I have created a script that adds my search nav to my search site but it is still left with what was already there as out of the box. I am having trouble with finding how I can delete the nodes I ...
1
vote
1answer
65 views

SPQuery ProcessBatchData from folders

I'm using the following script to try and delete items from a Doc Library rather unsuccessfully. There are no files in the root, just all in subfolders under this doc library. Where am I going wrong ...
0
votes
1answer
115 views

How To Copy List Item Object Using Powershell

Given the powershell snippet below I am trying to complete the last part which should copy the list item object from the source list to the destination list. This is for archiving purposes and ...
0
votes
1answer
77 views

Delete all Enterprise Keywords in Sharepoint Online

How can I delete all Enterprise Keywords in our Sharepoint Online. It seems that the Term Store is already populated with many, many entries. Is there a way to "reset" or delete all Enterprise ...
1
vote
1answer
54 views

SharePoint Add List Attachment Programmatically 404

I'm not having much luck with this... [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $lists_pxy = New-WebServiceProxy -Uri ...
0
votes
2answers
112 views

Backup-SPsite command

I want to use the Backup-SPsite powershell command to backup my SharePoint Enterprise 2013 site collection but want to keep only a week worth of backups A backup will run everyday Monday to Sunday ...
1
vote
2answers
312 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 ...
1
vote
0answers
22 views

Editting a Search Results Web part changing the result source CSOM

I am doing some CSOM powershell to edit a search results web part and change the result source. Don't really know where to start with this as I am new to the world of CSOM powershell. Any help would ...
0
votes
1answer
290 views

Exception calling “ExecuteQuery” with “0” argument(s): "The remote server returned an error: (400) Bad Request. CSOM SP13

I'm trying to add a page to my search centre in sharepoint 2013. Trying out cSOM too. Here is my code, I am getting a bug Exception calling "ExecuteQuery" with "0" argument(s): "The remote server ...
-1
votes
1answer
198 views

Add web part to SitePages using PowerShell

I want to add a web part to my page created in SitePages, using PowerShell script.
2
votes
1answer
70 views

Get-SPWeb with a cross domain url throws an excepton

I want to migrate list items held in our dev sharepoint farm to site collection hosted on our live farm. Ok I have RDPed onto the server and I am running ISE as administrator I do another account I ...
2
votes
2answers
106 views

Tag SharePoint pages with “I like it” tag programmatically

I need to tag a lot of pages with the tag I like it. Is there any way of doing it programmatically? (i.e. PowerShell)
0
votes
0answers
29 views

Powershell, design manager, uploading html file not creating associated master page file

I am uploading a xyz.html file through powershell for 2 site collections, when .html file is uploaded and published it automatically creates xyz.master file. It is working fine for first site ...
0
votes
1answer
61 views

Problem deleting list item in Sharepoint 2010

I want to delete a specific list item from a list. If I go in UI and try to delete it, it throws access denied error. Even if I try to delete using below powershell it says the same thing. If I ...
0
votes
0answers
22 views

Update Workflow with PowerShell

I have a MOSS 2007 environment which we are upgrading to SharePoint 2013. I have a lot of Designer Workflows in 2007 that usually involve simple activities like sending mail. However some of the mail ...
0
votes
1answer
47 views

PowerShell try catch

I need you help Im using the next script: How to get all groups within all webs in SharePoint 2010 using Powershell The script perfectly, but some user can not be found, so I'm trying to control the ...
0
votes
1answer
32 views

Cannot return any SharePoint 2013 list or library data via PowerShell - no errors, no data displayed

I want to update some documents metadata (several thousand) in SP2013. Simple do it with a PS script, I'm new to PS but not to programming and there are loads of examples out there - it can't be hard ...
0
votes
1answer
60 views

Removing permissions from a sharepoint folder in a for loop

I am trying to remove all the permissions from folders in sharepoint using a powershell script but only some of the permissions are being removed. When I manually run the powershell commands I can ...
0
votes
0answers
246 views

Unable to update the User Information list using Powershell

I am using the following Powershell script for updating User Information List in SP2013 environment. I am a member of Administrators group and also Site collection administrator. $Site = Get-SPSite ...
0
votes
1answer
428 views

Powershell - get a list of all the document libraries for a web application including content types - output to csv

I have following code and it works great. However, business unit now wants to see content types for each document library. Most document libraries come with Document and Folder content types. Now, ...
0
votes
3answers
60 views

Get all the document libraries where IsContentTypeAllowed is enabled

I am using this PowerShell code to get a list of document libraries where allow content type is enabled. But it does not return anything. Get-SPWeb http://intranet.site.net | Select ...
3
votes
2answers
243 views

SPO Retrieve HasUniqueRoleAssignements property using Powershell

I am trying to retrieve HasUniqueRoleAssignements property for multiple SharePoint Online lists using Powershell. I can do it for each one in SharePoint on-premises: ...
1
vote
2answers
56 views

Exclude users whose names contain

I am trying to automate my O365 licensing and have had some success, but I am not sure how I can accomplish the following... I have users who I do not wish to license and they all share the value ...
1
vote
1answer
33 views

Powershell changes are not affected in Web UI

Not the first time I noticed that sometimes PowerShell changes are not seen in UI. By example this script: # change web description example Start-SPAssignment -Global $myWeb = Get-SPWeb ...
0
votes
1answer
24 views

Get search service Application name via PowerShell

I'm trying to write some automated scripts to update the web.config, is it possible?
0
votes
0answers
23 views

Memory Leak for Update-SPSolution using Powershell Remoting and Sharepoint 2010

I use PowerShell remoting to deploy scripts ps1 for SharePoint 2010. I get Memory Leak in any cases using Update-SPSolution cmdlet. I get timeout error for deployment. And powershell.exe process in ...
2
votes
1answer
268 views

CSOM powershell to update search navigation sharepoint 2013

I am wanting to write some client side powershell to update the search navigation on global search. I have found many examples of this with server side but none using client side. anyone with any ...
0
votes
1answer
71 views

Can't create search service application in powershell

I'm working on creating a SP2013 search service application based on Todd Klindt's work (http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=378). It worked down to the line ...
1
vote
2answers
114 views

Why do I get this error creating a web part page in Sharepoint 2010?

The following appears to be the way to create a web part page in Sharepoint 2010 using Powershell: $web = Get-SPWeb http://somesite $pWeb = ...
1
vote
1answer
52 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
38 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"] ...
1
vote
0answers
40 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 ...
0
votes
1answer
24 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 ...
0
votes
1answer
98 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
2answers
425 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 ...
2
votes
2answers
69 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. ...
1
vote
0answers
91 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
357 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
212 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 ...
0
votes
1answer
223 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
24 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
33 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
30 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 ...
1
vote
1answer
39 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 ...
1
vote
1answer
26 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 ...
2
votes
0answers
38 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
169 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
89 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 = ...