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,092 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
6k views

Find out where the content type is still in use

I have deleted the content types from the libraries/lists using powershell, but now when I go to delete them at the site level it tells me the content type(s) is still in use. I have checked the ...
2
votes
0answers
175 views

How to change and learn guid of search result source with powershellscript?

I created search result source manually. I want to change and learn guid of search result source with PowerShell script. How I can do?
2
votes
0answers
62 views

How to move search result source with powershell?

I have two development environments. I created search result source. I want to move result source from first environment to second environment. How can I do with PowerShell script ?
2
votes
0answers
169 views

Can't delete a taxonomy field

I'm trying to remove a field from a powershell script. The field is a taxonomy field. However, it does not works, with this error: Site columns which are included in content types cannot be ...
2
votes
1answer
369 views

OneDrive for Business Permissions

I have a few users that have non-standard permissions for OneDrive for Business . I've found a PowerShell Script that will list all OneDrives but not the permissions. Is there a way given a site, to ...
2
votes
0answers
461 views

Problem when running PowerShell

I've a PowerShell script file to create results source. It works well on staging, but has some problems on UAT. First of all is the trouble with Get-SPSite. I've managed to resolve it. However, when I ...
2
votes
0answers
373 views

Deploy a file to the “Forms” folder of a Document Library using Powershell

I am dynamically building up a file that I then want to upload to SharePoint 2013 using PowerShell. I want to upload this file into the "Forms" folder of a Document Library - So not into the Document ...
2
votes
2answers
542 views

SharePoint Foundation: Copy site

Is there the option to save site as template in SP 2013 foundation? The option for me is unavailable even though I am a site collection admin. Currently the subsite needs to be copied over to ...
2
votes
2answers
1k views

Setting the default value for a taxonomy field

I have been creating a load of site columns with powershell from a .csv file. I am now trying to create new taxonomy or metadata field: $spField = $web.Fields.CreateNewField($...
2
votes
0answers
716 views

Usage and Health Data Collection using SQL Authentication

I'm having an issue with trying to set my Usage and Health Data Collection to use SQL Authentication. I have tried setting my database credentials to SQL Authentication using both Powershell and ...
2
votes
0answers
4k views

Is the only supported way to convert users to claims using a web application?

According to Microsoft documentation, Migrate from classic-mode to claims-based authentication in SharePoint 2013, the way to upgrade a classic-authenticated users would be to attach a database to a ...
2
votes
0answers
287 views

ExportWeb from sites.asmx still pending (1)

I'm doing an ExportWeb method through powershell from sites.asmx in SharePoint 2013, and the exportweb job is still pending, even after days. $uri = "http://sharepoint/_vti_bin/sites.asmx" $service = ...
2
votes
1answer
134 views

Need to recursively parse SharePoint 2010 sites for JavaScript tags and output URL path to a file

I have a site with approx. 300+ sites. The vast majority use JS and reference a jquery file that are either in the parent folder as the aspx file or site, or referencing a master jquery file in a ...
2
votes
0answers
340 views

Powershell the local farm is not accessible - SPECIAL NUANCE

Wonder if you could shed some light on a variant of this situation I'm experiencing. Typical Error when running Sharepoint Management Shell "the local farm is not accessible. CmdLets...." Here's the ...
2
votes
0answers
2k views

How to delete a Task that is associated to an item and workflow that have been deleted

I have a task that is associated with an item (in another list) that has a running workflow. However, the item was deleted over a year ago and therefore it is no longer recoverable from the recycle ...
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:...
2
votes
0answers
557 views

PowerShell script to update ContentType of existing records in Document Library

we are using Document Library in SharePoint 2010 environment. there are about 200 document present in the document library which have been identified (based on location - England and employee type - ...
2
votes
0answers
567 views

Copying Modified Date in Window Explorer from Powershell

I have the PowerShell script which download Documents from SharePoint Document Library.i want to copy the modified date of documents including folders to the window explorer. Where I am going wrong ...
2
votes
0answers
190 views

Download Root level folders starting with A to J

I have the following script to download documents from document library. Is there any way I can download folders starting with A to J from root level which should include all of their sub folders from ...
2
votes
0answers
269 views

Powershell list.workflowassociation not working right

I encountered recently a weird problem. I'm using a powershell script to : - save all workflows autostart properties (from all lists/webs/sites) - make modifications to items in the lists - restore ...
2
votes
0answers
99 views

Managed Metadata import/export in subsites

I am attempting to export/import the managed data in a library of a subsite on my intranet. When I attempt to use the taxonomy tools that are up on Codeplex, or when I use code such as this, I am ...
2
votes
0answers
60 views

How to speed up saving a list as template

I want to save a library as a template. For this I use the following PowerShell code $id = [Guid]::NewGuid() $templateName = [String]::Format("{0}-{1}",$list.Title,$id.ToString()); $...
2
votes
0answers
195 views

Not able to connect to service with windows account in mix mode authentication

I am trying to connect web service in mix mode/claim based environment with powershell, Below is the sample code for your reference, $WebSrverUrl = "sharepoint:2013/_vti_bin/authentication.asmx" ...
2
votes
1answer
239 views

Is it possible to read the contents of deleted folders in the RecyclingBin?

I've been playing around with scripts that read deleted files from the recycling bin such as the one below but I can't figure out how to read the files within a deleted folder without restoring it ...
2
votes
0answers
370 views

Remove Content Type Hub URL

I used a Powershell script to add the URL for the Content Type hub, as in the picture below. Now I wish to remove this URL. Not replace it, but remove it altogether using PowerShell. Is this ...
2
votes
0answers
255 views

How to assign the metadata for folders and sub folders

I am migrating the SharedFolders and files from Windows to SharePoint Library. So here i am able to add metadata for only files, but not for folders. Here the below is the code i tried for adding ...
2
votes
0answers
771 views

Configure welcome pages on sites and subsites with powershell

I have to configure the welcome page for all my sites, and sub-sites. Is it possible to add content in the welcome page ? I mean : a little text, a calendar, and sections on the page's right side (...
2
votes
1answer
748 views

Error while running the Powershell script

I want to run the following script but getting the error "Unable to find type [Microsoft.Office.Server.UserProfiles.PropertyConstants]" #Add SharePoint PowerShell SnapIn if not already added if ((Get-...
2
votes
0answers
369 views

Edit UserProfileProperties in Sharepoint 2010 using PowerShell

As I mentioned above I want to modify given UserProfileProperties. This is what I have found during the last two hours. I also found several other things, but it won´t work. I modified all paths, so ...
2
votes
1answer
715 views

How do I add a lot of contenttype aliases to a new Content Organizer Rule using Powershell?

NOTE! This post is about adding MANY, BUT NOT ALL content types to your rule. If you simply need to create a rule for ALL content types, go straight to the bottom of this post. I'm creating a ...
2
votes
0answers
985 views

Getting Null returned from taxonomy field in PowerShell?

I am trying to update a metadata field when adding an item to document library. All the other columns are updating. The error is on this line and basically $taxfield is returning null. $taxField = [...
2
votes
1answer
2k views

Get site collection administrator for one drive

I have this weird thing going on with my tenant. I have successfully executed this PowerShell command on other tenants to retrieve Site collection administrators for user one drive for business. ...
1
vote
1answer
39 views

How to use Site Design to remove default items from new sites?

very new to SharePoint and I've been asked to set up new site design templates for SharePoint online. While I've managed well enough to create and add new site designs, I'm struggling with the ...
1
vote
1answer
35 views

Missing Lookup fields in Sharepoint Online Pnp

Basically, I have three lists: Users, Agencies, and Office. The Users list has a Agency lookup field to the Agencies list and an Office lookup field to the Office list. The lists in SharePoint ...
1
vote
0answers
29 views

Getting error “cannot access local farm” when connecting via winrm client from a non-windows machine

I'm trying to connect to a Sharepoint Server 2016 and run Sharepoint cmdlets but I am getting an error saying: "Cannot access the local farm. Verify that the local farm is properly configured, ...
1
vote
1answer
42 views

How to read Assigned To column from SharePoint Workflow Tasks List using Powershell?

I am trying to fetch List details along with associated task columns to export into Excel using PowerShell. I am able to get all columns using following script except Assigned To column to show with ...
1
vote
0answers
32 views

Is there an API or web service for Copy-SPSite?

What API endpoint is called for the command Copy-SPSite? Also, is there a WSDL web service for this command, like there is the ExportWeb service in Sites.asmx relating to the command Export-SPWeb?
1
vote
0answers
36 views

How do I move the Hub Navigation bar to the page header?

I have made a team-site template as the main site of our organisation's intranet frontpage, as well as the sites for each department, and I would like to replicate the communication site navigation ...
1
vote
0answers
12 views

What is the recommended/best process in moving SharePoint 2013 from one domain to another in Azure?

There one unique scenario we are facing, where we have SharePoint 2013 on Azure along with SQL too. We have 2 WFE, 2APP and 2 SQl in Azure of domain called xyz.com. Scenario 1:We need to migrate/move ...
1
vote
0answers
64 views

Is there a way to save a site in SharePoint online as a template programmatically (with an API, PowerShell, C#, etc.)?

I have a SharePoint Online site that has custom scripts enabled, and I want to programmatically save it as a template. I do not want to use PnP Provisioning Templates, I want to access the same ...
1
vote
0answers
44 views

SPO list migration from one tenant to another with Graph API and Powershell

I am currently working on a project that has me doing migrations from one SPO tenant to another. I do not currently have access to most popular tools like ShareGate, Metalogicx etc. I mainly have to ...
1
vote
1answer
134 views

Get-SPOSite how to get all sites on my tenant with a Sensitivity label = Highly Confidential?

Get-SPOSite how to get all sites on my tenant with a Sensitivity label = Highly Confidential? The Powershell command Get-SPOSite gets all sites on my Office 365 tenant. How could I filter all site ...
1
vote
0answers
51 views

List/Report of all active Shared Links in the SharePoint Online tenant using PowerShell?

Is there a way to generate a List/Report of all active Shared Links in the SharePoint Online tenant using Powershell? I know that we can find that in "Security and Compliance" admin center audit logs....
1
vote
2answers
75 views

What is client context and role assignments?

This script is used to remove all sharing link on files. My question is: I don't understand what Get-PnPContext is or what RoleAssignment is? I don't understand those commands, can someone explain ...
1
vote
1answer
31 views

How to add multiple groups value in people or group field using powershell script in server side in SP2016

How to add multiple groups value in people or group field using powershell script in server side in SP2016. I am trying to add multiple group names in People or Group filed in list using Powershell ...
1
vote
2answers
67 views

Cannot write configuration file while New-SPWebApplication

When I use New-SPWebApplication I am getting error below error in SharePoint 2019 I am using SharePoint Farm Admin account. What can be the reason for it. Some time It will finsih without error
1
vote
1answer
205 views

remove an access from a specific person to a specific file or folder of Sharepoint et Onedrive using PowerShell

I am actually working on a script that should remove access from a specific person to a specific file or folder. We can share files to person from outside our organisation using Onedrive and ...
1
vote
2answers
39 views

Sharepoint : how to create a navigation link in sharepoint home site automatically when a new site is created using ms teams

As soon as we create a site using teams there should be a navigation link generated in the sharepoint homepage?
1
vote
0answers
24 views

WSP package deployed through Powershell commands not reflecting the changes

There are few custom items like lists,content Types and pages which gets deployed through couple of features. When I directly deploy from visual studio, the custom items are deleted and recreated ...
1
vote
1answer
51 views

What does CommentsOnFilesDisabled tenant property do?

There is a tenant property CommentsOnFilesDisabled that has no documentation describing what it does exactly. Does anyone know any additional information? After changing this property at a tenant, I ...

1 2
3
4 5
22