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
1answer
168 views

How can I create web application, site collection, and sites automatically with batch file and power shell

Is there any way that I can create a web application, site collection and sites using poweshell and batch file automatically? So, User has to click on executable batch file which will create the web ...
0
votes
2answers
145 views

How to properly dispose of sp 2007 object in powershell?

First and foremost I've done A LOT of googling and even went past the first page or 2 :) so feel free to direct me to the proper post if necessary. I am trying to loop through a bunch of webs and ...
0
votes
1answer
915 views

Update custom property on listItem using -replace in powershell?

I have two different web application with one site collection each. One Site collection is privat and the other on is public inside the intranet. The public site links to the private site which link ...
0
votes
1answer
2k views

Trying to create a Site Collection using PS but keep getting error

I am trying to create a site collection using powershell script but keep getting error even though I already created Managed Path I am referencing in cmdlet, PS C:\Users\svc_spadmin> ...
0
votes
2answers
895 views

powershell - The user does not exist or is not unique

When I try to add user/group using SharePoint OM or Power Shell script I'm getting the following error. In this example S-9-9044-V is an AD Group. The user does not exist or is not unique $web ...
0
votes
1answer
52 views

User based document library

I have a request regarding document library, basically the library will store each person's record, so the security is at user level. Instead of using mysite, I am now having two choices in my head: ...
0
votes
1answer
536 views

How to add an existing group to a newly created site through poweshell?

I am creating sites through powershell and creating the groups for them. I have a situation where if the group is already existing group then I have to add that group to the site. Coz might be ...
0
votes
0answers
383 views

EnsureUser returns none existing users using ldapprovider

I'm writing a PowerShell script that adds users to a SharePoint site. To check if the user exists I'm calling the EnsureUser. But my issue is that the when calling this method with a ldap membership ...
0
votes
0answers
125 views

Update KPI Lists Script

I have about 400 KPI lists, and an error in one of the KPIs on each list. Is there a way I can update all of the lists automatically? I cannot use .NET, but a shell script is within an acceptable ...
0
votes
1answer
226 views

Output powershell caml query to table

This has to be real easy but I just cant find an answer on google that will work in my case. I am running a ps1 file that caml queries a document library. I just want to organize these results into a ...
0
votes
1answer
2k views

Changing the order of columns in a list view - Powershell

I am trying to add a new column called "REF" to all existing views using powershell which I have succeeded in doing, however when adding the column it is automatically added to the end of the array ...
0
votes
0answers
103 views

Automated PowerShell task cant create list items

I have a powershell script that gathers some data and looks to upload that data to SharePoint. Im uploading the data via 2 methods, as an excel spreadsheet, and as a list item in a custom list. When ...
0
votes
0answers
148 views

Problem with adding webparts with limitedWebManager.ImportWebPart PowerShell

When creating a web in Visual Studio it generates a web part where the namespace and the class name is the same. I'm thinking that this is giving me a problem with the limitedWebManager.ImportWebPart ...
0
votes
1answer
214 views

Error on Feature Deactivation with Power Shell Script

I have written some code in my feature receivers on feature activation and deactivation for my SharePoint 2010 site. Basically some contents are added on feature activation and same are deleted when ...
0
votes
0answers
536 views

How do you prevent “Disable-SPFeature : Cannot complete this action. Please try again.” errors?

When I try to run this cmdlet, I receive the following errors (only sometimes): Disabling feature: SPFeatureDefinition Name=FeatureDefinition/b89234a6-xxxx-xxxx-xxxx-200dd03e1fdd ( ...
0
votes
2answers
1k views

An empty pipe element is not allowed - the Powershell I copied fails

I am just trying to fix something to get my BCS external list created. All indications are that the server has too many rows for BCS so here is what I put into the Powershell IDE running as ...
0
votes
1answer
3k views

Emptying SharePoint Recycle Bin

Our SharePoint 2007 installation has a particularily immense First-Stage Recycle Bin. I wrote a PowerShell script a while back that deletes old items. Just for fun, that's posted below. UPDATE2: ...
0
votes
1answer
2k views

Powershell script to update all users

Okay I am half asleep, what did I do wrong with my powershell script (modified with I have just watched the A-Team in mind) function update-fields () { #Set up default variables #My Site URL ...
0
votes
3answers
2k views

Restore-SPSite fails without any useful error

I'm trying to restore from a backup via PowerShell with the following commands: add-pssnapin Microsoft.SharePoint.PowerShell restore-spsite -Force -Confirm:$false -Identity ...
0
votes
0answers
209 views

Stop Powershell Script asociated with list sharepoint

I created the next script with powershell and it updates all the items in a list: Add-PSSnapin "Microsoft.Sharepoint.Powershell" $site = Get-SPWeb -identity "http://mywebsite" $list = ...
0
votes
2answers
907 views

Powershell deployment with nant - problem with script arguments

I have a powershell script updating my solution: Add-PSSnapin Microsoft.SharePoint.PowerShell write-host $args[0] Update-SPSolution -Identity PkbInfo.SP.wsp -literalpath $args[0] -GACDeployment ...
0
votes
1answer
915 views

Batch updating a new Audience Targeting column

We have a list with around 900 items, and recently the end-users decided to enable "Audience Targeting" on it. This added a new Audience Targeting column. The users now want to assign a default ...
0
votes
1answer
401 views

How to move content within fields in a page layout?

I'm working on a requirement where I'm adding a few fields in an already existing Page Layout and also renaming all the fields. After adding the fields via code,I want to move content within fields ...
0
votes
1answer
86 views

Right Management Sharepoint

I have a sharepoint list. Users should be able to create new items and change some attributes. I gave full access for the users on the list items. But now I think there is a security gap: what ...
0
votes
1answer
116 views

Trying to create list with ECT

I'm trying to create list from External content types with powershell. I'm trying to get the model, through this line : $Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType Model -Name ...
0
votes
1answer
215 views

Site Provisioning in Hosted Environments

I am looking for a solution that would allow me to provision sites, in environments where I don't have server access (hosting, Office 365). My issue: I need to provide site collections or sites to my ...
0
votes
1answer
2k views

User profile Audience Using Power shell

#Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin ...
0
votes
1answer
516 views

field type URL. how to prepare csv for this?

I am running a powershell to import csv into a list. There is one field "ProviderURL" in the list. In the csv I had http://www.contoso.com and it imported fine. Howerver, I would like it to be Contoso ...
0
votes
1answer
747 views

How to deploy all farm solutions in PowerShell?

Please tell me how to write a Powershell script that will deploy all added farm solutions.
0
votes
1answer
153 views

Find assembly version from a web part solution

Is there a way to find the assembly version of a web part solution in sharepoint (via powershell)? Thanks
0
votes
0answers
1k views

enable web analytics customized reports

I'm running SharePoint Server Standard 2010. I don't see a "Customize Report" button in the Analyze tab of the Site Collection Web Analytics report. When I go to PowerShell and run Get-SPFeature ...
0
votes
1answer
330 views

create a content type managed property via powershell

Regarding this blog post, its very easy to do visually. But for easy deployment on other environments I would like to do this in a powershell script. ...
0
votes
2answers
316 views

Change SocialTag Url?

I want to change the url of my solution from mycompany.no to mycompany.com. How can I preserve the Social Tags. SocialTag Url property is readonly it appears. :( Does there exist a powershell or ...
0
votes
1answer
3k views

Modifying group owners of sites with ps

I need help here with powershell, as im not that good in, im only starting, but i need already to make a powershell script but will run thru all collaborative spaces and modify 4 groups by setting ...
0
votes
0answers
773 views

How to set custom Web Part values through powershell?

I am using a powershell script to initialize several values of a custom webpart and then insert that webpart onto a page. I have been partially successful using the method below: ...
0
votes
1answer
518 views

Change a list item's “Manage Copies” destination URL programmatically

I'm trying to write a PowerShell script that goes through every item in a document library and updates the "Manage Copies" destination URL to a new location. Is there any way to achieve this ...
0
votes
1answer
598 views

Empty exception using powershell to add a masterpage

When i try to add a masterpage to a web application using the following code : $MasterPage = "C:\test.master" $MasterPageName = [System.IO.Path]::GetFileName($masterpage); $SpWebApp = ...
0
votes
2answers
2k views

getting Create Error when using Powershell

I am receiving this error on following line Exception calling "Create" with "4" argument(s): "Value cannot be null. Parameter name: parentFolder" At x:\Dev\PowerShell\MoveFiles2DocSet.ps1:29 ...
0
votes
1answer
686 views

Multiple Managed Metadata Service Instances

I am seeing multiple Managed Metadata Web Services in my farm and am not sure what to make of it. I was expecting to see one instance why are there others? Get-SPServiceInstance | ...
0
votes
1answer
799 views

Powershell command for Excel Services?

Is there a powershell to restart the excel services? If yes, what is the syntax to restart the excel services.
0
votes
1answer
841 views

Export all subsites

I am looking for a quick way to export all sub-sites from a web application and exclude the root url, is there a quick way to accomplish this?
0
votes
2answers
67 views

SharePoint 2010 & Powershell

I want to learn Powershell with SharePoint 2010, please let me know if there are resources available on the Internet.
0
votes
0answers
2k views

User Profile Manager and its Enum does not give me the same count

Today, I have encountered another issue with SharePoint 2010. I have a powershell script that can pull the user profile details from the User Profile store, having used UserProfileManager to get the ...
0
votes
1answer
736 views

Remove-SPServiceApplication Hangs

I am attempting to run the following Powershell command to remove a service application. The command never returns and just hangs and hangs. Anyone now why? Remove-SPServiceApplication -Identity ...
0
votes
1answer
946 views

Setup an item level auditing for a sharepoint document library

I would like to setup an item level auditing (Opening or viewing or downloading) for a SharePoint 2007 document library without enabling audit for the entire site-collection. This link may help us ...
0
votes
1answer
180 views

Exception setting ApplicationPoolPassword

Following the example in this blog post, I am trying to create a new Web Application with PowerShell. However, when I try the line: $WebAppBuilder.ApplicationPoolPassword = "password" I receive ...
0
votes
1answer
72 views

How Can I Output Enterprise Features List To CSV?

I am trying to output to a CSV file the list of activate enterprise features in our sites with DisplayName, GUID and Scope as the content that is written to the CSV file. I have the following ...
0
votes
2answers
64 views

What is the path of a site collection relative to a subsite if they are named the same “http://root/site”

I've been moving subsites into their own site collections and am now in the process of removing the old subsites. I know I can go through the UI in "Site Actions" -> "Sites and workspaces" to remove ...
0
votes
1answer
1k views

Running script with powershell of Sharepoint Server without connecting to the Sharepoint Server

I have a folder in Sharepoint Server. In the folder, there is a script(.ps1 file), that I can run with powershell. It works fine with powershell, if I run it when I'm in Sharepoint Server. But I ...
0
votes
3answers
744 views

PowerShell System.Reflection.TargetInvocationException on Line 1 - Permissions?

I've adapted a PowerShell script from Harry Chen's "SharePoint Connoisseur" blog to solve the broken Navigation Up issue he describes. My code is slightly modified, but only to reduce the data ...