Skip to main content

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]

Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

I'm trying to get the below powershell script to work but getting this error : The term 'Get-PnPRoleAssignment' is not recognized as a name of a cmdlet It seems this command does not exist and if not ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
73 views

My company has roughly 200 SP sites (SharePoint Online only) in its Tenant, and many have users as Owners - who shouldn't be in that group. I need to query the entire Tenant and generate a report of ...
Quilly's user avatar
  • 507
0 votes
1 answer
97 views

I'm looking for a way to import a sharepoint list of a sharepoint site and export it into another destination. I looked at this Powershell PnP commands I don't want the CopyList as i need to have the ...
naijacoder's user avatar
  • 4,368
0 votes
0 answers
35 views

I know this issue is not common. But has anyone tried to login in into SharePoint Online using SharePoint Designer. The site is still using the classic layout and pages. When i try 'm getting the ...
naijacoder's user avatar
  • 4,368
0 votes
0 answers
13 views

0 Good afternoon! I have a task to create a PowerShell code to check all shared links from our SharePoint site, regardless of when they were created. The current limit is 180 days. Is it possible to ...
Dmytro Novitnii's user avatar
0 votes
1 answer
464 views

I am a SharePoint office 365 admin inside a tenant, and i am working on 2 communication sites. now i want to review all the retention polices applied to the sites either inside :- List or Library ...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
123 views

I'm trying to export the crawler log as shown in the CrawlLogURLExplorer-section in the Search Service Application - Diagnostics - Crawl Log from our productions system for our developers to use for ...
Dennis's user avatar
  • 121
0 votes
0 answers
75 views

I'm trying to find an archiving solution for my company that's easier than using the GUI and scrolling through large amounts of files and folders and manually using the Move To button. I have written ...
user124837's user avatar
2 votes
1 answer
409 views

In Powershell, after running the Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/xyz -UseWebLogin and Get-PnPUser -WithRightsAssigned commands, I can get the list of all users that have ...
Lorren112's user avatar
0 votes
1 answer
175 views

We have 5000+ SharePoint Online sites in our tenant where i have to change the Site Version setting to automatic for all existing document libraries. I am using the below to connect using an Azure App ...
user3436773's user avatar
1 vote
0 answers
117 views

Requirement: One of our Clients is working on correcting permissions on there tenant and thus needs to remove "Everyone" and "Everyone except external users" from identified places ...
SiD's user avatar
  • 93
0 votes
1 answer
63 views

I want to read CSV file which consist of Site collection URLs and replace the "Allow access requests" email ID. In CSV file, I have data like below. SiteURL - ColumnName https://example.com/...
user119595's user avatar
1 vote
0 answers
107 views

I’m trying to accomplish a task regarding file copy from one Sharepoint document library within a site in one tenant (Sharepoint On-premisses) to a document library within another sharepoint site in ...
Jarl's user avatar
  • 11
0 votes
1 answer
102 views

I am looking for a way to (even programmatically) impersonate users in my SharePoint Subscription Edition farm, and view search results on their behalf with their permissions, not my own elevated ...
עומר אנגי's user avatar
2 votes
2 answers
551 views

When I programmatically change the title of a group-based site using PowerShell, the site gets the new name, but the associated Microsoft 365 group does not. Furthermore, when you log in to the site, ...
Janet's user avatar
  • 185
0 votes
1 answer
47 views

How to count the documents inheriting from a specific level like the site, document library or folder by powershell? For example, I have a site with 100 documents total seperated over multiple ...
KEM's user avatar
  • 15
0 votes
2 answers
263 views

How can I count all files recursive inside a specific folder in a document library by powershell? So he needs to count also the files inside the subfolders recursive.
KEM's user avatar
  • 15
1 vote
1 answer
154 views

I want to download a SPO custom form via Powershell. I´ve tried command below but get an error message, which says there is no canvas app in this enviroment which is the default enviroment. A download ...
DocSummer's user avatar
0 votes
2 answers
520 views

I come from sharepoint 2019 and i try to import data from excel to a list It's working fine for date and text datas But i don't understand about unique choice, checkbox or People picker fields. my ...
Poule's user avatar
  • 3
0 votes
0 answers
560 views

I have been using the Copy-PnPFolder to copy files between sharepoint sites. But just suddenly i started receiding this error : The remote server returned an error : (404) Not found This is how i ...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
494 views

I'm trying to use the command below to copy local files to SharePoint. Copy-PnPFolder -LocalPath "C:\Projects\BS\Banner.zip" -TargetUrl "https://Demo.sharepoint.com/sites/Demo/Documents&...
naijacoder's user avatar
  • 4,368
0 votes
1 answer
3k views

I'm trying to run my Powershell PnP script using ClientId and ClientSecret instead of UseWebLogin. I already created an Azure Application ID using this tutorial (but skipping the certificate part for ...
Dylan666's user avatar
0 votes
1 answer
576 views

We have a large file server with files and folders that we need to migrate to SharePoint Online. In SharePoint Online, we have a limitation of 400 characters URL limit and a large number of our ...
SmithBZ's user avatar
  • 353
0 votes
2 answers
903 views

I'm looking for a way to automate emptying the recycling bins (1st & 2nd stage) from all sites in our SharePoint (Online) collection. From searching, I've found solutions that no longer work (...
FotS's user avatar
  • 1
1 vote
2 answers
691 views

This is the first PowerShell-script I ever wrote. I want to keep digging into the folder 10 times. Is there a better way to do this than my way to keep repeating? Here is the script: # Connect Connect-...
Anas H's user avatar
  • 13
1 vote
1 answer
555 views

I need your help. I am trying to create an assets library and always get the following error: Add-SPOOrgAssetsLibrary : Attempted to perform an unauthorized operation. I am already registered as ...
Nicolas's user avatar
  • 11
0 votes
0 answers
251 views

I have a column named "Tracking Number" in my SharePoint library, and I want to run a flow only when the Tracking Number contains a semicolon. The issue is that I built a flow to replace ...
Harris's user avatar
  • 615
1 vote
1 answer
556 views

I had a request from some co-workers to build them a PowerShell to search sites for instances of text that is not accessible so they can replace it. Specifically NA or N/A. I have a PowerShell working ...
OMGDrAcula's user avatar
0 votes
0 answers
331 views

I have the following code and it has been working. Now our company merged and my computer is with the new company domain. New company don't have access to our SharePoint and it seems like it also want ...
maria's user avatar
  • 11
1 vote
1 answer
2k views

Is there a way from admin center to export all teams owners and members to a CSV file? I can't run the following code b/c I think it depends on graph api and it might be blocked. # PowerShell script ...
maria's user avatar
  • 11
0 votes
1 answer
337 views

My goal is to upload approximately 10,000 folders to a SharePoint library (call it T2) and create a list in SharePoint (say T1) that lists these folders along with other details and their ...
user1375452's user avatar
1 vote
2 answers
2k views

My problem is enabling custom script with DenyAddAndCustomizePages. A two-line script can describe my problem. Background: I was using Set-SPOSite to enable it like this: Set-SPOSite $SiteURL -...
IshRashad's user avatar
0 votes
1 answer
120 views

Our SharePoint sites have yearly structure like 2024->subfolders. When I use below PowerShell code to copy existing site template to new site then I am getting only root folders created. Each root ...
Max's user avatar
  • 1
1 vote
0 answers
25 views

In ShareGate, anyone knows how to map users to a file instead of writing out each user mapping in the PowerShell script? Found the answer. pls delete.
manny's user avatar
  • 11
0 votes
1 answer
60 views

I created 50 pages using the SharePoint online template called Blank. This has a header / title webpart at the top which we do not want. Does anyone know of a way to remove this webpart from all the ...
Scots_nerd's user avatar
0 votes
1 answer
371 views

As I cannot use Pnp.PowerShell with a SharePoint-2019 on premise, AFAIK, I've been trying workd with OData instead, using curl (or PowerShell Invoke-RestMethod or falling back to JavaScript fetch if ...
jgran's user avatar
  • 13
0 votes
0 answers
83 views

SharePoint Online admin here. In our organization there are several thousand users and even more SPO sites. We are trying to tackle challenges with site permissions that potentially expose us to risks ...
Mike K.'s user avatar
0 votes
1 answer
318 views

I have a requirement to hide or not show "Stock Images" and "Web Search" etc when selecting an image to a web part. Is it possible to do that using PowerShell or some command? I ...
naijacoder's user avatar
  • 4,368
1 vote
1 answer
109 views

I have an intranet and try to get the statistics of News Posts. I have now this PowerShell script below where I do a search query and get some metadata. Is there some attribute where I can recognize ...
KEM's user avatar
  • 15
0 votes
0 answers
246 views

I'm using Export-SPWeb to export list from one Sharepoint site collection and Import-SPWeb to import this list to another site collection. I need to do it regularly and that the list and all data in ...
Katia's user avatar
  • 3
1 vote
1 answer
881 views

I'm attempting to create an organizational assets library for use with company branded templates and copilot features. I have successfully run this code on my development tenant, but when attempting ...
Michael Colbs's user avatar
1 vote
1 answer
222 views

I have created a script to create number of views in SharePoint, but I am unable to work out the CAML to group by more than one field if it's possible. 1 field being: <GroupBy Collapse="TRUE&...
Bob 's user avatar
  • 13
0 votes
1 answer
216 views

After I successfully call $f=Get-PnpFile -Url $Url if I invoke Get-PnPProperty -ClientObject $f -Property Versions I get an error that the object ID is invalid. Any clue?
Stéphane BARIZIEN's user avatar
0 votes
1 answer
575 views

A. Context of Access I do not have acces to the central sharepoint admin center but I am the owner of a site collection and I am site collection administrator: I am able to connect to my site ...
Stefan's user avatar
  • 141
0 votes
1 answer
58 views

I am trying to build a site template which will contains few lists and data within the list. I am aware that I can create site script and add all lists and libraries, but that site scripts doesn't ...
Aakash Maurya's user avatar
0 votes
2 answers
222 views

We have several SharePoint Online List form Power Apps. We export and import them to different site collections in our tenant [DEV/TEST/ACCEPTANCE/PROD]. This requires to change the datasources.json ...
Danny's user avatar
  • 570
0 votes
0 answers
240 views

Over time, a lot of SPO site collections have accumulated in my tenant. Therefore, I want to use Site Collection Feature called Site Policy to automatically close and delete sites after a defined ...
VeleMilosavljevic's user avatar
0 votes
0 answers
244 views

I'm trying to add Quick Links to my SharePoint site using the PnP Module. However, when trying to run the command: Add-PnPPageWebPart -Page $page -DefaultWebPartType "QuickLinks" -Section 2 -...
Semper's user avatar
  • 1
0 votes
1 answer
261 views

Is Get-PnPAzureACSPrincipal cmdlet deprecated? I was able to use this cmdlet successfully 3 months before, but now ,running this cmdlet displays error that's this is not available. when I run Get-...
George's user avatar
  • 1,522
0 votes
1 answer
411 views

Is it possible to list all groups on the SPO website along with the users who belong to a given group and export the results to Excel? I would like to add that 2FA is enabled on the website. Unless ...
Maro's user avatar
  • 1

1
2 3 4 5
84