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
5answers
2k 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
69 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
635 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
530 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
5k 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 ...
2
votes
1answer
640 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
287 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
629 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
855 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
486 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
723 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
3answers
10k 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
588 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
908 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
288 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
763 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 ...
2
votes
4answers
6k views

Delete a large number of documents from a site

Can anyone tell me the quickest way to delete a large number of documents from a site library if you are an administrator for the site? Any powershell commands?
1
vote
1answer
467 views

OleDbDataAdapter Powershell Connecting to Sharepoint List

I have a situation where I can retrieve results using this query Select * From myList (myList being Sharepoint list) but cannot get results from this select First From myList Where First=JoeBob ...
2
votes
2answers
4k views

How to read items in a BCS external list with PowerShell?

Is there a way that you get information from an external list (created from SPD for a specific ECT) differently than you do from a "normal" SharePoint list when using PowerShell? I did the following: ...
3
votes
2answers
1k views

How to modify a list's template?

I have a list that was created from a Custom List template. Most users have been interacting with it through a calendar view that was created. Now, some users would like to connect this list to their ...
6
votes
1answer
1k views

Adding a list item with PowerShell doesn't trigger event receiver

I have a simple list with an event receiver for the following events: ItemAdded ItemUpdating ItemDeleting I confirmed that the event receiver fires when adding/updating/deleting an item from the ...
2
votes
2answers
2k views

Powershell backup/restore or import/export to keep all document versions?

I need to move a test SharePoint 2010 site collection and database to a new server (and new database). I want to make sure that I keep user security and all document versions. Does backup/restore keep ...
8
votes
1answer
6k views

All Authenticated Users claim

I'm adding items to my list by powershell script. I need to fine-grain user permissions to added items. Code I'm using now: $claim = New-SPClaimsPrincipal -ClaimValue $role -ClaimType $ROLE_CLAIM ...
0
votes
1answer
573 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 = ...
8
votes
4answers
5k views

Problem with HTTP Handler deployed on Sharepoint 2010

I've developed a Visual Web Part for Sharepoint 2010. I've used VS2010 to do that and tested the Webpart in a testing server using VS to do the deployment. But to deploy it on the production server I ...
4
votes
5answers
35k views

List all Site Collections in a Farm

I want to be able to see the number, names, url of all site collections there are in a given farm. Would there be a powershell command to do that?
0
votes
1answer
1k views

PowerShell Attempted to perform an unauthorised operation

I'm trying to add a term store administrator using PowerShell. I'm logged on to one of the farm web servers with a farm administrator account (also happens to be a domain admin account too). I'm ...
1
vote
3answers
3k views

SharePoint 2010 - Enable farm scope feature via powershell

I have deployed a solution with farm scope feature. I am able to activate / deactivate feature via "Manage Farm feature". I want to do this via power shell : When i try to activate feature ...
1
vote
2answers
686 views

SharePoint 2010 - Find WebPart in WebApplication

I´m searching for an good way to find the ContentQuery WebPart in my WebApplication. My plan is to write a PowerShell script and create a url list. I found the following possible ways: SharePoint ...
4
votes
2answers
2k views

Is there a PowerShell cmdlet to delete a Timer Job?

Is there a PowerShell cmdlet to delete a Timer Job in SharePoint 2010?
1
vote
3answers
1k views

Error while import resource file Business Data Connectivity

I am trying to use powershell for importing a resource file in Business Data Catalog but I keep getting the following error Import-SPBusinessDataCatalogModel : The root element of a valid Metadata ...
6
votes
2answers
4k views

Powershell error when trying to hook into UserProfileConfigManager

I am making the following call new-object Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager($servercontext) And get the following error: New-Object : Exception calling ".ctor" with ...
0
votes
1answer
326 views

Create new user profile property from powershell

I have been trying to create a new user profile property using powershell, without any luck. I have been reading up about User Profile service cmdlets but I keep getting an error saying the cmdlet is ...
2
votes
1answer
4k views

Does Update-SPSolution trigger a SPFeature.Upgrade()?

I'm looking into Feature versioning and upgrading in SharePoint 2010 and I don't know exactly if the Update-SPSolution cmdlet triggers a SPFeature.Upgrade(). Are <UpgradeActions> elements ...
2
votes
5answers
11k views

Enable-SPFeature not working

I am using PowerShell script to deploy and activate a feature in the same script. Everything works fine and I can see my feature in the Sharepoint Root folder (14 hive). I run it using Farm Admin. ...
2
votes
1answer
1k views

Powershell script for adding imported user profiles to SP group?

I've managed to import user profiles from our AD. Now I want to add all the imported user profiles into a specific SharePoint group, let's say Visitors, and doing this by using the People Picker takes ...
6
votes
4answers
11k views

How to fix credential issue?

I tried both default credential and user/pass but keep getting 401 unauthorized error. What's the fix? Here is the error I am getting .... New-WebServiceProxy : The request failed with HTTP status ...