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

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
962 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
612 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
910 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
849 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
665 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 ...
0
votes
1answer
3k views

Change Displayname of list columns via powershell

This code works fine. $spWeb = Get-SPWeb -Identity http://xxx $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::GenericList $spListCollection = $spWeb.Lists ...
2
votes
1answer
775 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: ...
0
votes
1answer
2k views

Create a list with powershell

I need to create one list with powershell with the following columns Title Url (255 max length) Description (255 max length) It must be a custom list. There is no need to create site columns or ...
1
vote
2answers
1k views

I cant install a feature

I created a new feature in an existing big solution, I cant just redeploy the solution because it would break many things. What I need is to update the solution and add the new feature, then activate ...
0
votes
1answer
305 views

create a content type managed property via powershell

Regarding this blog post, its very easy to do visually. But for easy deployment on other environments I would like to do this in a powershell script. ...
0
votes
2answers
611 views

Export-SPWeb temporary folder

Anyone knows the location of temporary files that Export-SPWeb uses when exporting sites? One of our servers ran out of drive space when exporting the site and now I can't find the files created by ...
1
vote
2answers
1k views

This powershell runs but why is it so slow

I ran this powershell which automates wsp addition, activate, deploy web parts and it runs fine. However, it takes about 3 minutes to go through the whole process. Is this norm? = = = powershell code ...
1
vote
3answers
2k views

Create Library with PowerShell

I want to create libraries in SharePoint 2010 using PowerShell. So far, so good. I'm using this chunk of code to create the library (actually list, but that doesn't matter) $listTemplate = ...
3
votes
1answer
973 views

I am trying to rename a site using Set-SPSite command

I have created several host-named site collections and now I have to rename a couple. I used the command New-SPSite to create 'http://test1.domain.com' and was able to get everything going fine, but ...
2
votes
1answer
1k views

download profile pictures powershell way

I am using following powershell (that I got from here http://spsatheesh.wordpress.com/2011/06/03/download-all-the-profile-pictures-through-powershell-using-web-service/)so I can download all the ...
0
votes
1answer
2k views

Powershell script to update Navigation.GlobalIncludeSubSites not applying change

I'm using the following PowerShell script to update the Navigation.GlobalIncludeSubSites value from true to false, which is working, except that the changes are not properly applied. By that I mean ...
2
votes
3answers
199 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?
9
votes
4answers
6k views

How to log off user from SharePoint site, if the user has been inactive for 20 minutes

How to log off the SharePoint site, if the user is has been inactive for for 20 minutes? Do I need to redirect user to logout page? How would I count the idle time?
1
vote
1answer
439 views

Delete List Views

I'm looking to mass delete certain views on a list (about 1000). the naming convention used for the views is [user name] [r#] [view name] view. the # is a value ranging from 1-5 and the view name has ...
2
votes
1answer
2k 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 ...
0
votes
3answers
789 views

Is there a PowerShell CmdLet or SharePoint CmdLet that allows reading a Content List?

My eventual goal is to be able to check on new items added to a Content List but I was trying to figure out if there was a CmdLet that could let me access the Content List in a SharePoint Site. I ...
1
vote
2answers
2k views

Powershell: Is disposing of an SPWeb object necissary when its referenced from an SPSIte object?

Edit This is for SharePoint 2007 I have this powershell script: ## Reference to SharePoint DLL [System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, ...
0
votes
2answers
261 views

Change SocialTag Url?

I want to change the url of my solution from mycompany.no to mycompany.com. How can I preserve the Social Tags. SocialTag Url property is readonly it appears. :( Does there exist a powershell or ...
1
vote
0answers
193 views

Changing permission level of a document from contribute to read for members

I need a help .... with a powershell script. I have a document and i need to modify the existing permission level for members from 'contribute' to 'read'. Anyone has any idea how to do that? In ...
1
vote
1answer
2k views

deleting managed metadata using powershell script sharepoint 2010

Deleting managed metadata term stores using powershell script. Was trying with the below script but getting error "Cannot index into null array". Please help out thanks in advance.... Add-PSSnapin ...
1
vote
2answers
432 views

A way of setting custom configuration properties that can be changed via power shell

I have a few custom settings for my feature that I am creating. I want a way to populate these values on install with some default values. However if needed an admin should be able to change the ...
2
votes
1answer
192 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 ...
3
votes
1answer
2k views

How to authenticate when using powershell

I am trying to perform some tasks on user profiles and so, need to connect with different permissions using an account created for that. And, I am doing this with Powershell. Try { $site = ...
1
vote
1answer
240 views

Change owner of all objects

Is it possible to change the owner of all lists, libraries, and pages on SharePoint 2010? Our developers logged in via their personal accounts to the dev server and so SharePoint took their account as ...
2
votes
1answer
802 views

Edit Search Dropdown ScopeDisplayGroup with Powershell Unauthorized

I am trying to edit the Searchbox Scopes dropdown ScopeDisplayGroup using Powershell using the following code (partly backwards engineered from the scope edit layouts page codebehinds): ...
1
vote
1answer
382 views

Unable to get the metadata into list when trying to populate data from csv file using powershell into list

I was trying to import the csv file with 5500 items in it and it is also having metadata items when i try to use powershell script to populate the data from csv to list everything is showing in list ...
1
vote
1answer
2k views

powershell script to add a managed metadata column

$webURL = "http://xxx/sites/wingtipcalculator" $spSite = New-Object Microsoft.SharePoint.SPSite($webURL) $spWeb = $spSite.OpenWeb() $listTemplate = $spWeb.ListTemplates["Custom List"]; ...
0
votes
1answer
650 views

PowerShell script to set default value on a metadata (termstore) column in a SP 2010 document library?

Is there a PowerShell script that will set the default value for a metadata (termstore) taxonomy column in a SharePoint 2010 document library?
4
votes
3answers
5k views

powershell script to add a managed metadata column

I'm looking for a powershell script that allows me add metadata column in SharePoint list. Thanks
3
votes
1answer
388 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
234 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
359 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
8k 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
659 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
7k 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
186 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
794 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
879 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 ...