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
248 views

SP_Admin SQL Permissions

I'm trying to create a web application using powershell and I'm getting a log in error with the SP_Admin account. I'm not sure if I've made a mistake when I was setting up the environment, I might ...
1
vote
1answer
319 views

Is there a powershell command to wait for the App uninstall job?

I have the following script to update my SharePoint app with the latest version but it always fails with the error: Install-SPApp : An instance of this App already exists at the specified when ...
0
votes
1answer
277 views

Restore from Production to Development

I have two different servers with Sharepoint 2010 standard edition setup. I have two different SQL database servers(DEV_Content and PROD_Content) for these two environments. I would like to create ...
1
vote
1answer
2k views

Can't create User Profile AD mapping using PowerShell in 2013

Using PowerShell, I want to add properties to the user profile in 2013 and map those properties to be synchronized with Active Directory. I can create the properties fine as well as the ...
2
votes
1answer
674 views

SPSiteDataQuery for Documents using caml query

I am tring to query an entire site collection for all the documents where a certain field is equal to something. For example where LoanCategory = Insurance. I am trying to do this using an ...
1
vote
1answer
833 views

How to embed javascript code in a page using Powershell?

I have a powershell script that creates article pages in a publishing portal site collection. As part of that script I insert the content for each page by setting the value of the $item["Page ...
0
votes
0answers
316 views

Problems after import-spweb

I have used export-spweb and import-spweb to move multiple sites around in SP2010. After import-spweb I notice that some libraries are really messed up. When I try to add an item to the announcements ...
0
votes
1answer
868 views

SharePoint 2013 - Edit TopNavigationBar

I want to edit an item in the TopNavigationBar with a PowerShell script. I´m using a Windows Server 2008 R2 (English) with SharePoint 2013 (German). My PowerShell script says that the Title is ...
2
votes
1answer
168 views

SP2010 - Scopes.GetDisplayGroup error, page visit required first?

I'm having a very strange problem with the Scopes.GetDisplayGroup() method returning a "Specified cast is not valid" error. This is a cut-down version of the code I've been using: $SPWebApp = ...
1
vote
0answers
59 views

Powershell-registered Managed Accounts not showing up in Central Admin

I'm trying to set up a work laptop for SharePoint development. To get it up and running quickly, I used my corporate domain user account as the first managed account. Now, I want to use a local ...
0
votes
1answer
319 views

Every SPFile is null in a document library using PowerShell?

What the crap is this about? I whipped up a fairly simple run-once and discard PowerShell script to iterate through all of the files in a list and make a simple change. The problem is every SPFile I ...
1
vote
1answer
491 views

How create an index based on an internal list field?

I have a huge library and its documents don't have any metadata. They have only the name (FileLeafRef) filled (and FileRef -> file's path automatically filled). I'm trying to update their metadata ...
0
votes
1answer
222 views

Updating a username in a List - false positive

In my portal I have a list with a "person" field that contains usernames. I am using a powershell script to update this field. You can see my function below. I've already loaded the list, and am ...
0
votes
2answers
327 views

Upload a Web part to All Site Collections

We have designed a custom Content editor web part and we exported the dwp file and added it in an site collection (Web part gallery ) and the web part is working fine when we add in any sub site in ...
1
vote
1answer
131 views

Using PowerShell, how can I compare User Profile Properties to a list

For this example, I have a list of first names Fred Mark Tony Alisa Todd Emily I would like to compare them to profiles in the user profile service Fred Greg Tony Alisa John And get output ...
1
vote
1answer
8k views

Export And Import of Subsites Using PowerShell Script

I am using SharePoint 2013. The problem is as follows: There are two Site Collections in a single Web Application. With the following Paths: /sites/Site1/Subsite1/ & /sites/Site2/Subsite2 Using ...
1
vote
1answer
727 views

Fetch Username from Lookup-Column using Powershell

In my powershell script, I have a method that fetches a username from a sharepoint list. This works fine - my problem is that field is from a lookup column. The user chooses the username from a ...
2
votes
1answer
494 views

Passing special characters in SharePoint Powershell

I need to add "Français" to search scope form the power shell to perform this task I'm using the xml to pass the values. But after it is added to the scope "Français" looks like "Français". the ...
2
votes
1answer
2k views

Unable to upgrade WSS_Search_ServerName database

I have got the following error in SharePoint 2010 Central Admin: The following databases require upgrade because their versions are older than the backwards compatible range: ...
3
votes
3answers
4k views

Powershell to view last login date for users?

I tried Googling this, but had no success. Is there a PowerShell script, or would it be possible to write one to show the last login date of each user into the SharePoint environment?
3
votes
2answers
1k views

How to disable anonymous access for SharePoint WebApplication with powershell

I need to create a PowerShell script that will disable anonymous access to the given SharePoint web application. However, I have thus far been unsuccessful. All scripts have been run under the ...
0
votes
0answers
69 views

2013 - Powershell Enable columns

I'm creating sites, subsites and lists via PS. And I need to "enable" the version/size columns, in lists I created. I don't want to create them because they already exist. In graphical mode, I just ...
0
votes
2answers
413 views

Error while deleting keys from SPWebConfigModification

I got following error when I tried to remove item from the WebConfigModification. Exception calling "Remove" with "1" argument(s): "Object reference not set to a n instance of an object." I ...
0
votes
1answer
121 views

why I cant get a list item that exists?

Is there a difference between checking a pages library and a list in terms of powershell commands? The following cmdlet is not returning me an item, and when I checked the browser I see the list item ...
0
votes
1answer
813 views

All workflows stay on starting mode

We installed Sharpeoint 2010 SP2 and then suddently all workflows stopped working, they are all in start mode. According to this thread, it should be fixed with June CU, we installed it, but this ...
0
votes
0answers
125 views

Tool (SSIS or Powershell) to migrate large number of documents with metadata into SharePoint?

I'm looking to migrate 400GB of files (Word, PDF, etc.) from a network file share into SharePoint 2010. The target farm has two WFE's. My question is whether the fastest (in terms of the migration ...
2
votes
2answers
426 views

Activate webfeatures on all SharePoint online webs

I want to activate a webfeature on all subsites of a sitecollection in Office 365 / SharePoint online. I thought i can do the actions in a SiteCollection Feature, but that's throwing a timeout error. ...
1
vote
2answers
7k views

Activating Site Collection Level Feature with PowerShell Script

I am trying to activate a Site scoped feature using a powershell script. I have another scrip which deploys my solution and I see my feature is installed correctly in Site Collection feature gallery. ...
0
votes
1answer
134 views

Update List Item with Powershell Begets Strange Return

On my portal I have a list with columns for First Name Last Name and Account where Account contains usernames. So I have this function which reads through my list (it connects fine, it reads the list ...
1
vote
1answer
45 views

How to move alist with powershell from one site to a subsite?

I havent found how to move or at least copy a list with its content from one site to a subsite. The copy/move needs to copy with versioning included. No clue where/how should I start Thanks
0
votes
1answer
117 views

How to traverse all columns of type Choice with powershell?

I need to traverse all columns in one list of type choice only, I really know how to iterate over a list, and even on columns, but I only need to see choice columns in my script any idea?
0
votes
1answer
3k views

Code for Updating the Master Page Powershell 2013

Can someone please walkthrough this code for me. I just want to make sure that I understand it correctly. I've gotten it to run, but nothing seems to be happenings. Basically, I just need to know ...
1
vote
0answers
57 views

Problem with File.Checkin only on certain files

I have a powershell script that is copying files from a mapped drive into sharepoint and setting some meta data. All is working as expected with the exception of certain files lose most meta data when ...
2
votes
3answers
2k views

Make timerjob runs on specific server?

I have an already developed timer job that is running on front end servers, but I want to set it to run on application servers only. Can I do this with PowerShell without modifying any code of the ...
2
votes
1answer
940 views

Broken Lists Cannot Be Deleted

There are a few lists in a SharePoint Server 2010 development environment that are broken. Due to this situation, clicking the lists in the SharePoint Web interface throw .NET exceptions, and viewing ...
1
vote
1answer
1k views

What is the correct way to migrate a SharePoint web app from classic to claims based authentication?

In my new project, the client wants us to convert several web applications from Classic to Claims. I've read many articles on the steps to convert a SharePoint web application from classic mode to ...
0
votes
0answers
790 views

C#: cannot get listitem field value but works fine in powershell?

back again with a strange issue. Using powershell I can get a handle on a SPListItem and do Item["My Field"] which prints its value. However, in a C# custm workflow activity, when I attempt to do ...
1
vote
1answer
232 views

Find third-party features with powershell

Can I find just third-party features with Powershell? I other words, I want to create an inventory with all features that not come originally from Sharepoint installation.
1
vote
0answers
135 views

Approaches to managing PowerShell for every day menial tasks

PowerShell is a very powerful tool to handle many aspects of a SharePoint farm. On the one hand there is the set of commands typically used by the administrators of the infrastructure. These people ...
1
vote
2answers
1k views

SPSD on Sharepoint 2010 cant run because of framework 4?

I downloaded the Sharepoint Solution deployer SPSD, and I want to use it an SPSD 2010 Farm, to install jusst a wsp But I got this error, which is pretty obvious, 2010 projects run on 3.5 framework ...
0
votes
2answers
3k views

Cannot create a group in term store using powershell - current user has insufficient permissions to perform this operation

I am trying to create a term group in the Term Store in sharepoint 2013 using powershell. Bellow you will find the powershell script that I am using plus the error that I am getting. ...
1
vote
2answers
2k views

Unable to update item using powershell when event reciever is enabled

I have a powershell script that I am using to update some list items programatically. It seems to work as I expected when I disable the event reciever that is associated with the list however when I ...
1
vote
2answers
900 views

Powershell exception when updating ContentType

I have a strange issue when using PowerShell to modify a library ContentType. The following script works correctly: $web = Get-SPWeb $url $lib = $web.Lists[$libName] ...
1
vote
1answer
312 views

Solution deployment fails with error “Violation of PRIMARY KEY constraint 'PK_Classes'”

In our install script, which installs several solutions together, we found that solutions were occasionally failing to deploy with the following error in the ULS log: ...
1
vote
3answers
6k views

Internal Name for the Name(linked with document with edit menu) field SharePoint form library 2010

I am creating a form library(info-path) view using power-shell command. One of the fields the view should contain is the Name(linked with document with edit menu). I want to know this columns ...
0
votes
1answer
3k views

modifying exisiting ListView in sharepoint 2010 using powershell

Hi We have a listViewA(col1,col2,col3) and listViewB(col1,col2,col3) on the same form library. Now the requirement is to modify these existing listviews, so that they do not contain the old column ...
0
votes
1answer
1k views

Get-SPweb with concatenated URL

I cant believe this isnt working, I must be blind!! Please help me... When I do $blog = Get-SPWeb http://sp01.domain.com:8080/my/personal/user1/Blog it is working quite well, but foreach ($site ...
1
vote
1answer
3k views

Modifications to the Suite Bar are only applied to the top level site in the Site Collection

I have used PowerShell to change the left part of the Suite Bar in Sharepoint 2013. However, the changes are only applied to the top level site of the site collection. I assumed it would change for ...
2
votes
1answer
2k views

Remove-SPWebApplication not working if SPAdminV4 service is run by Local System?

I have sucessfully removed my Web Application with the following script: PS C:\Users\SP2013Farm> Remove-SPWebApplication http://portal.com -Confirm -Dele teIISSite -RemoveContentDatabases Confirm ...
4
votes
2answers
226 views

What are the cmdlets for SharePoint 2013 that have no GUI equivalent?

I've not found a comprehensive list on anywhere of the PowerShell cmdlets for SharePoint 2013 whose function or output cannot be achieved via the GUI (Central Admin, Site Settings, etc). I would ...