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)

3
votes
1answer
528 views

How to create a content source of type “web” with the option “Only crawl within the server of each start address” via powershell

I have a requirement to create a content source of type "web" with the option "Only crawl within the server of each start address" via powershell. I am trying the below command : ...
1
vote
1answer
239 views

Build and package SharePoint2010 solution from PowerShell?

Are there any scripts to build and package a SharePoint2010 solution from directly from PowerShell, instead from Visual Studio 2010?
1
vote
0answers
422 views

Multiple Propset Guid Mapped to a Category

I'm working in a powershell scrip for F4SP 2010 server that reads lines from a .csv file and creates the mappings between managed properties a crawled properties. I don't have much problem, just a ...
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 ...
4
votes
2answers
11k views

How to use GetItems in Powershell to retrieve list items

I'm having issues with this powershell script below. It does work with SP 2007 but won't work with Sp 2010. My goal as you can see is to filter the list returned using the field Date - 1. But getting ...
3
votes
1answer
790 views

How to remove duplicate EventReceiver entries

Lately i had a bug that time-to-time added duplicate event receiver entries in SPEventReceiverDefinitionCollection. So how do i easily enumerate and remove these duplicate entries?
2
votes
2answers
9k views

Permissions error setting up SharePoint 2010 PowerShell account privileges

SharePoint Foundation 2010 SP1 on Windows Server 2008 R2 Std SP1 (Domain Controller) in a simple farm with a single SQL Server 2008 SP1/Windows Server 2008 Std SP2 backend I realise installing SP on ...
3
votes
2answers
198 views

Migrating changes from development site to staging site without doing a content database backup and restore

I wanted to find out the best practice to migrate changes from a development site to staging or production site. I think there should be a better way than backing up the content database on ...
1
vote
2answers
1k views

Get all the machines in a SharePoint farm

I'm writing a really big script which will get a lot of info from my farm. I'd like to make it work dynamically, so I would need to: Get all the database servers in the SharePoint farm Get all the ...
2
votes
2answers
2k views

Restore-SPSite issue with versions

I'm trying to restore a SPSite using Restore-SPSite command. The command returns : Restore-SPSite : Your backup is from a different version of Microsoft SharePoint Foundation and cannot be ...
4
votes
2answers
1k views

Get the check out file based on users Name

My environment is SharePoint 2007. I have write a Power shell script to get the file names and checked out by username and their email id. I am successfully able to get these details. Now I want to ...
3
votes
1answer
893 views

Moving list from one environment to another while preserving the GUID

I have a list template (.stp) file. I would like to restore the list and its contents in any given SharePoint environment. The conditions for restoring are listed below: Restore the list to any ...
6
votes
2answers
681 views

SharePoint 2010 Documentor

Is there already existing a tool , I think "documentor" can be his name for Sharepoint 2010 that can output a form of documentation with a description of all db, web application , sites, sub sites , ...
1
vote
1answer
90 views

Can not turn of notifications (SP 2010)

I'm about to update 300 items in a list that I know lots of users are subscribing to (notification by email on every item update event). I've tried turn this off by using STSADM: stsadm -o ...
1
vote
1answer
1k views

Migrating MOSS 2007 to SharePoint 2010 giving the error “Invalid Object Name sites”

I am migrating SharePoint 2007 publishing site to SharePoint 2010. These are the steps I have followed 1. Backup the content database from the SP2007 machine. 2. Restore that database in sql server ...
3
votes
1answer
3k views

Possible to set the default page layout for a site using Powershell?

I have a bunch of sites in which I would like to change the default Page Layout. Is there a way to set this to a custom Page Layout using powershell? (The page layout is already on all the sites) ...
1
vote
4answers
4k views

How do i get the url for the mysite host from powershell?

I need the url of the mysite in SharePoint 2010 server. In my farm i only have one MySite host (and one corresponding user profile service) configured. I need the information on one of the farm ...
1
vote
2answers
768 views

turn off alerts on an announcement list

How can I disable email alerts for an announcement list (that is, prevent users from signing up for alerts on this list)? I looked at the list settings in the UI, but did not see a way to do this. I ...
4
votes
4answers
7k views

Possible to checkout a file using PowerShell?

I have a powershell script that inserts webparts onto a page. The problem is that if I don't have the page checked out it will throw the following error: Exception calling "AddWebPart" with "3" ...
0
votes
0answers
756 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
1k views

How to add an instance of a custom webpart to a web page using PowerShell?

I found this article which does a very good job explaining how to add built in web parts (like the content editor webpart). Unfortunately when I tried to add my own I couldn't get it to work. I have ...
3
votes
5answers
3k views

Access Denied Retrieving Sites (Webs) Using PowerShell

My goal is to retrieve all the alerts for a given domain user, in SP 2007, then delete these alerts. I have referenced the following script on this site. In DEV environment, when I run the script I ...
0
votes
1answer
73 views

Searching Site Farm / Collections for instance of URL

I am looking into a way to search for a specific URL within SharePoint. I have seen the solution that searches with PowerShell script for searching lists for specific links? and ...
0
votes
1answer
716 views

Remove a Policy Resource with Powershell

I am having trouble deploying a Custom Retention Policy, and have ended up with a hanging policy resource that is keeping me from activating the retention policy. I was wondering if there was a way ...
1
vote
1answer
548 views

move my site profile information from one server to another

I used central administration site collection backup to back up a My Site, and then used PowerShell restore-spsite to restore it on another server. All of the content moved, but the profile ...
1
vote
1answer
7k views

Updating Sharepoint List items

I got a custom Sharepoint list which has the following list items Hostname - IP - OS - CPUs - RAM - Disk Server 1.1.1.1 Server 2003 3 8 Disk C: 20gb If i then ...
3
votes
1answer
686 views

Connect all SSRS Reports in SharePoint library to DataSource using Powershell

We are migrating MOSS to SP2010 and have a library with hundreds of SSRS reports that use a Shared DataSource (in SharePoint Integrated mode.) Since the ReportServer database location has also ...
1
vote
1answer
294 views

Updating Sharepoint List items

I got a custom Sharepoint list which has the following list items Hostname - IP - OS - CPUs - RAM - Disk Server 1.1.1.1 Server 2003 3 8 Disk C: 20gb If i then ...
0
votes
3answers
1k views

error when running Set-SPProfileLeader in PowerShell

I want to manually set my organization's leader in SharePoint, using the following script from TechNet. I modified the script to have the correct user profile service application proxy ID, and the ...
3
votes
1answer
3k views

PowerShell Script to execute a console application

Can you please let me know how to run an exe or console application through a powershell script in SharePoint 2010.
2
votes
2answers
670 views

Office 365 SharePoint, can you script (powershell) or code provisioning of the site?

I am trying to figure out if you can use Powershell with Commandlets to provision a new site. Basically if a customer calls for our solution can I write script that sets it all up? (Creating the site ...
1
vote
3answers
2k views

How to restore Site Collection from one environment to another

I am developing my intranet portal in office and created the same environment at home even the domain name and the users I am working with. I have taken the backup of site collection through central ...
4
votes
1answer
947 views

Schedule the copy of a document to a network location

I'm looking to copy a document to a network location on a scheduled basis. Anyone have a best practice on how to do that? I thought I could write a work flow, but since I want to copy to a ...
0
votes
1answer
510 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 ...
4
votes
3answers
4k views

Enable versioning on all lists and libraries

Is it possible to enable versioning on all lists and libraries across all web sites of a site collection? Thanks.
1
vote
2answers
793 views

Get list of items awaiting publishing in web site

Is it possible to get a list of all items (list items, publishing pages, library items) that are checked out and not published yet? We've noticed that if we use the content deployment feature in ...
2
votes
1answer
1k views

STSADM.exe, PowerShell v2.0 and Management Shell

What is the difference between the three? STSADM.exe PowerShell v2.0 Management Shell I understand you can run powershell scripts in the management shell, but I thought I remember reading that ...
11
votes
4answers
12k views

Restore-SPSite to the same content database

I ran Restore-SPSite on my server from a backup. I then deleted the site collection and did it again but got the following error: Restore-SPSite : The operation that you are attempting to perform ...
1
vote
2answers
611 views

Microsoft.Office.Server.UserProfiles.UserProfileManager.GetEnumerator() what does it return?

I know it returns an array of user profiles but how do I see what fields are on the profile so that I can maniplaute it.
3
votes
2answers
2k views

Restoring SPSite not working with different versions

I'm having issues with restoring my .bak files to my own sharepoint environment due to version difference. My version is currently: Sharepoint Server with Enterprise Client Access License Ms ...
0
votes
1answer
1k views

Want to invoke an SSIS package to process an uploaded file - Do I use Workflow and Powershell?

The scenario is that Excel files are uploaded to a folder in SP2010. When a new file is loaded, I would like to use a Workflow to call the SSIS package that processes that file into a Database and ...
4
votes
1answer
1k views

powershell not finding shared document library?

There is a document library called "shared documents" in the site I type at the prompt when running this script. The script returns the titles of several document libraries, but not "shared ...
2
votes
1answer
151 views

automatically create metadata properties in the search application

I want to create a number of metadata properties in the search application in sharepoint 2010. I don't want to do this myself. I know it is possible to create a powershell script to create the ...
1
vote
2answers
3k views

use powershell to check whether or not a sharepoint list is a document library

I want to make some changes to all of the document libraries in a site collection, but not make changes to any other lists. In PowerShell, how can I check whether a list is a document library, or a ...
0
votes
2answers
4k views

Restore site collection using powershell : Getting not found error

Restore-SPSite -Identity http:/snk145:60000/ -Path "D:/MS.bak" I am trying to restore a site collection (SharePoint 2010) to other from a backup file, The term 'Restore-SPSite' is not recognized as ...
6
votes
1answer
1k views

Obtain Default Content Access Account via PowerShell

As part of farm configuration audit, I need to obtain the current content access account. While I've found several resources for setting the default content access account for search using PowerShell, ...
0
votes
4answers
1k views

Stopping Powershell script execution on error in SharePoint 2010

I have SharePoint Powershell Script in .ps1 format and it includes 4 commands. When I run this script, it does not stop if any error occurs in middle. For example, if error occurs at 2nd command it ...
1
vote
3answers
1k views

Automated Sharepoint Task Creation with Powershell

This is a cross-post from stackoverflow, upon the suggestion of a user there. My organization is experimenting with new processes to coordinate developers as they integrate their code into our main ...
0
votes
1answer
296 views

Edit SharePoint 2007 Profile PersonalSite by code?

Does anyone know how to programmatically change the Personal Site field in their SharePoint Profile programmatically? I can do it via the GUI on the SSP server, but that takes an unacceptable amount ...
0
votes
2answers
778 views

Feature Upgrade Retract Deploy Power Shell Commands

I have heard that one way that you can upgrade a feature in SharePoint with new files is to do a retract deploy. I believe this is what Visual Studio 2010 does when you do a Deploy. What are the Power ...