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
2k views

How do I create a new content source using powershell?

I am new to Shell Script. I would like to write a script to generate new content source for search. I wrote the following code to create a content source. $searchapp = ...
7
votes
4answers
5k views

Automatically add pssnapin Microsoft.Sharepoint.Powershell

I am developing in Sharepoint and I like more Windows Powershell than Sharepoint Management Shell. Every time I restart the development machine, I have to run Add-PSSnapin ...
2
votes
1answer
4k views

How do I export site security groups and memberships with PowerShell?

I'm looking for a PowerShell script (or tool) to export a site's groups and group memberships to a text file. These files would be used as backup for the current security configuration in case the ...
0
votes
2answers
184 views

Powershell (or sts command) for moving SC databases

I have 5 sc in 1 database (Database1). (Databases have been created for each sc). Now the task is to move 4 of the sc database from Database1 and put them into different database (where they belong). ...
2
votes
3answers
6k views

SharePoint 2010 - Install Site Template using Powershell script

I want to install site template in SharePoint 2010. Basically i want to know how use install-spwebtemplate wsp name : SPT_SiteTemplate.wsp Name : SPT_SiteTemplate
1
vote
2answers
374 views

Powershell calling custom code has SPWeb.CurrentUser = null (in certain cases)

I have a custom assembly which contains code to setup Variations for a SharePoint 2010 Publishing site. This code is based off a blog post from Waldek I have a PowerShell script in which I create a ...
2
votes
3answers
666 views

How to view what a user has access to with PowerShell?

A user has limited access but I don't know what for. How can I view what this user has access to? I'm on WSS 3. Does anyone know of a PowerShell script to perform this method?
2
votes
3answers
1k views

Powershell creating Page fails with “No parameterless constructor defined for this object.”

I wrote a Powershell script that creates SharePoint sites and pages based on an XML file to generate about 200 sites and more pages to build a specific structure. The basic steps it does repeatedly ...
0
votes
2answers
567 views

Want to run Sharepoint/Powershell tools on local machine - what do I need?

My local machine is not a SP server, but i want to be able to run powershell and connect to a SP 2010 server to administer it. What do I need to install locally?
3
votes
1answer
398 views

User not showing on People page although listed when using Powershell

I'm using SharePoint 2010 (14.0.4763.1000) and have a user that is not showing on the People page (_layouts/people.aspx?MembershipGroupId=3). MembershipGroupId=3 is the Owner's Group. When using ...
0
votes
1answer
1k views

Running powershell within a SharePoint application page (C#)

I have a feature that deploys an application page to the layouts directory. I am attempting to update the content (or config?) database by executing a powershell command from c#. The following code ...
3
votes
1answer
3k views

Set SPWeb title on a SharePoint site using PowerShell

I'm having problems setting the title of a root web in a site collection when creating it in an other language then English. When i run the script under using 1033, it works fine the site title is set ...
13
votes
6answers
26k views

Powershell: cannot access the local farm

Yes, I am logged into the machine as an administrator, and my domain account id a farm admin as well. The site is running properly, and nothing seems wrong in SP Central Administration. But when I ...
6
votes
1answer
2k 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 ...
0
votes
2answers
141 views

Getting started with Powershell

I am just getting started with a basic tutorial to Sharepoint and Powershell, following the following commands while in Powershell on my SP server: ...
4
votes
3answers
2k views

Deploying a site template and instantiate it in the same PowerShell script?

I want to create a PowerShell script that : add a farm solution that only contains a site template deploy the solution globally wait for the deploy job to finish create a site collection based on ...
3
votes
1answer
4k views

export / import spweb problem with DataConnectionLibrary feature

I'm attempting to export a subsite from staging to production using powershell and export-spweb and import-spweb. This worked just fine from staging to development. When we try to run this on ...
2
votes
3answers
1k views

Object Reference Not Set Error in SPImport.Run()

I'm trying to move my site from a server to another. I exported my site using Export-SPWeb, moved the data to destination server and ran the function below: (Taken from here.) function ...
2
votes
9answers
2k views

“Specified Cast is Not Valid” in PowerShell When Getting a Display Group for Search

When run, this code returns an error on the last line "Error Calling GetDisplayGroup with 2 arguments, Specified cast is not valid". $site=get-spsite http://xxx/sites/xxx ...
4
votes
1answer
772 views

Set default value for SharePoint Calendar description field

How can you set the default value for the 'Description' field for a SharePoint 2010 calendar list? There is nothing in the web interface for doing this, so I have tried it with PowerShell. $w = ...
0
votes
4answers
6k views

Different Version Problems in Restoring Sharepoint Sİte [closed]

I'm trying to move a Sharepoint site from one Sharepoint 2010 server to another. I used the Backup-SPSite cmdlet to create a backup file. It gives the error below after I try to restore with the ...
12
votes
4answers
28k views

PowerShell: Script to check feature status (enabled/disabled) before activating

I am developing a script to refresh my custom features. Earlier i was just looping through the features and calling Disable-SPFeature and Enable-SPFeature on each items. The issue is when the ...
2
votes
3answers
4k views

How to find the SiteCollection created date in Sharepoint 2010?

I want to find the sitecollection created and last content modified date in Sharepoint 2010, found a SPSite property for last content modified date however could not find any clue to find the created ...
5
votes
6answers
16k 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 ...
2
votes
1answer
2k views

Using powershell enable windows authentication on claims based authentication web application

I am creating a web application using Claims based authentication as follows: $databaseName = "WSS_Content_$port" $authMethod = "NTLM" write-host "Creating $title web application on port $port..." ...
5
votes
5answers
9k 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 ...
1
vote
3answers
328 views

Automated PowerShell scripts

If I wanted to create a PowerShell script how can I make one that include the sharepoint commandlets
0
votes
1answer
861 views

Export-SPWeb permissions

When using Export-SPWeb to export a site does it copy permissions with it? When the export is running can it still be used by others? Once the export is complete will it be usable as before?
1
vote
2answers
194 views

Is there a way to move a site across web applications regardless of site template?

I have our old 2007 intranet upgraded to 2010 via database attach. It's in its own web application and I want to move some of the sites over to our production web application. I'm using a script ...
10
votes
2answers
12k views

How do I check if a site already exists from PowerShell? [duplicate]

I have a script that exports a site and restores it in another web application. I want to check if the target site already exists. Is there an easy way to tell if www.example.org/sites/asite/ is ...
4
votes
2answers
240 views

Uninstalling PowerShell 1.0 before installing SharePoint 2010

While going through the book "Beginning SharePoint 2010 Administration", the author was discussing how to prepare for a SharePoint 2010 server installation on a Windows 2008 R2 server. In that one of ...
5
votes
1answer
2k views

Get total size of attached files on all list items in SharePoint 2007with PowerShell v2.0

Using Powershell, I have to get the total size of all attached files on all list items for a generic list. I tried using the function below but this displays the total length of names for the attached ...
6
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 ...
2
votes
4answers
2k views

Executing powershell script from a timer job

Is it possible to call a powershell script from a sharepoint timer job ? or are there any security issues involved in doing so? Regards, Jeevan
2
votes
1answer
251 views

how to find the user profile property scope which user has set on his mysite - SharePoint 2010?

How can I find the list of colleagues/Team-members for a SharePoint 2010 user? and how can i find the scope for a specific user profile property (eg..birthday--->Everyone, Interest--->My Team)which ...
3
votes
1answer
310 views

Forefront Run Profiles not created when creating user profile service from PowerShell

I'm trying to achieve a full User Profile setup for SharePoint 2010 using PowerShell, including the creation of the Active Directory connection. My PowerShell source code comes mainly from here. // ...
1
vote
1answer
1k views

remote execution of New-SpSite failing

I am trying to create a site collection under a web application on a remote machine using sharepoint powershell's invoke-command as below $secpasswd = ConvertTo-SecureString "Dummy" -AsPlainText ...
6
votes
2answers
1k views

How to reproduce Visual Studio “Deploy” action?

It seems like whenever I am developing a web part and I "Deploy" it from Visual Studio, everything gets deployed and works exactly as I would expect. When I take my WSP and try to install it to a ...
1
vote
1answer
1k views

Setting the top level navigation sort order with PowerShell

I've created a few sites using this command, > New-SPWeb -url "http://server" -Template "STS#0" -Name "test99" -Description "test99" -UseParentTopNav The sites are appearing in the navigation ...
4
votes
1answer
6k views

Using PowerShell and the New-SPWeb command, how can I add a site to a site collection with the -UseParentTopNav argument?

Whats the correct format of the New-SPWeb command when using the UseParentTopNav argument? I'm trying to add a new site, I've tried passing in the following New-SPWeb -url "http://server" -Template ...
1
vote
2answers
1k views

Problem adding sharepoint sandboxed solution using powershell

I have powershell script which will create the WebApplication and SiteCollection and upload the solution. Creation of WebApplication and SiteCollection for user X works fine but Add-SpUserSolution is ...
3
votes
4answers
4k views

Trying to delete a column from a sharepoint document library view - SP2010

I'm trying to delete a field (site column bound to managed metadata) in a view with the following powershell script: $spWeb = Get-SPWeb -identity http://servernamehere/docs/test/sitename $spView = ...
3
votes
1answer
4k views

What does LoadWithPartialName(“Microsoft.SharePoint”) in PowerShell script do?

I'm learning Powershell, I have this line at the top of example script, but it doesnt appear to be necessary. What does it do? Why would it be there? # SharePoint DLL ...
3
votes
2answers
6k views

Adding a WSP through the Management Shell?

I have a WSP that I am trying to install on my development SharePoint server. I used the Management Shell to do this: Add-SPSolution -LiteralPath c:\temp\mySolution.wsp and then: ...
2
votes
2answers
2k views

Powershell error - Expressions are only allowed as the first element of a pipeline

I'm learning PowerShell with SharePoint and I found this simple powershell example $timers = (Get-SPTimerJob | ($_.isDisabled -eq $false) ) $timers And I get this error Expressions are only ...
1
vote
2answers
155 views

Output workflows associated to all lists in a web application

Still very new to Powershell. I've adapted a script I found here to display information I want to see about workflows for a particular list. That looks like this: ...
3
votes
2answers
7k views

Set default value in a document library column via Powershell?

I'm looking for a powershell script that allows me to set the default value for a column in SharePoint. Thanks
2
votes
1answer
946 views

Powershell script to list LastContentModifiedDate

I'm a beginner to Powershell 1.0 and I'm looking to pull some information out of the Sharepoint 2007 farm as we start the upgrade to 2010 planning. This is what I'm wanting to do, but having some ...
2
votes
1answer
449 views

Powershell script to add Content Types

Very new to Powershell 1.0 on Sharepoint 2007. I've got a site collection with many subsites. These subsites all have a document library called Reviews. What I need to do is add a new content type ...
0
votes
1answer
721 views

Powershell script (remote) to copy List items from MOSS 2007 to SharePoint Server 2010

Any one has any ideas if we can write PowerShell script from a server which does not have SharePoint installed to copy list items from a MOSS 2007 site (MOSS server) to SharePoint 2010 (SP2010 ...