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
9
votes
4answers
18k views

What is the best practice to duplicate a site collection?

I have a site collection, that contains sub-sites and other list that have different level permissions. If I use the "Save as template" I don't obtain a satisfied result, because template loses the ...
9
votes
2answers
14k views

Enable versioning on all lists and libraries

Is it possible to enable versioning on all lists and libraries across all web sites of a site collection? Thanks.
9
votes
1answer
7k views

How to create root site collection with custom web template using PowerShell

I have found a PowerShell script to create a site collection with the template "STS#0", but i want to create a root site collection with a custom template, what will be the possible PowerShell command?...
8
votes
3answers
5k views

How to get Configuration SharePoint Database Server using Power-Shell?

I have X number of database servers on the farm , I need to know Which database server have the SharePoint Configuration Database using Power-Shell ? I know I can get Which server via Central ...
8
votes
2answers
19k views

How to return all user profiles

I need to query the entire user profile store and do multiple operations such as filtering based on one user profile property, sorting by another, and grouping on yet another. Is this possible using ...
8
votes
2answers
3k views

Recovering a file from the recycle bin

I'm working on a general function to recover an item programatically from a recycle bin via Powershell and CSOM. This is what I have so far, it doesn't throw an error, but it doesn't recover the file ...
8
votes
4answers
6k views

How can I schedule the User Profile Service to run a full sync weekly?

We are running SharePoint Server 2010 and have not yet applied SP1. User profile incremental sync is not picking up all of the group membership from AD. Starting a full sync seems to rectify the ...
8
votes
2answers
8k views

I dont have permissions to use SharePoint PowerShell, what to do?

I am a developer and would like to deploy a wsp to a server (win2k8r2) from my customer. I log in with some user created special for me. When I start SharePoint PowerShell I got this error: The local ...
8
votes
2answers
2k views

Script to automatically import documents from a network share on a regular schedule

I am new to SharePoint development. I am trying automate the task of: Uploading documents from a network share to a SharePoint document library. The related metadata for each of the files also need ...
8
votes
3answers
10k views

Problem with SP2013 solution scope: WebApplication vs GAC

I have a SP2013 solution that contains a custom WCF service, custom Timer Job and a Feature Event Reciever. Because of these the solution Assembly Deploying Target is set to GlobalAssemblyCache. The ...
8
votes
2answers
3k views

Upload Master Page / Page Layouts using PowerShell

I want to know how to provision a page layout using PowerShell (CSOM) for Sharepoint Online? Any information,examples etc are welcome. I know this can be done using SharePoint hosted App as well. I ...
8
votes
1answer
1k views

Powershell CSOM - How to add a Office 365 Group to a list

I've found a script to create document libraries and a script to assign permissions to a list. I've combined these with one script and added a CSV containing names and Office 365 Groups that should be ...
8
votes
2answers
2k views

Is it possible to create custom User Profile Properties using CSOM or SPO PowerShell?

I have not been able to find much information regarding creating custom User Profile Properties via CSOM or SharePoint Online PowerShell. Is this possible, and if so, how do I go about doing it?
7
votes
4answers
8k views

SPO Retrieve HasUniqueRoleAssignements property using Powershell

I am trying to retrieve HasUniqueRoleAssignements property for multiple SharePoint Online lists using Powershell. I can do it for each one in SharePoint on-premises: $ctx.Load($list....
7
votes
2answers
70k views

Powershell to list all sites and subsites in SharePoint Online

I know about "Get-SPWebApplication" but it's not available in Online. How can I get a list of all sites and subsites in SPO?
7
votes
3answers
29k views

Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application

I have a powershell script that deploys about 12 web parts. They have all been created in the manner through visual studio 2010 and are being deployed to sharepoint 2010. I am getting the following ...
7
votes
1answer
18k views

How to correctly dispose spweb and spsite on powershell foreach!

Title of the question is pretty simple, I have 18000 site collections and this script is showing 1GB of ram used, so I wonder how can I dispose correctly the spweb and spsite object $webapplication = ...
7
votes
5answers
4k views

Batch update via PNP Powershell

I have data from a CSV that will be imported and added to column values for each of these items. I can loop over CSV, get the items, and set the values (Set-PNPListItem) - but the sequential ...
7
votes
1answer
25k views

Find a farm's database server and instance in PowerShell

How can I find the SQL server name AND instance where my databases are stored using PowerShell? Assuming I am not using an alias and can't check cliconfg. In servers in farm, I can see the server ...
7
votes
1answer
152 views

Are there any risks of doing an Export/Import for a document library between 2 farms, where these 2 farms have different farm build numbers

I have two farms which are sharepoint on-premises 2013, that have the same license type which is "SharePoint Server with Enterprise Client Access License" license. but the farms' build numbers are ...
7
votes
1answer
13k views

How to retrieve workflows in powershell?

I'm trying to write a script to check the status of workflows in a list. I have tried a couple different ways but I never get anything to return. foreach($item in $list.Items){ $item.Workflows ...
7
votes
3answers
13k views

powershell script to add a managed metadata column

I'm looking for a powershell script that allows me add metadata column in SharePoint list. Thanks
7
votes
4answers
27k views

How to fix credential issue?

I tried both default credential and user/pass but keep getting 401 unauthorized error. What's the fix? Here is the error I am getting .... New-WebServiceProxy : The request failed with HTTP status ...
7
votes
5answers
15k views

SharePoint 2010 - Backup Term Store as CSV

Is there any PowerShell Script to export the Term Store? I have not found any OOTB solution, only import as csv, but no export as csv. Is there a script which can export the Term Store as csv? (So ...
7
votes
2answers
14k views

Powershell and checking for Site existence

I am an nube to Powershell, so I think I have a pretty basic question here.... How do I determine if a SPWeb exists? I want to perform some operations on a site based on a URL passed in as a ...
7
votes
2answers
328 views

Error while running Powershell Script in o365

Hi Below is the error i am getting while running the powershell script Error Cannot find an overload for "PeopleManager" and the argument count: "1 Script: #Importing PowerShell Module Import-...
7
votes
2answers
5k views

Uploading a large file to Office 365 via CSOM PowerShell

I have the following code : $FileStream = New-Object IO.FileStream($File.FullName,[System.IO.FileMode]::Open) $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation $...
7
votes
1answer
3k views

Script to find all items that do not inherit permissions

I would like a SP 2010 Powershell script which searches all folders in a library and finds the ones that do not inherit permissions from their parent. Does anyone have one handy? I'm new to the ...
7
votes
2answers
4k views

PowerShell SharePoint online ISE IntelliSense

I want to write PowerShell for SharePoint online using ISE, but I can't seem to be able to make it use the intellisense for the object. When I run the Import-Module Microsoft.Online.SharePoint....
7
votes
4answers
4k views

Deploying and Installing Sharepoint apps into App catalog using CSOM

Can anyone suggest me on how to use SP.AppCatalog() in JSOM or CSOM and get the all apps in AppCatalog, Not AppInstances..
7
votes
2answers
832 views

SharePoint 2010 Documentor

Is there already existing a tool , I think "documentor" can be his name for Sharepoint 2010 that can output a form of documentation with a description of all db, web application , sites, sub sites , ...
7
votes
1answer
2k views

Problem installing web part using Powershell

We've developed a custom Visual Web Part using Visual Studio 2010 for Sharepoint 2010 Server. The webpart gets deployed when executed from VS (F5), so we can add it wherever we want using Sharepoint ...
7
votes
2answers
1k views

SharePoint 2013 Variations Using Powershell

I am using powershell to manage the creation of some site variations following this tutorial: http://www.sharepointeurope.com/blog/2013/7/23/automate-variations-in-sharepoint-2013-using-powershell-c ...
7
votes
1answer
4k views

Manipulating permissions on SharePoint Online with PowerShell

We have a multitude of sites and sub-sites in SharePoint. As we run Azure AD Connect, we are able to assign Windows security group as Site Collection Administrators and further - assign AD groups to ...
7
votes
1answer
3k views

Multi line text field with unlimited length in document libraries allowed

What I am doing: Migrating Documents to SharePoint Online using PowerShell Script. Once document is uploaded I am simultaneously setting property values. Case: In a Document Library, I have a field ...
7
votes
1answer
1k views

Get a count of all libraries and Workflows in my tenant using PowerShell

I'm using PNP Powershell and am still fairly new to Powershell and scripts. I need to get the count of all document libraries and workflows in our SharePoint environment. I am using SharePoint 2013 ...
7
votes
2answers
185 views

What is a good way to build/install/provision a full web application?

I have a fairly simple SharePoint web application, with a publishing front end, an extranet for customers and an intranet portal. I want this web app to be easily redeployable -- pretty much a one-...
7
votes
4answers
5k views

Can I use Set-SPOUser to set an O365 security group as a secondary site collection administrator?

Is there a way to use Set-SPOUser to add a security group I created in Office 365 as a secondary site collection administrator? I have the security group's Login Name which begins with "s-1-5-21-..." ...
7
votes
2answers
4k views

Unable to remove app from SharePoint 2013 site

I've seen this problem in several places in our dev and test implementation of SharePoint 2013. Especially in sites where there has been a lot of testing where people uninstall and install apps. The ...
7
votes
2answers
12k views

creating site collections using SharePoint management shell 2013

I am creating Site Collections for Testing SharePoint. I am using Host Named Site Collection to do that instead of the path based site collection addressing. For that Got a reference to the HNSC web ...
7
votes
1answer
3k views

Adding a list item with PowerShell doesn't trigger event receiver

I have a simple list with an event receiver for the following events: ItemAdded ItemUpdating ItemDeleting I confirmed that the event receiver fires when adding/updating/deleting an item from the ...
7
votes
1answer
508 views

How to Install Sharepoint Online Management Shell on Powershell 5?

I need to migrate 300K records from my filesystem to Sharepoint Online (SPO). I am on Win7 SP1 and have MS System Center 2012 Configuration Mgr. installed so can't install WMF/Powershell 3 or 4, but ...
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 ...
6
votes
6answers
20k views

Detecting Solution Deploying Status

I am Looking for a way to detect if the a solution is deploying the following code does not seem to return "Deploying" like I see in central admin. $wspID = Get-SPSolution -Identity 'mysolution.wsp'; ...
6
votes
4answers
72k views

How do I install the 2013 SharePoint PowerShell module on my Windows 7 client computer?

I just installed SharePoint 2013 Foundation on a server. I'm confused as to how I can access the PowerShell cmdlets from my client pc. Everything I read assumes you're in front of the actual server. ...
6
votes
3answers
8k views

No. of subsites in a site collection?

How to get number of subsites in a site collection using Powershell?
6
votes
4answers
57k views

How do I update an already existing wsp on farm? [duplicate]

Possible Duplicate: Update-SPSolution does not Deploy Solution I have a wsp that is already deployed on the farm. I made some code changes. I cannot use the Add-SPSolution command because I ...
6
votes
2answers
10k views

Is there a PowerShell cmdlet to delete a Timer Job?

Is there a PowerShell cmdlet to delete a Timer Job in SharePoint 2010?
6
votes
4answers
45k views

How to connect to SharePoint online to run some PowerShell

How can connect to SharePoint online to run some PowerShell commands? It would be nice if someone has drilled down the steps for me :)
6
votes
4answers
8k views

How to programmatically determine which application pool a service application is using?

Is there a way to programmatically determine which application pool a service application is using? Further i would like to get the information about the service account the app pool is using.

1
2
3 4 5
79