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

How to know if site collection is root with powershell

I want to loop over all web application's site collection and activate a feature on root web except the root site collection. How to know if current site collection is the root one. PS : I've used to ...
0
votes
0answers
90 views

How to set default value to CT column using powershell

I want to set the default value to a Content Type managed metadata column, I want to set the default value using powershell and want to set it to hidden. How to accomplish this?
0
votes
0answers
210 views

Problem Starting 2013 Workflow from Powershell

I have a scenario where I need to kick off a 2013 SPD workflow from a powershell script. This should be possible using the StartWorkflowOnListItem method. My script is as follows: Add-PSSnapin ...
0
votes
0answers
33 views

How to add a Custom List to website using Powershell?

I am creating a custom list via powershell. After the creation I have to open IE go to a page and add the list manually. Is there a script that will add a list into a page?
0
votes
0answers
43 views

Adding custom SPGroup to all lists in Site using powershell

I want to add custom SPGroup as contribute permission to all the lists in a sharepoint site using powershell. all the lists are at root web of the root site collection. Need possible script to ...
0
votes
0answers
25 views

How to add SP Group to Managed Metadata Term Group using Powershell

I want to add Active Directory Group to Term Group using Powershell. I have found script to add AD Group to Term Group, but i want to add AD group to multiple Term Groups. Need powershell script to ...
0
votes
1answer
142 views

Remove item level permission for specific user using powershell

I want to remove the permission for each item and then want to add my unique permission I have tried the code for giving permission. But firstly, i want to remove it and then add new permission. My ...
0
votes
1answer
189 views

Add video files to asset library using PowerShell

I want to add video files to the Asset Library programmatically using powershell and Kindly help me. I tried the below code : Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction ...
0
votes
1answer
133 views

How to change text encoding when inserting values inside a sharepoint list using powershell?

I'm using french words with special characters like "é" "à" etc. When I trying to insert text in my list fields using powershell, it does insert the values but the characters aren't well encoded. For ...
0
votes
2answers
214 views

Get documents inside the folder from Shared Document using powershell

I need to get all the documents name inside the folder from shared document using power shell. Thanks
0
votes
0answers
80 views

Ignore/Exclude file when using Export/Import-SPWeb

I'm using the Export-SPWeb and Import-SPWeb Cmdlets to migrate a few libraries between SharePoint servers. However, one of the files being migrated is a shared data source which is only valid on the ...
0
votes
0answers
1k views

Error: “Cannot index into null array”

I am getting this error while trying to get the list name Cannot index into a null array. + $clientlist = $web.Lists["Shared Documents"]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ...
0
votes
2answers
293 views

Use Powershell to configure PowerPivot Data Refresh Schedules

Is there a way via powershell to check and see which items have a data refresh schedule configured for them? and If they don't proceed to create one? I can't seem to find much on working with ...
0
votes
1answer
62 views

SharePoint Import/Export Command for Library with version setting disabled

I have to export a SharePoint library from a site in server A and import it to a library in server B such that only the items that are new or updated are imported to site in server B. While this can ...
0
votes
0answers
73 views

How to find sharepoint 2013 foundation site collection broken links?

How to find all broken links in a site collection in SharePoint 2013? Preferably with PowerShell
0
votes
0answers
17 views

Does STSADMIN support workflow migration?

I've been tasked to move several SP2013 sites/collections from our National farm to the International Farm. From what I can tell, STSADMIN backup/restore can handle this pretty easily. However, I ...
0
votes
1answer
988 views

Import-SPWeb error: “The file xxx.cmp does not exist.”

I have a strange issue with Export-SPWeb and Import-SPWeb for SharePoint 2013. I want to export one of my sites, so I type this command: Export-SPWeb https://test.mywebsite.com/site -Path ...
0
votes
0answers
87 views

open pdf in browser sharepoint 2013

I have a library of pdf file, I need to open those file in browser and not to download them. I tried to set permission to web application using those steps : ...
0
votes
0answers
19 views

How to delete all user profiles of users that are not group members

I have to delete all user profiles of users that are not in a specific ad group. How can I do that (with powershell)?
0
votes
0answers
34 views

Delete user properties under specific section - list all user properties in a section

I'm trying to delete all user properties under a section in user properties. How do I list all user properties in a specific section? Add-Type -Path "c:\program files\common files\microsoft ...
0
votes
2answers
386 views

Programmatically create content database in C# (SP 2013)

The goal is to have a web user interface with the option to create new site collections with new Content Database. With the admin user I can manually in the CA create new Content Databases. I can ...
0
votes
1answer
494 views

Get-SPUser returning users no longer in the site

Good Day, Note: We are not using the Profile Service, so right of the bat, that may be the issue. The reason we are not using it, is because we use HandShake to pull AD profiles for display. If ...
0
votes
0answers
49 views

List url property missing

We have 3 environments PRD, TST and DEV. Each environment is pretty much a clone as both TST & DEV were built from PRD. The other day I was testing a Powershell script and when I moved to PRD I ...
0
votes
1answer
95 views

How to delete all webs and all there subwebs using powershell

I want to delete all webs and subwebs like this, Add-PSSnapin Microsoft.SharePoint.Powershell Get-SPWebApplication https://portal.fruits.com | Get-SPSite -Limit All | Get-SPWeb -Limit All | where ...
0
votes
1answer
56 views

How to delete all lists in all webs using PowerShell

I want to delete all lists with title this and this using PowerShell but getting error Add-PSSnapin Microsoft.SharePoint.Powershell Get-SPWebApplication https://portal.fruits.com | Get-SPSite ...
0
votes
1answer
205 views

Pagination not working with XSLTViewWebpart when created using Powershell

I am having similar issue as mentioned in below URL's. Paging in XsltListViewWebPart is not working perfectly when added programmatically Why don't folders work when adding an ...
0
votes
1answer
22 views

Getting error while copying contents from one library to another

I am using below script to iterate through each folder/file in document library. $source = "http://sitecollection/sites/site/subsite" $dest = "http://sitecollection/sites/site/subsitearchive" ...
0
votes
1answer
132 views

Scheduled PowerShell Task Won't Write to a File

I have a PowerShell script that runs exactly the way I want interactively; creating two log files: one is a csv for graphing the output later, and the other is a basic status log, such as: Opening ...
0
votes
1answer
339 views

Get-SPUser returns additional blank lines. How do I remove them when reading into array?

I am attempting to get a list of users for the site that are part of a specific domain. The end result will be putting them in a SQL DB, which is fine; I just need to get the array clean. I am not ...
0
votes
1answer
257 views

How to move OOTB profile properties into custom section

How to move OOTB user profile properties into custom section? How we can do it using powershell? I need a PowerShell script for doing this in SharePoint 2013.
0
votes
1answer
400 views

Page Not Found Error After Deploying The Solution Using PowerShell

I am a novice in sharepoint 2013. I have created a Sharepoint 2013 Solution using "Empty Project" as my template and added two aspx pages. When deploying the solution using VS2012 the solution ...
0
votes
1answer
278 views

Copy documents from one document library to another using PowerShell

I am using below Powershell script to copy contents from one document library to another, however I am getting this error: Cannot find an SPWeb object with id or url :...... Script: $ver = $host | ...
0
votes
1answer
112 views

Fix broken image urls

I have migrated some websites from SharePoint 2007 to 2013 and there are some broken links, like images and links. As far as I know they are absolute links. Can anyone show me how can I fix these ...
0
votes
1answer
288 views

How to create different Column Types in SharePoint Online using PowerShell cmdlets

I'm using below script that actually create the News List in my SharePoint Online site, but I'm stuck on how to create different Column (Field) types under that List, right now it's just creating a ...
0
votes
1answer
219 views

Inventory SharePoint 2010 with Site Title, URL, ID, ParentWebId, & Size

I need to inventory a web app. I have this script below that works like a charm except that I'd really like the size of each Web. Is it possible to do this using this script? Get-SpWebApplication ...
0
votes
1answer
30 views

How to add custom webparts on a webpage without editing the page.(powershell)

Every time after deploying the WSP. Editing the page and adding all the custom webparts on every page is tiresome. Is there any easy way to add all the web parts dynamically using powershell ??
0
votes
1answer
60 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
42 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
196 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 ...
0
votes
2answers
378 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 ...
0
votes
1answer
51 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
0answers
690 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
5k 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
109 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 ...
0
votes
1answer
77 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
1answer
206 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 ...
0
votes
0answers
629 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
2k 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
3answers
38 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
186 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 = ...