Questions tagged [powershell]

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 local and remote Windows systems.[except from WikiPedia]

1,080 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
2answers
3k views

Last Modified date for site collection

We are working on SP 2013 On Premise Environment. For archival process of old site collections, we are trying to find out site collections which have not been accessed since 1st Jan 2018 in a web ...
1
vote
0answers
573 views

How do I connect to Microsoft Teams via PowerShell through a proxy?

I have issues running the Connect-MicrosoftTeams -Credential $UserCredential command. I get the following error: AADSTS50158: External security challenge not satisfied My PowerShell Profile looks ...
1
vote
0answers
263 views

Exception calling “StartWorkflowOnListItem” with “3” argument(s): “subscription”

I can't find anything on Google about this and I've been searching for a while. I'm trying to call a SharePoint 2013 List Workflow on each item within a given list. Add-PSSnapin microsoft.sharepoint....
1
vote
0answers
323 views

Powershell html string get value

I have a decoded html tag value is a string variable like this $Body = [System.Web.HttpUtility]::HtmlDecode($field.GetAttribute("Value")) Output of the Body is like this "<div class="...
1
vote
1answer
238 views

Adding Web Part document library to my site using powershell

I want to add my document library as a web part to my collection site. how is that possible using PowerShell, please ?
1
vote
0answers
415 views

Put an Image webpart (Image/Image gallery) on the top of a Modern SP page with Powershell (PnP)

I need to communicate an important information (picture) on Team Site homepages so I decided to add on the top of every homepages an Image Webpart (to know : homepages already has some webparts). I ...
1
vote
0answers
89 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
27 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
726 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
vote
1answer
1k 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
194 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 ?
1
vote
1answer
41 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
535 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 ...
1
vote
1answer
733 views

Not able to Load Managed Metadata Context

I am trying to create Term with PowerShell in SharePoint Online to do so I have written below code but on [Microsoft.SharePoint.Client.Taxonomy.TaxonomySession]::GetTaxonomySession($spContext) ...
1
vote
0answers
77 views

Update metadata of many items in library

I have the requirement, that the values for two of my site columns of all our document libraries depend on a value outside of SharePoint (its stored in a database). If the value in the database ...
1
vote
0answers
304 views

Find all InfoPath Forms in SharePoint Online and when last used?

I am new to this site and have a few questions that I will post. I have used this site quite a bit in the past for answers, but just recently joined and want to thank everyone for their contributions. ...
1
vote
0answers
28 views

How to set default pagelayout in powershell?

I am using SharePoint 2013 on prem. I would like to set some default pagelayout for a subsite. How can I do this?
1
vote
0answers
142 views

powershell script to sync sharepoint on premise environments

I'm after a script in powershell or if using PNP is easier to be able to have content databases etc..sync in different environments e.g dev,test Any suggestions or tips would be appreciated
1
vote
0answers
78 views

How to find out if a solution is deployad with -FullTrustBinDeployment parameter

I am trying to find a piece of PowerShell script that gives me the list of solutions deployed with FullTrustBinDeployment parameter.
1
vote
1answer
329 views

how to grant site app permissions to subsites using powerShell in SharePoint online

I have a top level site it contains 100+ subsites i want add workflow app permissions to each site, its bit time taking by doing manually like this. i am looking powershell scripts to automate/one ...
1
vote
1answer
98 views

How to add .app (app part) into a share point page using powershell?

I have an App which is already deployed into SharePoint site. I want to add that .app file into a SharePoint page using powershell script. Thanks in advance.
1
vote
0answers
261 views

PowerShell to Export Sites and Subsides with security groups

I'm attempting to come up with a powershell script that would allow me to export a list of sites and subsides and the permission groups there in to a CSV. I'm familiar with using the cmdlts but not ...
1
vote
1answer
1k views

Restore all deleted List Items of sharepoint list from Recycle bin using Powershell using item Guid and export as csv file

Restore deleted items from recycle bin using Item GUID and export all deleted items in CSV file using Powershell $SiteURL="" $ItemName="Test.xlsx" $site = Get-SPSite $SiteURL $RecycleBin = $site....
1
vote
0answers
468 views

Syncing Users' information between SharePoint and Active Directory, when Users' accounts on SP & AD are not similar

I am facing a problem regarding the users' information inside the userdisp.aspx Page, not being in-sync with Active Directory. Now we have the following settings:- SharePoint 2013 on-premises farm ...
1
vote
1answer
405 views

Powershell to change page layout content type in masterpage gallery

I'm trying to automate our cie theme with powershell. So far I succeeded in uploading master page and page layouts to the masterpage gallery, check them in and publish them. Now I want to change the ...
1
vote
0answers
1k views

Connect to Sharepoint Online using powershelll credentials

I would like to enumerate a Sharepoint Online list. The sample codes that I found are using the CSOM, which is fine, as the user who will run the script, won't have admin rights, but looks like I am ...
1
vote
1answer
424 views

Export csv file to get all documents with columns for all the sites in an site collection using powershell

Can someone please help me to powershell query of webApp/ (root) site collection, /finance/ path only. The web App instance is fine for as a design platform. We need a list of documents with the ...
1
vote
0answers
69 views

Make a change to thousands of subsites

Office 365 admin here. Our office manager contracted out our sharepoint development and now we IT helpdesk guys are on the hook to fix what they didn't get right. I didn't get to this position by ...
1
vote
0answers
219 views

Could not deserialize site SP Restore Error

I am trying to Restore a site collection but it fails with below ULS error. Could not deserialize site from P:\backup\InerBackup9-1-2018.bak . System.Data.SqlClient.SqlException (0x80131904): A ...
1
vote
1answer
166 views

Install new developed features into Sharepoint 2013 production

I've restored a backup from my Intranet production environment into development environment, which I got some errors related to pages layouts. I can ignore this at this time, but my issue is how to ...
1
vote
1answer
89 views

SharePoint 2016 SPOfficialFileAction

PowerShell script to move items to record center. If I use the 'Copy' option, all of the files are copied to the record center but when I use the 'Move' option, it only moves half of the files. I can ...
1
vote
1answer
62 views

After create site collection with powershell UI is broken

After creating a site collection with PowerShell UI is broken. My PowerShell code is New-SPSite -Url $SiteColl_URL -OwnerAlias $SiteColl_Owner -Language 1033 -Template "CMSPUBLISHING#0" -Name $...
1
vote
1answer
3k views

Search was stuck on Paused for:External request even though I tried to resume it via powershell

Yesterday I performed a SharePoint update and I had to stop Search Service Application via powershell. I disabled the sptimer and spsearch on Windows Services. After the update was complete I turned ...
1
vote
1answer
181 views

power-shell script to backup our sharepoint farm is not working as expected

I have the following powershell script to backup our sharepoint 2013 on-premises farm + backup the content database + a site collection. as follow:- Add-PSSnapin "Microsoft.SharePoint.PowerShell" #...
1
vote
0answers
198 views

List Error “The View {GUID} from List [X] is ill formatted”

I ran into an issue with one of my sharepoint lists where any time a user tries to create or modify a view, or view the list settings they get the usual "Something went wrong" error. I finally tracked ...
1
vote
1answer
269 views

Unable to create a Term Set using powershell. Error:- “Cannot convert argument ”lcid“, with value…Input string was not in a correct format.”

I want to create a term set using powershell, and i need to pass the term set GUID, as i want to create a copy of our staging term sets inside our live server, so i can export/import managed metadata ...
1
vote
0answers
173 views

Salvaging a broken Service Application

The Application Discovery and Load Balancer Service Application and its associated proxy on my farm are broken and preventing workflows from publishing correctly. I'd like to just destroy and re-...
1
vote
1answer
2k views

Disable Read Only SharePoint Content Types - Powershell

I use the PnP Commandlets to do much of my site building but cannot figure out how to make Site Content Types not read-only. There is no way to do this with commandlets so I'm looking for some help. ...
1
vote
0answers
603 views

error (403) Forbidden when using CSOM to access sharepoint online from sp2013 server with Powershell

I am trying to run a powershell script on my sharepoint 2013 server which will access our sharepoint online environment using CSOM, but whenever I try I get "error (403) Forbidden" Below is a sample ...
1
vote
1answer
572 views

Get info about state of search index via PowerShell

I can get info about index state using cmdlet Get-SPEnterpriseSearchStatus: How can I get state of index directly without requesting info about all search components? I tried to use properties of ...
1
vote
1answer
347 views

Adding publishing page by powershell and custom page layout giving error

I created custom html page layout with embedded web part in it. When I am trying to add page to pages library by powershell getting below error Fail: Exception calling "AddPublishingPage" with "2" ...
1
vote
1answer
708 views

Copying a 2013 platform list SPD workflow between sites using PowerShell, CSOM and PnP-Powershell

I am trying to copy a List workflow from one site to another (same site collection). Unfortunately, for various reasons I can't save the workflow as a template. I have a PowerShell script that does ...
1
vote
2answers
1k views

Changing logo on all SharePoint Online site via PowerShell

Is it possible to create a script that will loop through all the sites in a site tenancy to replace the logo that is attached to each one. I'm unable to locate any useful commands in the SPO ...
1
vote
0answers
94 views

Get termsets via PowerShell

How to get all termsets using PowerShell without direct reference to site collection (as when calling cmdlet Get-SPTaxonomySession)?
1
vote
0answers
202 views

Export the user list and there corresponding permissions for the entire site collection

I am looking to export the users and there permission level at site collection level. Could any one please help me how can I do this with powershell script
1
vote
0answers
105 views

Importing webPart with PowerShell through command line versus PS1 script behaves differently

If I execute the following through a PowerShell console (ran manually) I am able to get the webParts to work correctly: $list = $context.web.Lists.GetByTitle("Pages du site") $context.Load($list) $...
1
vote
1answer
1k views

How to get users that have an alert set up for a list?

I'm on SPO so I'm trying my luck with my limited CSOM knowledge. Basically I`d like to get the users have set up an alert for a list. Im able to query the alert but the "User" property is only ...
1
vote
2answers
59 views

Custom Column data

I am trying to create a script that will iterate through specified site collections and find all files which have a specified data in the custom column named for eg. colours. in this coloumn it's a ...
1
vote
0answers
412 views

Reset list permissions for more than 20 thousand million records

Below is the script that reset the permissions for the list items . it works fine when there are around 10 to 30 thousand items. However if the items are more than 2000000 million records the ...
1
vote
1answer
47 views

Viewing PS1 files in browser: Possible in SPO 'classic mode'?

Not a huge fan of the new fangled site layout for newly created SharePoint Online sites, but it is growing on me. One feature I particularly like is the ability to view PowerShell files, complete with ...

1
3 4
5
6 7
22