Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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 ...

2
votes
1answer
16 views

PnP Poweshell: Get-PnPListItem Restrict to a Specific View

I'm using Get-PnpList and Get-PnpListItem to retrieve all items in a specific list, but I would like to restrict the items to only those in a specific view? Is this possible? Maybe with a CAML query, ...
0
votes
1answer
25 views

AppFabricCaching Service DOWN in SharePoint 2016 On Prim [on hold]

Please find powershell script used below & do the needful. James Please find image here. Am unable to add this image in comments.
0
votes
1answer
12 views

Create some new user profile properties from excel

I have a CSV file with new properties that exist in the AD. I want to add this properties to all user profiles, and set value from AD (the same property name is in the excel) and set description from ...
0
votes
0answers
11 views

how to create a sharepoint Javascript library with generic template and add permission group entity to it using powershell [on hold]

how to create a sharepoint Javascript library with generic template and add permission group entity to it using powershell and some scripts also need to be added from local .
2
votes
2answers
41 views

How to add items in SharePoint List with values from 2 different lists

My program must verify this requirement : Add Owner value from List A where Name (in list A) eq Name (in list B): Here i want to nested the first Foreach in the second one Add-PSSnapin Microsoft....
0
votes
1answer
13 views

Using restore-pnprecyclebinitems for sub-site use only

We have some files missing on a sub-site from which I have tried to use a script to restore. I connect to the context using connect-pnponline giving the specific team address t5\ts1. I confirm ...
0
votes
0answers
23 views

Get Specific list template CSOM powershell

How to get specific list template from list template collection in Poweshell CSOM. I got list template collection using following code: $cusTemplateColl = $Context.Site.GetCustomListTemplates($...
0
votes
1answer
28 views

“Feature '94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb' is Web-scoped, and cannot be added to the Site.”

I am trying to activate Sharepoint Server publishing feature in a sharepoint online Subsite but getting error : Feature 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb is Web-scoped, and cannot be added to ...
0
votes
1answer
20 views

Update Hyperlink Field via Powershell (assembly missing)

I simply want to update a hyperlink field via Powershell: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft....
0
votes
0answers
14 views

Teams -Reached catch method Error occurred while executing Code: GeneralException Message: Failed to start/restart provisioning of Team InnerError

I was trying to create Teams using Powershell script as below $GroupID = (New-Team -DisplayName $TeamName -AccessType Private -Description $TeamDescription).GroupId in general this code execute well ...
1
vote
0answers
16 views

POSH created Items and BusinessData fields not displaying additional ECT fields

I have a POSH script that create items on a list that pulls additional field data from a BCS source. The function is as follows. Function Add-SPItems($TargetingDetails) { $site = New-Object ...
1
vote
1answer
27 views

How to run Powershell on sites when you have IP

I'm new to creating an external site, but between my client's IT guy and me, we managed to create and external site and we can access it by entering the ip address. For example if ip=123.45.67.8 the ...
1
vote
0answers
31 views

Sharepoint 2013 Add solution [duplicate]

I am getting below error when I tried to install the WSP in staging environment. Add-SPSolution : Operation is not valid due to the current state of the object. At line:1 char:1 + Add-...
1
vote
2answers
33 views

How to update createdBy(author) field using powerhsell Sharepoint CSOM

I need to update the CreatedBy(Author) field using CSOM Powershell Sharepoint Online. I tried: $user=$ctx.Web.EnsureUser("xxx@aa.onmicrosoft.com") $ctx.Load($user) $ctx.ExecuteQuery() $listItem["...
0
votes
0answers
15 views

Powershell script for download some specific documents from sharpeoint site and save as serial number

Hi I have some documents with documentids in a SharePoint site, I want to download documents with a list of specific names in excel sheet like below after download document documents name should be ...
0
votes
1answer
43 views

Exclude Forms/DispForm.aspx? from search results Search api Sharepoint online

How can i exclude "Forms/DispForm.aspx?" from search results using the search api for SharePoint Online? I tried the following querytext: $querytext= path: *: // * /DispForm.aspx* But it is not ...
0
votes
1answer
19 views

How to add multiple filters to a property in Search api Sharepoint

Below is my querytext to get items from pages library and document library. $quertText="createdby:XXX AND contentclass:STS_ListItem_850 AND STS_ListItem_DocumentLibrary" But it is returning 0 ...
2
votes
2answers
23 views

I can't seem to retrieve SharePoint 2013 list items via Powershell

I have a short script which is going to be part of a larger one but I can't get it to work. It works on every other list I've tried running it against but not this one in particular. The $myList....
0
votes
1answer
30 views

Get Documents from specific folder from specific library using Search api CSOM

I need to get documents from specific folder from siteassets and .aspx files from Pages library. I tried: $quertText="contentclass:STS_ListItem_DocumentLibrary" this query retrieving all ...
0
votes
0answers
24 views

Script to get View Fields for a site collection

I have a Site collection with 50 Lists and Libraries . Is there any powershell script that iterates through all lists and get its content type , Views,View Properties in a CSV file. I tried like ...
2
votes
1answer
22 views

Get properties of SharePoint in powershell as non-admin?

My ultimate goal is to pull data from a SharePoint doc and update a PowerPoint doc automatically. I'm testing if I can get simple information. However, it appears that I cannot even read a ...
0
votes
0answers
12 views

Which Workflows Get Reported in $List.WorkflowAssociation

I'm currently working on Workflow Status Reports for SharePoint 2013 and am having an issue. The support team for the tool I'm using says that 2013 Workflows should show up when running the following ...
2
votes
3answers
65 views

How to create links under Global navigation using CSOM or PowerShell?

I'm trying to create links under 'Global Navigation' and checked "Show All pages" option in SharePoint Online. It is not creating links in Global navigation and it is not throwing any exception also. ...
0
votes
2answers
47 views

How to get listname using its guid powershell CSOM

How to get list name using its guid in CSOM powershell I tried: $listname=$web.Lists.GetById("guid") But this is not working. Please suggest.
0
votes
1answer
24 views

Filter site pages , AllItems.aspx from Search results using search API powershell

I have to get data from sharepoint tenant based on createdby using Search api powershell .In search results there are allitems.aspx and sitepages,Pages,Forms/Allitems.aspx,calendar.aspx also .How can ...
0
votes
1answer
14 views

Get Site URL using Keyword query Search api

I want to get Site URL using Keyword Query power shell.. Below are properties(b and lastmodifiedtime) im retrieving using keyword query ..likewise i want to get Site URL using below approach,how can ...
1
vote
1answer
33 views

Get ListItem ID using Sharepoint Search API

How to get List item ID using Search API . I am getting below properties along with that I need to get item id. $keywordQuery.SelectProperties.Add("Created") $keywordQuery.SelectProperties.Add("...
0
votes
1answer
24 views

PowerShell: Modify Content Type in specific sub folder

I am using the following power shell script: http://get-spscripts.com/2010/10/change-content-type-set-on-files-in.html To change the content type from the standard "document" content type to a new ...
1
vote
2answers
55 views

SharePoint OnLine Using Cmdlet New-SPWOPIBinding

I am a young SharePoint OnLine user. I want Excel documents from all my sites to open directly with Excel and not Excel-OnLine. As I have a lot of sites and it would be long to make the sites one by ...
0
votes
0answers
18 views

sharepoint 2013 trial product for this product expired

I am getting Error when i try to create new site under web application or when i try to create page in sharepoint 2013 sharepoint 2013 trial product expire. Run--> inetmgr-->Application Pools--> ...
1
vote
1answer
25 views

How to generate the Site Usage Report using PowerShell or CSOM code?

I want to generate the details section which are displayed under Home > Usage > SharePoint Site Usage. Is it possible to generate the details using PowerShell/CSOM? The details which I am looking for ...
-1
votes
0answers
24 views

powershell hto update mapping of managed properties sharepoint

is there a way to update mappings of managed properties from a file, I think checking of the crawled property exists is a must but is there a function that would update mappings ? thank you #$mp = ...
1
vote
2answers
38 views

Powershell script to set/update existing managed properties in sharepoint (Not create them or get them)

$newmp =Set-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity has anyone used this method, i have been trying to work with it, i have been successful in setting description ...
3
votes
2answers
66 views

Sharepoint online powershell script to get all field properties

Is there a way in SharePoint Online to get Field Properties? For example, I have a lookup column and for this I want its Field Type, Required, Get information from: Allow Multiple Values: Checked or ...
3
votes
1answer
27 views

Set-SPSiteAdministration - remove secondary administrator

Using PowerShell I can update a site collection secondary administrator (as farm administrator): Set-SPSiteAdministration -Identity http://contoso/sites/test -OwnerAlias "domain\testuser" This works ...
1
vote
1answer
35 views

How to delete calendar items from SharePoint online calendar list using PowerShell?

I have a SharePoint calendar having more than 35k items.The Calendar has data from 2011 and onwards. I would like to use PowerShell script to start removing items from 2011 to 2016 from the current ...
1
vote
1answer
35 views

Using PnP PowerShell to find shares in Site / Document Library?

I am trying to find the list of shares in a site / document library / list using PnPPowerShell. Does such a Commandlet exist ?
4
votes
3answers
124 views

Move specific folder in a document library

UPDATE 1: I have the following script, but it's not working correctly: Add-PSSnapin Microsoft.SharePoint.PowerShell #input = https://sharepoint.oshirowanen.com/sites/oshdev $websiteurl = read-host "...
1
vote
1answer
34 views

SharePoint Online how to publish two lists on one site programatically

If I start doing a lists on SharePoint Online and try to add them I only see my surname and name. I can't see lists or libraries. How to add to a page list on library by code programatically to ...
1
vote
0answers
40 views

Read webpart Data - Sharepoint Online powershell

I have a requirement where I need to find if there is a table in the pages on my website. I thought of writing a PowerShell script for getting all the webparts in the page and reading the content ...
3
votes
0answers
58 views

*UPDATE* SharePoint 2016 Auditing

I find myself scratching my head as I know there are audit reports for the site collections, which is good, and I know there are third-party applications that can collate the audit data and present it ...
3
votes
2answers
32 views

Hiding system fields in the document library

I am using SharePoint 2016 and want to hide created, created by, modified and modified by fields. This is in the document library view and not the new, edit or display forms (i.e. if you click on a ...
2
votes
1answer
168 views

Microsoft Online Management Shell has no commands available

I installed the SharePoint Online Management Shell on two different Windows 10 machines. One worked fine, the other does not have any commands available. If I run get-module, it lists the Microsoft....
2
votes
0answers
15 views

PS Command to get item count in a document library group by year?

I'm able to get the total item count, but I am trying to get the document count in a document library grouped by year. Something like Year TotalCount 2018 240 2017 500 2016 1000 Any knowns ways ...
2
votes
1answer
19 views

How to convert user field values into objects for adding permissions in powershell?

I have a list with a multi select (user and group) field. I want to grab the values from there and then pass them to the add permissions method. I grab the values but they come out like this 12;#...
3
votes
0answers
31 views

Copy items from one list to another with kept versions with PowerShell

I want to copy items from one list to another using PowerShell, but what I would like to keep after copying data is versions or at least multiline of text column that has append feature. I managed to ...
3
votes
2answers
57 views

Remove users from “All People” via SPO PowerShell

Is it possible to remove a user from the "All People" hidden group in SharePoint Online? Ideally via PowerShell if possible... Currently you are able to view and manually delete users from a site ...
4
votes
2answers
51 views

SPO - Remove Document Library permissions in Powershell

As part of an SPO site creation script, I want to remove ' Visitors' from the permissions of a document library that is created in the script. I've got as far as breaking the inheritance, but how ...
2
votes
2answers
87 views

How to avoid credential popup, to connect with graph API in the powershell script?

I have written graph API to fetch user detail from the Sharepoint Online Connect-PnPOnline -Url $SPSiteURL -Credentials $PnPSPOCreds -Scopes "Group.Read.All", "User.Read.All" $apiUrl = "https://graph....
0
votes
1answer
48 views

SPO - Add Document Library to Quick Launch using Powershell

As part of an SPO site creation script, I'm trying to get newly created document libraries automatically added to the Quick Launch navigation links. I'm running this code: $SPOCredentials = New-...