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,116 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

I need to replace a Domain Group (Office 365 group) with another Domain Group (Office 365 group) on SharePoint Online

I have an Office 365 group added, for e.g. "ABC" which could be present at any of the below level. Permissions are broken at any level below Site Document Library Pages Page 1 Page 2 ...
1
vote
2answers
209 views

Add-in/App - avoid consent dialog when adding app to a site

Is there a way to "trust" an SharePoint Add-in/App after it has been uploaded to the app catalog? Or eventually before/when it is added. The App is an SharePoint Add-in (.app file) and is hosted on ...
1
vote
1answer
416 views

What is the StorageQuotaAllocated means in SPO

I have a little confusion about this Storage Quota Allocated property in SharePoint Online. If i ran Get-SPOTenant, I get the StorageQuota : 1304576 & StorageQuotaAllocated : 104962048. ...
1
vote
1answer
976 views

Rename a file in a Document Library - SharePoint 2013

I am wanting to rename a file name in a document library called "RenameAFile". Currently have the following file called "UD-PD-Documentattion.xlsx" and I want add "DN" before the file name "UD-PD-...
1
vote
0answers
148 views

How to resume a paused workflow

I have created a SharePoint 2010 style workflow in SharePoint 2013. It is currently paused till 10 Dec 2018 and says "Paused until 2018/12/10" Is it possible to resume this workflow before that ...
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
798 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
294 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
331 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
274 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
496 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
99 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
28 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
772 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
201 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
43 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
556 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
772 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
319 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
146 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
83 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
354 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
106 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
266 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
2k 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
539 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
428 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
455 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
75 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
238 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
170 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
63 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
193 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
214 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
284 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
189 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
626 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
640 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
360 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
742 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
95 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
203 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
3 4
5
6 7
23