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 ...
2
votes
6answers
5k views
Backup and Restore SharePoint 2010 SiteCollections
I am getting an error "Backup version is different" while restoring SiteCollections from one web application to another on the same SharePoint server farm. Following are the steps I was executing when ...
2
votes
2answers
1k 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 ...
2
votes
4answers
642 views
How to download a sharepoint aspx page from server using powershell
I made some changes to sp aspx pages on a environment. I want to move these changes to my TFS. Usually one takes the pages using designer, save it to the desktop, and save that to TFS.
But is there ...
2
votes
3answers
3k 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?
2
votes
1answer
2k 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
4answers
6k 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
2answers
979 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 ...
2
votes
3answers
2k views
How to apply new page layout to all existing pages in a site?
I really need your help.
I've created a new page layout in SharePoint Designer 2010 and I want to apply it to all existing pages in a site. Another thing to note, some subsites and pages use ...
2
votes
4answers
1k 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
842 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 ...
2
votes
3answers
881 views
SharePoint 2010 - Add WebPart to a Web with PowerShell
I want to add a webpart to a great number of existing pages.
Is there any PowerShell command to add a webpart to a webpart page?
2
votes
4answers
2k 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 ...
2
votes
3answers
2k views
Why are Taxonomy Term Stores always empty?
Using the following code I should be able to access the Taxonomy Term Stores:
$site = new-object Microsoft.SharePoint.SPSite("http://localhost")
$session = new-object ...
2
votes
2answers
93 views
SharePoint 2010 - List CanReceiveEmail Disable/Enable
After migration from SharePoint 2007 to 2010 the list feature to receive emails is not working on migrated sites.
The functionality is enabled in the UI and when I´m checking $list.CanReceiveEmail ...
2
votes
2answers
208 views
Powershell Enumerate through all site collections but not include one specific site collection
I am partially not even sure how to Google this question because whatever I type never seems to bring back any relevant search results.
I currently have a working script that is set to go through and ...
2
votes
1answer
321 views
Can You Add a WebPart to a Wiki Home Page via Powershell?
Salvete! Is it possible to add a webpart to a Wiki Home Page via Powershell? I have 100 sites for which I need to add a web-part to their home-pages. I know this is easily possible with normal ...
2
votes
1answer
543 views
Why am I still getting quota reached upload error after increasing the quota for a site collection?
A user was trying to upload documents to their site collection and reached the quota limit. I increased the quota for him but he is still getting the same error that the quota has been reached when he ...
2
votes
1answer
663 views
How do you determine the Consumers for a given Content Type?
Is there a quick powershell script to find out all the consumers who are consuming a given content type? If yes, how do you do this with powershell?
2
votes
1answer
336 views
Enabling a Sharepoint Feature with Powershell
I am new to PowerShell and have been asked to modify a script that is used to activate features on a site. The script has some latency issues between the two feature activations, so I decided to make ...
2
votes
2answers
1k 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 ...
2
votes
2answers
2k views
Do powershell modules load automatically when opening the SharePoint 2010 command shell?
I have a custom module and want to load it in the command shell without having to call it explicitly each time I delve into Powershell.
Does it load automatically?
If not, how can I make it load ...
2
votes
1answer
44 views
RoleAssigments are being assigned by default to all new pages
I am pretty new to SharePoint, so please let me know if there is some more info or clarification required. I am creating a webapplication with certain SP groups, libraries and pages in that order by ...
2
votes
1answer
120 views
Is there a service that controls PSSnapin Microsoft.SharePoint.Powershell?
Got a service call yesterday that the backup hasn't been done for three months. Looking at the task scheduler history, there where no errors. So I run the PowerShell script myself, and got an exeption ...
2
votes
1answer
2k views
How to update a deployed content-type?
I created a content-type and applied it inside a document library. Now, if I go to the conent-type gallery and delete one of the fields, and then go back to the library and view the available ...
2
votes
1answer
234 views
Problem with PowerShell script in Tasks Sheduler Windows Server 2008 R2 - SharePoint Shell Access?
I have a problem with PowerShell script in Tasks Sheduler in Windows Server 2008 R2. I try to run Sheduler Tasks which run batch file which run PowerShell script to Backup Farm and while I choose "Run ...
2
votes
2answers
2k views
Change Document Library folder's Modified timestamp to latest timestamp inside
I have a Sharepoint 2010 Document Library with a range of subfolders and some files within each of them. The problem is, right now every subfolder has the same Modified timestamp, and I want each ...
2
votes
2answers
2k views
Sharepoint Master Page Powershell
We have over 80 Site Collections in our Web Application is there a way through power shell that i can set the same master page for all the site collections.
2
votes
1answer
493 views
Can't save webpart after editing with PowerShell
I'm using the code below to edit the image in a webpart:
$webPartCollection = $web.GetWebPartCollection("default.aspx","Shared")
$imagePart = $webPartCollection | Where-Object { $_.Title -eq "Site ...
2
votes
1answer
124 views
Is there a way to execute commandline-arguments via code from a feature/webpart (Sharepoint 2010)?
I mean, for example, something like a deployment. Is it possible to force something like this from within a webpart using the "standard" sharepoint functionality?
Using the central-administration is ...
2
votes
2answers
2k 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:
...
2
votes
2answers
400 views
Updating relative links and images in wiki library
I have a wiki library which contents is automatically copied onto another site. Some of the pages in the library contain images, the links to those images are relative.
Example:
page: ...
2
votes
2answers
3k views
SPSite.allwebs returns error
First of all sorry if this is an obvious question, I searched a lot but can't find the solution.
When I open an spsite in powershell like this:
$spsite = Get-SPSite "https://adress"
And then I ...
2
votes
2answers
2k views
Moving a Discussion from a Discussion Board to another?
I have a SharePoint 2010 Discussion Board and it has many Discussions. Would like to move a discussion from the discussion board to another in the same location (under same site collection).
I ...
2
votes
2answers
456 views
MOSS2007 PowerShell vs Console Application
I'm looking for a few examples of when you would be better off writing a PowerShell script vs writing a Console Application to perform some operations against the Object Model in a MOSS2007 or WSS 3.0 ...
2
votes
1answer
37 views
PS Script to output members of targetted groups into a file
I have an auditing / documentation requirement around my SP Environment upon which members of specific groups need to be listed. Now, rather than doing this manually via screen-shots and / or cut and ...
2
votes
2answers
99 views
Powershell script to retrive all the customization done on sharepoint site
How to write a powershell script which will display the customization done on a sharepoint site - customizations like custom features, custom workflows, custom site def, infopath form etc...
2
votes
3answers
1k views
PowerShell and the client object model: “The collection has not been initialized”
I'm trying to grant a user permission to a SharePoint site using PowerShell and the client object model. The code I'm using is as follows:
# Setup context
$context=New-Object ...
2
votes
2answers
2k views
get Items from Sharepoint-list
I've created a list in sharepoint by using visualstudio. The List is based on a custom contenttype. Because I want to delete the title field I've switched off inheritation of the Contenttype:
...
2
votes
3answers
498 views
Installed TFS 2010, where is SharePoint Management Shell?
I just did a fresh (single-server) install of TFS 2010, which has all the Sharepoint (WSS 3.0) components. But I want to move the SharePoint log files to a different drive, and all instructions point ...
2
votes
2answers
2k views
Can I edit a publishing page using Powershell?
I have a bunch (technical term) of publishing pages within a single subsite of my site collection that contain a broken link. I'm wonder if it's at all possible to use Powershell to perform a 'global' ...
2
votes
2answers
1k views
Mounted Office 365 sharepoint workspaces lose connectivity - how to fix?
I'm trying to get my sharepoint workspaces on office 365 to mount like network drives. I can achieve this following microsoft guidelines, but after a while this fails. The user has to login again to ...
2
votes
1answer
492 views
System.ArgumentNullException on feature enabling
I created a vs solution with
site columns
content type
list template
list instance.
It compiles, it installs correctly, except when I click on activate I got the exception on the ULS logs:
...
2
votes
1answer
152 views
How to check if there is any active solution deployment running on the server?
Is there a way to know if there is any active solution deployment running on SharePoint server? I'm wondering how to do this using a PowerShell script?
2
votes
1answer
1k views
Powershell script to update pages. Dispose page afterwards?
I'm using a PowerShell script to update page titles and PublishingPageLayout's in a particular web that has 391 pages. However, I'm finding that the longer the script runs, the slower each pages is ...
2
votes
1answer
4k 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 ...
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 ...
2
votes
2answers
2k views
Enable feature of SharePoint sandbox solution
I have a .wsp file that is deployed to the remote server by powershell script. The solution is deployed successfully and I can see the solution feature in the site collection features, I can activate ...
2
votes
1answer
1k views
Problem retracting a Sharepoint 2010 Foundation solution
I am retracting a globally deployed solution via Central Administration. Here is the info
Name: familycareprl.wsp
Type: Core Solution
Contains Web Application Resource: No
Contains Global ...
2
votes
1answer
1k views
Powershell - Update column with managed-metadata
I have used following PS script to update a manage metadata column. Not sure how to go by updating a managed-metadata column. I know I need to only populate with "10;#Wholesale Agreement" in ...
2
votes
1answer
215 views
Deleting Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows
how delete Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows.


