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 ...

learn more… | top users | synonyms (1)

1
vote
2answers
21 views

How to get list of site-collections in a particular web application using Powershell in a text file

I want to extract list of site collection of one of the webapplication using powershell. I found this url which does the same thing. But i want result in a text file. ...
1
vote
1answer
25 views

Running PowerShell CSOM towards a SharePoint Online site

I have an issue with the files needed for running PowerShell in relation to SharePoint online. I am using the following files to create the connection: Add-Type -Path ...
0
votes
0answers
8 views

Adding a removed server to the farm again

Earlier, I was removing a server from a SharePoint 2010 farm via Central Administration by clicking the Remove server link. Nothing else that I have done. How I can re-add the server to the ...
3
votes
1answer
6k views

Uploading a file using powershell and updating column values

I am trying to upload a file from a local drive to a sharepoint doc lib, this much I have been able to find, however, I also want to update a column relative to the file, foe example, I have a company ...
3
votes
2answers
7k views

Powershell to list all sites and subsites in SharePoint Online

I know about "Get-SPWebApplication" but it's not available in Online. Anyone? Thanks,
1
vote
3answers
2k views

Getting the list name from url with PowerShell

I am trying to parse any given SharePoint URL and get back the site, web and list references using the code below. I would like to achieve this even if I provide the URL of an item. The code below ...
1
vote
1answer
45 views

Microsoft Sharepoint is not supported with version

I have Windows server 2012 installed. When I open up Powershell ISE I get an error while using SharePoint 2010. IT works fine with SharePoint 2010 management Shell. Microsoft SharePoint is ...
4
votes
1answer
58 views

delete Site collections sharepoint 2010

I need to delete all site collections that contains personal in it. I get all the site collections by the cmdlet $sites= get-spsite -limit all| Where {$_.url -like "*personal*"} foreach($site in ...
0
votes
1answer
26 views

How to find out per PowerShell Script if a Solution is activated and where it is activated

i have a Solution with the name My.Solutionname as the result of it i have a WSP with the name My.Solutionname.wsp It includes one Site and one Web scoped Feature. I have a SharePoint 2013 Farm ...
0
votes
1answer
12 views

Find out which Content Type a field is associated with using PowerShell

I have added two Content Types to a List some of the Fields exist in both content types so I have got duplicate fields. The field which is added by the new Content Type is empty. Now I want to ...
1
vote
1answer
18 views

Creating Result Sources by PowerShell

I want to create a PowerShell script that creates Result Sources in Search Service Application. If it's possible I would like to state the Result Sources in an XML-file with a sourceID. How can this ...
0
votes
2answers
35 views

Compare a csv items with sharepoint list items with PowerShell CSOM

I have to compare the whole CSV file with SharePoint list items to get the result either SP list items and CSV items are same/equal or not and then do the CRUD operation on SP list to maintain the ...
0
votes
1answer
19 views

Setting Managed Propety Refinable Option with PS

I'm trying to configure managed properties through PowerShell but there's one particular parameter that I can't figure out. I want to make a certain property refinable but none of the commands listed ...
2
votes
1answer
556 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 ...
1
vote
1answer
1k views

How to register a new SharePoint App using PowerShell (instead of appregnew.aspx)?

I'm uploading my SharePoin Provider Hosted App and installing everything via PowerShell, but the only thing that I cannot find is if it's possible to register a new app using a PowerShell command ...
3
votes
1answer
117 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 ...
2
votes
1answer
660 views

SharePoint 2013 Online: List of all suspended workflows

Is there a powershell script or service out there that gives you a list of all workflow statuses? Primarily we are looking for a way to get a list of all current suspended workflows. Update: Here ...
0
votes
1answer
31 views

Enable versioning on document libraries excluding some

I have enabled 10 major versions on all document libraries in my farm using the code below but I now need to exclude a few specific sites so that the major version number can be different to 10. How ...
4
votes
1answer
44 views

Connect-SPOService : Could not connect to SharePoint Online

I've followed these steps on technet but had no success: https://technet.microsoft.com/en-us/library/fp161372.aspx PS Command: Connect-SPOService -Url "https://<mydomain>-admin.sharepoint.com" ...
0
votes
1answer
15 views

Determine via code if workflow is stuck in error state

There is a workflow (Visual Studio and SP 2010 style WF) that seems to be getting stuck every so often when it errors. I see the item in the WF history for the list item saying something like "An ...
2
votes
1answer
24 views

Why is the New-SPContentDatabase command looking for .mdf file in E:?

I am trying to create a site collection with its dedicated content database in SharePoint 2010. To that end, I am trying to use powershell with New-SPContentDatabase command. Here is the command I ...
7
votes
7answers
18k views

Error - Get-SPWeb in Powershell

I am running this simple command from powershell under a user context, who has db_owner and SharePoint_shell rights to the SharePoint_config database. I get the following error: PS ...
3
votes
2answers
7k views

Powershell Get-SPServiceInstance - The term 'Get-SPServiceInstance' is not recognized as the name of a cmdlet

On a fresh SP2010 install. I run powershell as the admin I have my policy set to unrestricted. I've tried embedding this in a .ps1 file or running in the shell.. but get: Powershell ...
2
votes
2answers
9k views

Do I have to run Register-SPWorkflowService for each site collection?

As part of my SharePoint Server 2013 setup I sometimes need to integrate the new workflow infrastructure into the farm. I've followed the documentation starting from the SharePoint side of things: ...
2
votes
2answers
39 views

Copy a value from one field to another with PowerShell

I am trying to run the following PowerShell script in order to fill-in the values of the title column with the values from the esubject column: $site = new-object ...
1
vote
2answers
28 views

PowerShell CSOM set web inheritance

Piggy backing off my last question, Modifying Global Navigation Settings in SharePoint Online, is it possible to set a subsites navigation inheritance to use the same as the parent? If it is possible ...
1
vote
1answer
135 views

Powershell Script to Stopfollowing not work

I found this script at MSDN forum [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") $web = Get-SPWeb https://www.contoso.com/teams/yourteam $context = ...
0
votes
0answers
10 views

powershell to select a lot of files in folders and subfolders

First my problem : I started to move a big library into a document center in Sharepoint, everything went fine, except people couldn't see files in it. After a short research I discovered the check out ...
0
votes
0answers
103 views

PS1 Script Clone user permission , Exception on You cannot call a method on a null-valued expression

This script clones Users permissions given a Source user and a target User. It works perfectly in my test environment but not in production. #Function to copy user permissions Function ...
2
votes
1answer
1k views

Backup-Spsite always failing with HRESULT 0x80131904

While taking backup of Site Collection on SharePoint 2010 using powershell command "Backup-SPSite" I always encounter below error : "Backup-SPSite : Exception from HRESULT: 0x80131904 At line:1 ...
2
votes
1answer
781 views

Creating SiteCollections using SharePoint Management Shell 2013

I am following the below instruction to create a NHSC, but at point D when I am creating a Team Site, I get the message that the new URL is not found! Do I need to create that before? Am I missing ...
0
votes
1answer
38 views

Check in a lot of files in sharepoint online (Document center)

Here it's my problem : I started to move a lot of files in a document center, but yesterday I learned that users cannot see them, but permissions we're all right. I checked, and finally found that ...
0
votes
0answers
15 views

sharepoint 2010 powershell to delete workflow history

I'm looking to put together a powershell for sharepoint 2010. I want to delete workflow history after 30 days, for everything in my farm/sites BUT I want it to exlucde certain lists that we need to ...
0
votes
0answers
29 views

Retrieve SharePoint 2013 Product key script

I've tried many scripts, but all of them retrieving another key then product key, that i wrote in start of installation (i remember first symbols). Is there any way to get the right Product key, that ...
0
votes
0answers
19 views

How to get documents within each document set from a document set library using powershell

I have to set a value of particular column for all documents in the ABC library. This library contains many Document Sets, within which there are different documents. #instance of Client Context ...
0
votes
1answer
872 views

Creating a calculated column with replace in Powershell

I am trying to create a caluclated column through powershell script. Below is the Script: Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $site = Get-SPweb ...
4
votes
3answers
2k views

How to remove the builtin “Item” Content Type from a list using powershell?

I have a custom content type and I added this content type to a list. I now want this list to only use the custom content type and I want to remove the built-in "Item" content type. I tried ...
0
votes
0answers
25 views

PowerShell code to get managed navigation

I have written the below powershell code to get the managed navigation throughout the sites. ## SharePoint DLL [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") ...
0
votes
2answers
1k views

How to get a list of broken links using Powershell? for Sharepoint 2010

I need a SharePoint 2010 Management Shell script that is going to generate a csv file with a list of broken links in one of my site collection and its sub sites. The script should support powershell ...
1
vote
1answer
23 views

Any recommendations for SharePoint Online PowerShell Debugging Tools

I just discovered code.visualstudio.com, which even has intellisense for PowerShell scripts. Debugging those scripts, especially when the target is SharePoint Online, is a different matter. Does ...
0
votes
1answer
175 views

How to move OOTB profile properties into custom section

How to move OOTB user profile properties into custom section? How we can do it using powershell? I need a PowerShell script for doing this in SharePoint 2013.
1
vote
2answers
819 views

Exception calling “ExecuteQuery” with “0” argument(s): "The remote server returned an error: (400) Bad Request. CSOM SP13

I'm trying to add a page to my search centre in sharepoint 2013. Trying out cSOM too. Here is my code, I am getting a bug Exception calling "ExecuteQuery" with "0" argument(s): "The remote server ...
0
votes
1answer
14 views

shareopint powershell pointing the field of an element inside the collection

I have a question about the follow code: $web = Get-SPWeb http://localhost $list = $web.Lists["Style Library"] $fields = $list.Fields.InternalName $fields | Where {$_ -like '*workflow*'} output: ...
1
vote
1answer
24 views

Change user profile sub type with powershell

How to change the user profile sub type for an account with powershell? The UI way: Edit user profile in the CA. Change the subtype to custom subtype and save So far I have this code. $site = ...
2
votes
2answers
196 views

There is already a term with the same default label and parent term

I am using SP2013 on-premise standard edition and we tried to update the user profile with a PowerShell script. Unfortately, part of profiles cannot be updated. The exception is "There is already a ...
4
votes
1answer
1k 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
29 views

How can I generate a report to display all users' access to a site?

I would like to generate an Excel (or CSV) file to have a list of all users and what type of access they have to a certain 2010 site? This site is secure, but I do have administrative permissions to ...
0
votes
0answers
23 views

Version count not showing what it should do

$Upload = $DestinationFolder.Files.Add($FileCreationInfo) $Context.Load($Upload) $Context.ExecuteQuery() Write-host "Adding the meta data to the document in O365" $ListItem = ...
0
votes
1answer
29 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.
0
votes
2answers
16 views

Cannot reach PowerShell profile

I am trying to open PowerShell profile, I typed: $profile in Windows PowerShell, and it gave me the following path: ...