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,105 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
412 views

SharePoint C# PowerShell Script not executing correctly

So I have a script to migrate users and I want to use that script in my application to make things faster and more simple. But there is some kind of problem, that I can't crack with current code. ...
0
votes
1answer
1k views

Powershell CSOM to retrieve Permission levels tagged for the group

Can any one code me to retrieve the permission levels tagged for the group using Powershell CSOM.Please tell me the property her is my code sample Add-Type -Path "C:\\Microsoft.SharePoint.Client.dll"...
0
votes
0answers
42 views

Sharepoint 2013 Powershell Script

I am looking for some direction as for some ps script (or something else - we do not have a vs environment setup) I may use to populate the title field of any document from a document library. When ...
0
votes
0answers
251 views

Sharepoint 2013 - PS to Update Document Library Choice list default value

I have a library named 'FED'. The library has been in existence for a couple of years. There are some modification needed and this is where it changes: The 'FED' library has had a new choice field '...
0
votes
1answer
768 views

Sharepoint Online: Set Content Editor Web Part Content with Powershell

I want to update the content shown by the CEWP using Powershell. I've been using PnP-Powershell but can't find a way to update the content/xml.
0
votes
1answer
566 views

Most Efficient Way To Upload Multiple Documents to SharePoint programmatically

I need to upload multiple documents into SharePoint periodically. So, the senario is like this: - documents will be dropped in a shared folder in network. The number is not know. It could be thousands ...
0
votes
0answers
38 views

Determine web application not using windows authentication

I've been trying to determine if a web application is using windows authentication. I've been looking at the following but not sure if I'm checking the correct properties: $webApplication = Get-...
0
votes
2answers
102 views

Move multiple content types from one Site Collection to another based on Metadata

Background My company have multiple site collections that are all getting quite large and we will reach our overall storage limit within 6 months. Currently we have only a manual solution for moving ...
0
votes
1answer
66 views

Restore Web Application issue

I am using PowerShell to restore a SP Web Application on the same farm. I am following the below TechNet article. It says "When you restore a web application that is configured to use claims-based ...
0
votes
1answer
782 views

Copy document library - Document set to other Site

I need to copy document library to other site via powershell. My structure of this document library is like this: In a root si many folder, these folders can contains subfolder and these subfolder ...
0
votes
1answer
1k views

Adding Secondary Site Collection Administrator SharePoint 2016 PowerShell

I'm trying to add a user as a 'Secondary Site Collection Administrator' using the following PowerShell script : Get-SPSite -Limit All | %{Set-SPSite $_ -SecondaryOwnerAlias "i:0#.w|contoso\adminuser"}...
0
votes
1answer
465 views

Using Powershell command how to get absolute URL of subsite of group resides in that subsite

I am using powershell command remotely to communicate with SharePoint Server(2010/13 both). I am using following powershell command to fetch "SiteGroups" from site collections Get-SPSite http://...
0
votes
1answer
818 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
45 views

How can I match the content(word, PDF) when creating result type using PowerShell?

I am creating result types using PowerShell. While creating result type how can I match the content of result type?
0
votes
1answer
64 views

PowerShell To Copy List To New Content Database

Using SharePoint 2013. And I'm using the PowerShell code from here, https://letitknow.wordpress.com/2011/03/17/100/ to copy a list to a new list to a new list. It works great if I'm copying to the ...
0
votes
0answers
103 views

SP 2016: how to set up the summary view in listviewweb part using powershell?

I am trying to set the summary view in a list view web part inside a **Wiki page**, but it is driving me nuts. I have not been able to solve it. I have spent two day looking around and trying every ...
0
votes
1answer
63 views

How to get site collections 100 by 100 from sharepoint

I use Get-SPSite powershell command to get the site collections in our sharepoint environment. It has only -Limit 'some value' or -Limit All parameters. If I have 1000 site collections, can I get 100 ...
0
votes
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
0
votes
1answer
1k views

How can I transfer an office 365 domain to a different tenant keeping the users' OneDrive files?

I registered user@mydomain.com with office 365 and registered the custom domain mydomain.com. After doing this, I noticed that several users with the same domain had previously registered, thus ...
0
votes
1answer
519 views

How to change the blog posts webpart properties using powershell?

How to change the JSLink property of the Blog posts Web part in Default.aspx page of a blog site using powershell ? I tried the code below $SPsite = Get-SPWeb -Identity "http://blogpostsiteurl" $...
0
votes
0answers
604 views

SharePoint Online - Idendifying items with unique permissions with PowerShell

All, The OOB SharePoint Online OOB permissions tools allow us to identify which items have unique permissions OR which groups and users have unique permissiosn but not both. Is there a way via ...
0
votes
1answer
206 views

Get list of all features in a specific scope (Active or Deactive)

I want to get a list of all features in a specific scope using PowerShell. I want to get all activate and inactive features by providing the scope. How can I achieve that?
0
votes
1answer
392 views

Not able to delete DocumentSets using Powershell

I am trying to delete all content from site (list/folder/documentset). However, I am getting error while deleting couple of document sets. #docsetFolder is an object of Document set which is correct. ...
0
votes
1answer
827 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
248 views

how to import data from notepad file to SharePoint list/library using powershell script

We need to import the data from notepad file to sharepoint list/library using powershell script. Actually we want to fetch data whatever present on notepad file need to come on Sharepoint list/...
0
votes
1answer
164 views

Get-spsite giving error

I am getting following error for Get-SPSite with no site collection name. Any ideas on what would cause this error to showup. Get-SPSite : The content type text/html; charset=utf-8 of the response ...
0
votes
1answer
72 views

CSOM Powershell Remove List from List Collection

On Sharepoint Online, using a Powershell/CSOM console app, in a Site Collection with 34 DocLibs, I need to extract a listing of DocLib Items and their attributes. I want to allow the user to specify ...
0
votes
0answers
174 views

Importing web to another site collection

I have 2 Site collections. One site collection is for active sub-sites and the other one is for sub-sites that can be archived. I have created a powershell scheduled task to export sub-sites from ...
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
28 views

Event receivers not getting lists

I am trying list/ or delete an event receiver from my document library. When try to get the event receiver definitions it shows me only DocumentSet event receivers. the custom event receivers(Item ...
0
votes
1answer
105 views

How to fix this issue while trying to attach event receiver via powershell?

I tying to attach event receiver via powershell but facing this issue: $list = (get-spweb http://site/it).lists['IT Support Request'] $def = $list.EventReceivers.Add() $def.Assembly = "$SharePoint....
0
votes
0answers
207 views

occasional error when updating documents in library

I have a PowerShell script that updates documents in a library. The script takes input values, then updates specific documents based on the values. If I run a single instance of the script, it works ...
0
votes
1answer
502 views

Convert SP2013 Windows Claims to ADFS Claims

I used the below Microsoft PowerShell script to convert from SP2013 Windows Claims to ADFS Claims: Reference - https://technet.microsoft.com/en-IN/library/dn744263.aspx $wa = Get-SPWebApplication -...
0
votes
0answers
106 views

An error occured while enumerating through a collection : Exception has been thrown by the target of an invocation

I was stuck with a SharePoint 2010 site column that I couldn't remove from the site collection because it was supposedly used in other subsites or content type. Usual error. After checking that the ...
0
votes
1answer
71 views

Differences between deploying webpart through Visual Studio and Powershell

I have tried to google the basic concept of deploying webpart, I am confused. I have read that if we deploy through Visual Studio we are deploying it globally. I'm probably wrong on this info. But ...
0
votes
1answer
424 views

Trouble with Import-SPWeb

Here my issue: I have 2 SP farms, therefore two web apps/site collections/ etc. On one, I run: Import-SPWeb -Identity "http://policies/locations/0015/" -Path "C:\filepath.cmp" -Force which works ...
0
votes
1answer
1k views

How to rename Title site columns in custom content type using powershell

My requirement is when browser is in English, Title column in Content Type (content type is attached with list) is rename as "Last Name" and when in German, it should be "Nachname". My below code ran ...
0
votes
1answer
808 views

Moving Document Sets across sites using Powershell Sharepoint Online

I had recently posted here regarding my task to move Document Libraries across sites. Since then I started learning Powershell and I am getting the grip, albeit in a slow manner. I have managed to ...
0
votes
0answers
357 views

Faster way to get LoginName based on email Address using Power shell CSOM

below is the code updating a list using data from CSV file. In this we need to update the Created by column. Below code works but is there a better way to get userLogin based on email address. #...
0
votes
1answer
27 views

Powershell bulk removal of Server tag in aspx page

I have an issue with sites migrated from 2007. The issue is described here. The fix is to remove this tag from over 100 default.aspx pages <asp:Content ContentPlaceHolderId="...
0
votes
2answers
160 views

Error Updating Metadata on xlsx Documents using PowerShell

I'm able to update metadata associated with PDF's and other file types, but I'm not able to update metadata associated with xlsx documents. On the xlsx docs, the error is thrown when the $item.Update(...
0
votes
1answer
358 views

acces denied when trying to get web.siteusers

I write a powershell script and when i try to get siteusers from certain SPWeb not all i have an access denied. My spweb object is correctly retrieve because i can display $web.Url $webapps = Get-...
0
votes
2answers
633 views

SharePoint Powershell Snapin Installation Error

I've been trying for days to get the SharePoint Powershell snap-in installed on my Win 7 machine, currently using Powershell 3.0 and SharePoint Online Management Shell. I've googled and googled and ...
0
votes
1answer
730 views

How to restrict access for specific sub-site group user's to root site in SharePoint 2010?

In SharePoint 2010 I have root site for e.g. http://moss-root// under this we have lots of sub-sites like http://moss-root/subsite1 http://moss-root/subsite2 --- I need to restrict this subsite ...
0
votes
0answers
479 views

get all changed in sitecollection using powershell

I need to get all changes on my sitecollection , sites,webs,lists and folders and to export them into cmp files. so i used this code to get the changes : Add-PSSnapin "Microsoft.SharePoint.PowerShell"...
0
votes
1answer
895 views

How to rename files of a SharePoint library while downloading to local drive

I have sharepoint library as below: SP Library: "Test" Folder1 File1 Folder2 File1 Folder3 File2 I need as below in my local folder: Local folder: "c:\" Folder1 ...
0
votes
1answer
667 views

How to copy all files from folders and subfolders into one folder using PowerShell script?

I have to copy all files to single location and add prefix to all files while copying to new root folder. For example, say that I have the following folder hierarchy: Folder1 File1 ...
0
votes
1answer
298 views

Install solution automatically after adding solution using powershell

I am using powershell to update and deploy solutions UpdateSolution.ps1 Add-SPSolution -Identity SomeWP.wsp -LiteralPath $PSScriptRoot\SomeWP.wsp -GACDeployment Add-SPSolution -Identity SomeWP.wsp -...
0
votes
2answers
68 views

How to delete timer jobs on a site collection?

I am deleting features with powershell script but timer jobs of those features did not get deleted. It will also be fine if I can delete timer jobs run on a site collection. Please advise.
0
votes
1answer
148 views

Update all master pages and default.aspx files of all site collection

I have a task to update all master and default.aspx pages of all our sites (about 30 sites). The task is to add a block of code including site name and links to scripts and styles. I am not sure ...

1
16 17
18
19 20
23