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

4
votes
4answers
12k views

How to activate feature using powershell script?

I need to activate specific feature to all site collection which is inside the particular web application using powershell script?
2
votes
1answer
713 views

How can i update a cross site list (all items) from another list with the same ID numbers

I am trying to copy a list from one site to multiple other sites, i have tried to do this in powershell on an hourly basis using scheduled tasks, i was intending to write a powershell script to do the ...
3
votes
1answer
1k views

Update vti_author in SPDocumentLibrary item using PowerShell?

I want to update the property vti_author in an item in a SPDocumentLibrary, but it doesn't work. The items original vti_author is the same even after running this script, why? $spSite = Get-SPSite ...
1
vote
1answer
606 views

How to add file to a SharePoint Library that is in a subsite

I can successfully connect to the "Shared Documents" library at root site and add a file to it. What I can't do is connect to a library that is a few layers down so I can add the file: The Root Site ...
1
vote
2answers
2k views

PowerShell to Remove Site User Permission

I am looking for some help removing a User Permission from a site using PowerShell.
4
votes
3answers
5k views

Get name of Farm account using Powershell

How can I get the name of the Farm account ? I can see it listed in Get-SPManagedAccount, but do not see any properties on the SPManagedAccount objects to be able to dynamically filter by and ...
0
votes
2answers
575 views

foreach “Webs” works on dev but not in staging

I had a script I was working on a while back that got put on the back burner, but now I'm trying to finish it up, and I thought I had reached that point. I was running this script on our development ...
3
votes
2answers
1k views

PowerShell - Create Search Service App Pools (All 3)

How many App Pools are created when you create the Search Service Application? How can I create all the Search Service Application App Pools using PowerShell and give them all unique names? I've ...
0
votes
2answers
2k views

Using Import-SPweb -IncludeUserSecurity slow

I am quite often asked to move lists/document libraries etc. between Sharepoint sites and retain the Author, Modified by data and the like. Now I can do this fine using the -IncludeUserSecurity switch ...
0
votes
2answers
285 views

Is it possible to start a workflow instance on a list item when the workflow is not associated with the list?

I am writing a powershell script to find out all the In-Progress workflow instances in a site collection. Usually, the suggested way to do this is to find associated workflows to a list and check the ...
0
votes
1answer
2k views

Getting SPUser object from “Group or People” SPListItem field

I am using a Powershell and CAML query to return items from a list. The list contains a "Group or People" field in which I have not seeing how to get the email and login information of the user. I ...
0
votes
1answer
1k 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
181 views

how to set webapplication.RightsMask via PowerShell

trying to change one of the rights assigned in RightsMask with Powershell on a SharePoint 2010 server. $webApp=get-spwebapplication http://myWeb $webApp.RightsMask I want to be able to enable/disable ...
1
vote
1answer
872 views

Using get-spuser returns null SIDs

I am very new to SharePoint (2010 in this case) and have been tasked with writing a PowerShell script that will synchronize some information between Active Directory and SharePoint users. I figured ...
1
vote
2answers
455 views

Share Point Activity feed power shell script error

#Add SharePoint PowerShell SnapIn if not already added if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin ...
2
votes
2answers
3k 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' ...
0
votes
2answers
2k views

add columns to a list via powershell

I am trying to do the following but I have some exceptions, I dont know whats wrong with this. Update 2: $site = Get-SPSite -Identity "http://url/workspaces/TS1/" $list = ...
1
vote
2answers
751 views

How to determine SharePoint version used during backup creation in order to restore it?

I have a SC backup, but when trying to restore it on my test environment with PowerShell, got the following error: SharePoint server version mismatch. SharePoint versions on both servers should match. ...
1
vote
2answers
466 views

Powershell query features returns wrong result

I'm currently writing a powershell script which upgrades a set of solutions then a set of features from those solutions. After the solution upgrades everything looks great until I Call QueryFeatures ...
2
votes
1answer
634 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 ...
0
votes
2answers
2k views

SharePoint 2010, Powershell - problem with looping through all Document Libraries, create view and set it as default

I'm hoping that someone can give me a hand with two issues in Powershell that I have with modifying views in SharePoint 2010. I've had some help on this from someone over at stackoverflow but hasn't ...
1
vote
2answers
1k views

Activate Feature in Powershell and specify custom properties

I want to activate a feature with custom properties. It is easy to do in onet.xml by providing Properties: <Feature ID=“78277796-98D9-4276-B7D2-E3374AAC43D8“> <Properties> ...
1
vote
2answers
2k views

Running Sharepoint PowerShell from C# code

I am looking for a way to run PowerShell from C# code. What is more, I need the code to activate the following features in my Sharepoint site that gets created: 1) SharePoint Server Publishing ...
0
votes
1answer
413 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
669 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
2k views

delete field (column) from a list powershell, error Collection has been modified

following is my code: foreach($field in $list.Fields) { if($field.StaticName -eq "temp1" -or $field.StaticName -eq "temp2") { if($field.Id -ne $depId) { ...
0
votes
2answers
446 views

sharepoint 2010 custom wiki library

I am trying below powershell script for change wiki content Add-PSSnapin microsoft.sharepoint.powershell -ea silentlycontinue $web = Get-SPWeb "http://dooku/enterprisewiki" $list = ...
2
votes
1answer
2k views

Powershell CheckIn Throwing null-valued expression error

I've got a script that goes through subwebs of a sie and adds a webpart to the page. Everything is functioning correctly, until it's time to check the file in. I get the following error: You ...
2
votes
1answer
814 views

SharePoint 2010 People Picker Does Not Resolve USERS/GROUPS.Please Help!

I am Running SharePoint 2010 Site , recently we migrated Web App from Development Server to Production Server(Different Domain Controller). In Development Server I used to be able to Use People ...
0
votes
3answers
2k views

SPSite Object Problem When Trying To Loop Through Sites

I'm working in a Sharepoint 2007 environment. I'm trying to loop through a site, and it's subsites, and add a webpart to any pages found. #Add SharePoint assemblies ...
2
votes
1answer
1k views

Indexing sharepoint lists with ps

I would like to index a column in a list with powershell. I have a problem, when i retrieve the list how can i set what field should be put to index? Is there a special command, can anyone provide me ...
1
vote
4answers
5k views

Detecting Solution Deploying Status

I am Looking for a way to detect if the a solution is deploying the following code does not seem to return "Deploying" like I see in central admin. $wspID = Get-SPSolution -Identity 'mysolution.wsp'; ...
2
votes
3answers
2k 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 ...
1
vote
1answer
1k views

Cannot Uninstall UserSolution: non-existent or broken web

I'm having some issues which I think are caused by some poor deployments. I'm trying to remove them but I'm running into an error. Uninstall-SPUserSolution -Identity WspImportProject1.wsp -Site ...
0
votes
2answers
564 views

Webservice - Create SPWeb

I want to create a script with PowerShell and Webservices for a site collection admin. My plan is that site collection admin can use the script to create new SPWebs. I don´t found any good examples ...
0
votes
2answers
4k views

Solution Deployed Successfully but Web parts not available

I'm running into a deployment problem in my sharepoint 2010 environment. I built a small 'Hello World' type web part in visual studio 2010 and then deployed to my development environment via visual ...
2
votes
1answer
716 views

Hide Listtemplate from Create Dialog in PowerShell

I want to set the "Hidden" attribute for a listtemplate to hide it from the create list dialog. I need a solution where I can switch visibility of listtemplates on a per web basis. First I tried this: ...
1
vote
2answers
302 views

Data View Webpart

I've read so many good things about Data View Webparts and would love to use one in a pagelayout I have developed. The issue is, SharePoint Designer has been locked down and I have no access to the ...
0
votes
2answers
4k views

Restore-SPSite reports “No content databases are available for this operation…”

I've run a site collection backup using Backup-SPSite. I then deleted the Site Collection using CA. Then tried to restore is using Restore-SPSite. Got the error "No content databases are available ...
0
votes
1answer
144 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
2answers
441 views

Using PowerShell vs. cmd.exe in SharePoint development?

I've just started reading various books on SharePoint development and have come across a wonderful tool called PowerShell. From the looks of it, it could replace the old DOS tool cmd.exe. There are a ...
2
votes
2answers
1k views

PowerShell Scripts

Does anybody know if there's some way to delete items from an SPList using PowerShell scripting? If is this possible, has anybody any good tutorial? Thanks!!!
2
votes
3answers
263 views

Deny user access from SharePoint Native but allow it from custom application

How can i restrict a user from entering SharePoint - unless he is using my custom application? For example, a user tries to open http://Mysite , he gets an access denied error. But as the same time, ...
0
votes
2answers
634 views

Hide Site Pages link from Libraries

I have a sharepoint portal which have hundreds of subsites. The users can create new site and by default when a site is created it has Libraries, lists and discussions link out of the box. I got a ...
2
votes
1answer
1k views

change maxlength of an existing column in a list via powershell?

I have the following code to create a list, however I need to increase via powershell the maxlength of one column $spWeb = Get-SPWeb -Identity http://ost-dev1.ciredev1.local $listTemplate = ...
0
votes
0answers
936 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 ...
1
vote
1answer
890 views

Powershell and SPSecurity.RunWithElevatedPrivileges

I have a couple MOSS dev environments that need to have a script to restore the content databases from production. Part of the script has to set the site collection administrators to the user of the ...
0
votes
1answer
3k views

Powershell command to copy file from Document Library to a fileshare

I have created a WorkFlow to create a document populating it with data from a list. I now need a powershell script that can copy the file in the document library to a file share on our server. I am ...
0
votes
2answers
2k views

Create managed property via powershell?

Is this possible to do via powershell? http://www.glynblogs.com/2011/01/create-a-content-type-search-refinement-panel-in-sharepoint-2010.html#comment-23134 there is nothing to improve in the ...
0
votes
1answer
697 views

Synchronize Documents between SharePoint Farms

I need to synchronize certain documents between 2 Doclibs on different SharePoint Farms. This is a 'one-way-sync' meaning all changes should be replicated from A to B, not from B to A. You can ...