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)

0
votes
0answers
5 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
8 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 ...
6
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: ...
0
votes
2answers
26 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 ...
0
votes
0answers
6 views

How to recreate Duet Enterprise Profile Synchronization for User Profile Service Application timer job

I have delete Duet Enterprise Profile Synchronization for User Profile Service Application timer (OBA.Server.ProfileSync.ProfileSyncJob) job using powershell. Is there anyway i could recreate this ...
1
vote
2answers
26 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
127 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
9 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
101 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
993 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
778 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
36 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
12 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
26 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
13 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
865 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
20 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 ...
2
votes
1answer
644 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 ...
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
170 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
784 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
13 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: ...
0
votes
1answer
18 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
190 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
25 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
20 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
27 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
15 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: ...
1
vote
1answer
30 views

Office365: Scripting One Drive for Business with PowerShell

In Office 365, a One Drive instance for a user is typically created when they click on their "About Me" page. Does anyone know if it's possible to avoid this by having One Drive instances created ...
6
votes
5answers
8k views

Get name of Farm account using Powershell

How can I get the name of the Farm account ? I can see it listed in Get-SPManagedAccount, but do not see any properties on the SPManagedAccount objects to be able to dynamically filter by and ...
0
votes
1answer
23 views

Retrieving SharePoint Item ID - Powershell

I am creating a script that looks through our WebApp and gets all Site Collections, Sub-Sites and list all the documents with certain pieces of information regarding each item. I have to retrieve ...
2
votes
1answer
959 views

Why is my SPD 2010 workflow running twice?

I've got a support case for a client, and they have a super simple workflow on a list. It simply sends an email to a user from a person field, whenever an item is added to the list. The client ...
0
votes
0answers
8 views

Import Visio Workflow in SharePoint 2013 using powershell

I received a .vwi file, which is a Visio workflow and now I would like to add it to the SharePoint workflow of a site collection. So far I have found that it can only be imported using SharePoint ...
0
votes
1answer
29 views

Increase the display name length for user profile property

I want to add a custom user profile property whose display name is more that 50 characters. I am unable to do so using UI or PowerShell.
1
vote
1answer
571 views

Issues updating/setting multi value lookup columns via powershell

I have an issue updating multi-values in a lookup field via powershell I can update a single value lookup field as below but can't get to update if its multi- value. As stated below when I hardcode ...
0
votes
0answers
29 views

Remove indexing from SharePoint 2013 Document Library using PowerShell Script

I have a document library and indexing has been added to this library through site setting. In Indexing there is value in primary column and Secondary Column. Suppose that in Primary column there is ...
0
votes
0answers
20 views

Powershell - Publish Designer workflow on all sites

As a follow up to my previous question on editing a workflow; Activating a Sharepoint 2013 Workflow Feature I have been able to change the contents of the workflow and publish it, however the ...
2
votes
1answer
28 views

Using PowerShell with CSOM to grant permissions to AD security groups

I have been testing out the provisioning of team sites using Powershell CSOM calls working against an on premise SharePoint 2013 farm. Creating Team Sites this way is very easy. One of the great ...
2
votes
1answer
498 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 ...
0
votes
0answers
9 views

Syntax problem Powershell create list SharePoint

I have some syntax problem in my script, I have this error : http://puu.sh/jEpzO/aac536695f.png Here you have the code : http://puu.sh/jEpB7/bcd85b70df.png Can you help me? Thanks :)
1
vote
0answers
21 views

Delete major version powershell csom

I have a document library where i have uploaded documents it has 2 major versions and i want to delete the first major version. Is there powershell csom code i can used to do this
3
votes
1answer
531 views

Import-Spweb is changing the user id if the user does not exist in the organisation anymore

We had to restore a list (which has versionsing enabled) in our PROD enviornment SP 2010 August CU 2012. We used the following command metioned below: Import-SPWeb http://example.com/projects/myList ...
0
votes
2answers
752 views

Problem copying lookup column data from one list to another via PowerShell

I have the below script that works for moving list data between two lists on sites next to each other that have the same schema. Everything works perfectly bar a column of type LOOKUP named "Name of ...
0
votes
0answers
15 views

Powershell Error while creating specific Folder in Library!

I am trying to create nested folders in a library based on an input. Below is my code. This works for all other values except few. I am not getting what wrong i do. It works for values less than 50 ...
0
votes
1answer
963 views

Export large list to excel through powershell

We can successfully migrate a list to the excel through power-shell, but if a list is having 1 Lakh of data then can we transfer through power-shell? Is there any restriction on number of list items ...