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
3
votes
1answer
2k views

Using Powershell to update an Office 365 List with lookup column

I am wondering if anyone has seen an issue when updating an Office 365 list that contains a lookup column? I have 2 Lists in my SharePoint Online site, the first List is my lookup list that maps ...
0
votes
1answer
29 views

How to verify retention labels at site level?

In our SharePoint Online, we have n number of sites where retention labels are being assigned for the contents. Though, we are not sure if we have labeled everything and would like to verify what has ...
1
vote
1answer
34 views

Receiving the error “The provided site url can't be set as a Home site” when setting a home site in SharePoint Online

In SharePoint Online, I am using SharePoint online management shell to set a home site. My code is this https://docs.microsoft.com/en-us/SharePoint/home-site $orgName="myorg" Connect-...
1
vote
1answer
20 views

PowerShell PnP Unable to get file versions in big files

I'm using OneDrive (office 365 account) as a cloud backup, and I got a problem with the versioning system as for big files (outlook .ost and .pst mainly) it keeps generating new versions for the file ...
3
votes
2answers
43 views

disable “sharewith” from the Ribbon and share option in sharepoint 2019

I need to disable Shared With option from the ribbon and the sharing of an item for all users: I used these two PowerShell commands but that doesn't work: Disable-SPFeature -Identity "...
1
vote
1answer
2k views

How to get the layout zone and zone index of a webpart in sharepoint 2013 using powershell

I have a sharepoint site that got migrated from SP 2010 to SP 2013. The webparts in the pages uses layouts like center left, center right, center etc. With SP 2013, they have changed the layout ...
1
vote
1answer
1k views

Unable to reference a column by its Internal name. Column does not exist. It may have been deleted by another user

Today I created a new site column named "Business Category" inside my issue tracking list on SharePoint 2013 server. The column type is a dropdown list. Now the internal name for the column is "...
0
votes
1answer
732 views

Retreive Document Library's Folders and Sub-folders Permissions Information - PowerShell

I have a document library with many folders, sub-folders and files inside. Many of the folders/sub-folders/files have unique permission set to them. I need to find a way, using PowerShell script ...
0
votes
1answer
1k views

How to copy Content Type from one site collection to another (Both site collection having different template) SharePoint Online

We are looking for copy a content type from one site collection to another. Both site collection having different site template. How to copy content Type from one site collection to another in ...
3
votes
1answer
1k views

What is SharePoint (on-prem) authentication realm?

Could anyone clearly explain what is Sharepoint authentication realm (the one set by Set-SPAuthenticationRealm cmdlet)? In what cases do I need to set this realm equal for 2 (or more) farms, and in ...
0
votes
1answer
18 views

Get-PnPList cmdlet not returning anything

I'm trying to retrieve information from two columns on a sharepoint list in order to use them in powershell. Here's my code so far: $SiteURL = "https://xxxx.sharepoint.com/sites/xxxxx/" ...
2
votes
2answers
2k views

Setting SharePoint Group as SPGroup Owner using PowerShell

How can i set existing SharePoint Group as Group Owner (instead of SPUser, set SPGroup as owner) using PowerShell at the time of creation of new Group?
1
vote
1answer
1k views

Sharepoint Online - Recover column from lists of project sites

I have a site collection with a lot of subsites attached to projects (each subsite is a site created by a project). Those subsites has a list with its fields. I executed a PowerShell script that ...
1
vote
2answers
2k views

Manipulating Content Types with PowerShell

I have looked up a couple of resources on changing Content Types via Powershell without much luck. It seems no matter what I run, it's not changing the content type in a way I would expect. I got a ...
1
vote
3answers
2k views

how to create term inside existing termset

how could i create terms inside existing group/termset $TaxonomySession = Get-SPTaxonomySession -site $TaxonomySite $termStore=$TaxonomySession.TermStores["Managed MetaDataService"] $group=$termStore....
0
votes
2answers
26 views

How to execute a PowerShell script at a specified time

I'm using SharePointOnline's Modern UI. I want to execute a PowerShell script for updating SharePoint permissions at a specified time. Is there a way to achieve this using PowerAutomate or some other ...
0
votes
1answer
1k views

Sharepoint Import command - Import List in same site collection

I have a sitecollection with list name "XYZ" and 5million records , I exported the list using the PS command . How to import the backed up sharepoint list"XYZ" under the same site collection : Command ...
1
vote
1answer
2k views

Powershell SharePoint 2010 capture Permissions of folders in library with Broken Inheritance

I am looking for some code to find all users or Ad Group who have some sort of permission in specific folder (with broken Permission) in a specific library of a team-site. With the following code I ...
0
votes
2answers
24 views

PowerShell Script to replace values in list not working

I have a script that is supposed to go into a list and find a replace values with a different value in a column. The error I get is 'You cannot call a method on null-valued expression' pointing to ...
1
vote
2answers
5k views

How can I run REST from batch or powershell?

I want to create an item (Title,ID, description) in Mylist by using REST/batch/powershell/SQL store procedure Any reference or information will be appreciated.
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) ...
2
votes
3answers
3k views

SharePoint PnP Powershell - How to provision sub webs with unique permissions and default groups?

I've used the PnP Site provisioning method to create a sub web with unique permissions. However, when applying an XML site template with the default visitors, members, and owners security group ...
1
vote
2answers
952 views

Update people field with a Get-SPOUser on sharepoint Online

I try to update a SharePoint Online people field (in a doc list), from PowerShell. Here's the code: $properties = $Upload.ListItemAllFields; $context.Load($properties) $properties["CLT"] = $File....
1
vote
1answer
1k views

Restoring backup to new environment. Error: Web application not found

I am trying to restore a backup of a site collection from my production enviroment to my dev enviroment using the following powershell script: Restore-SPSite http://abd.spdev.<domain> -Path d:\...
3
votes
1answer
2k views

Remove Workflow Manager scopes?

Is there any way to remove additional scope that get's created when you create a connection to multiple SharePoint Farms from a Workflow Manager service server? Register-SPWorkflowService -SPSite ...
1
vote
2answers
129 views

Delete Comment Box in right side of SP items

How do I remove the COMMENT box showing in the right side of SharePoint list items? It just shows up recently with no reason. Thanks much
0
votes
0answers
17 views

Push a large file to 5k users via one drive

I have a scenario where I want to copy a large file( say 5 GB )to around 5k users one drive. The users have synced their ODB to their desktop. Expectation is to place the file in ODB in such a way ...
0
votes
0answers
23 views

Cannot apply an XML template to a SharePoint site

I am currently trying to use the PowerShell command Apply-PnPProvisioningTemplate to apply an XML template to a SharePoint site: Apply-PnPProvisioningTemplate -Path "<path to the XML file>&...
0
votes
1answer
22 views

Get LastModifiedDate, Owner, Hits, Distinct Users, Site Size, Total Item Count of all Site collections in a Farm using Powershell

I am trying to get a report of all the site collections in a SP 2013 Farm I am using the below command Get-SPSite -Limit 10 | select url,LastContentModifiedDate,Owner, @{label="Size in MB";...
0
votes
2answers
726 views

Powershell PS1 clone SP permissions Exception

I have found this nice PS1 that clone permissions from a SPUser To Other. When give inputs Many things goes wrong but I have non idea what. Has Anybody any idea about this issue? PS C:\Users\...
7
votes
1answer
2k views

Disable site collection health check rule

Is there anyway of disabling/bypassing a site collection health check rule. For example, I want to bypass Missing Site Templates rule when I upgrade a site collection in SP 2010 mode to SP 2013. For ...
0
votes
1answer
22 views

Caml Query | How to copy today's list items from one SharePoint online list to another in batches?

I am trying to write a Caml Query to get only today's list items and then later copy it into the new list. I am using the batch method to copy data from source list to destination. source list gets ...
0
votes
1answer
2k views

How to get All Users in User Profile Services Sharepoint 2013 Using CSOM

I need some function like bellow on CSOM. could you help me ? if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint....
0
votes
1answer
25 views

For loop Caml Query | How to use Caml Query for loop to increment the date range by month and also year once the loop reaches January?

I am using Powershell scripting to get data from a sharepoint list which exceeds the threshold of 5000 items. I want to create a for loop which increments by month and year. The Code in the for loop ...
0
votes
2answers
1k 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
37 views

How to use Get-PnPUnifiedAuditLog command

I'm using Modern UI for SharePoint Online. I'd like to export audit log using PnP PowerShell. But When I use "Get-PnPUnifiedAuditLog", the following error is occurred: PS C:\Users\hyonta >...
0
votes
1answer
780 views

Export Managed Metadata from List to CSV

I'm trying to export an SPO list into CSV, which is working fine for Single line of text fields, however, when trying to export a managed metadata field, I'm getting the following appear in the CSV ...
0
votes
1answer
764 views

Powershell Script to Remove Sharing Links After 90 Days

I'd like to know if it's possible to create a script to check a library for all guest access links (authenticated, not anonymous) and if they are older than 90 days, remove them. So for each folder ...
1
vote
2answers
48 views

Creating Dropdown Menu in SharePoint Online - using PowerShell

I need some assistance with my PowerShell script. Currently I am able to add a drop down menu to my page, but I am trying to add some subfolders to "Support Center". Also if I wanted to add ...
2
votes
1answer
26 views

Powershell Script Sharepoint Online | how to change a value in a list item (column)?

I have a list with a list item/column 'Category'. Let's say Category has values 'A','B', and 'C'. I want to find all the values which are 'A' and replace it with 'B'. How should I do it? I tried the ...
1
vote
2answers
3k views

Powershell Script to Add Multiple Users in SharePoint Owners group

Would some one help me with Powershell script Add Multiple Users in SharePoint Owners group
2
votes
1answer
2k views

GET-SPProduct -Local throwing error

Get_SPProduct cmdlets behaving weird: On running GET-SPProduct -Local to one of server in farm throws error Get-SPProduct : Object reference not set to an instance of an object. At line:1 char:...
1
vote
2answers
725 views

Powershell Script to approve all the pages,masterpages,layouts in a site collection

Need some automated way for publishing the content throughout the site within the one action using some commands, powershell or some custom code or any utility available for SharePoint 2013. Any ...
0
votes
1answer
732 views

System.SecurityString

I have a function requiring a secure password as a parameter: function Create-List { param ( [Parameter(Mandatory=$true)] [string]$Username, [Parameter(Mandatory=$True)] [Security....
0
votes
1answer
2k views

PowerShell, Adding List Items, How do i declare a date/time?, and other issues

I got some solid help on here before with working with PowerShell and SharePoint. While I would consider myself an experienced SysAdmin and a Knowledgeable SharePoint Admin (front-end, Workflow Design,...
1
vote
2answers
105 views

Is there a Javascript report for all Lists and Libraries in a site for SP 2013?

I know PowerShell will do this, but I don't have access. So just using javascript, is there a script that can do item count, date modified, library or list, URL, and times viewed for all lists and ...
0
votes
1answer
25 views

powershell script for check-in documents inside folders and sub folders on SharePoint Document library

We have 50,000+ has been checked out by users. We need to check-in back. Document library contain sub folders inside. Can anyone please powershell script for us. Example: Document library name "...
27
votes
7answers
69k views

Powershell: cannot access the local farm

Yes, I am logged into the machine as an administrator, and my domain account id a farm admin as well. The site is running properly, and nothing seems wrong in SP Central Administration. But when I ...
0
votes
2answers
2k views

Sharepoint Online CAML query very large list checked out files, csom powershell or c#

I have poured over a ton of posts and code and none seem to work with checked out files and really large lists. I am newish to sharepoint, especially online. I moved a doc repo up there for testing ...
4
votes
1answer
3k views

Change Sharepoint Online subsite URL

I have a subsite in Sharepoint Online with a web address of https://mydomain/sites/sitecollectionName/subsite Is it possible to change the url to https://mydomain/sites/subsite If I understand ...

1
2 3 4 5
78