Tag Info

New answers tagged

0

Would you mind sharing your script?


0

Okay the only answer to this then is. Don't use powershell. This is available through the object model here: http://msdn.microsoft.com/en-GB/library/cc264319%28v=office.14%29.aspx


0

I made a very similar code to @TempaC s answer. Feel free to comment if someone see room for improvements. I have tested this and it worked for my case. #Defining DocLib and MySite $mySiteUrl = "https://mySite.url/" $sourceWebURL = "https://site.url/" $sourceListName = "ListName" #Connect to the User Profile Manager $mysite = Get-SPSite $mySiteUrl $context ...


1

Does the solution provided here work for you? http://social.technet.microsoft.com/forums/en-US/sharepointcustomizationprevious/thread/40dd844f-3182-4fa1-b779-ebfba8c1d45e from the link: #My Site URL $mySiteUrl = "http://mysite/" #The part of the picture URL you are trying to find $pictureLibUrl = "http://mysite/<YourPictureLibraryName>/" #The ...


0

Solved, If you are creating variation labels using script/OM by manually adding labels (SPItems) into the hidden list (variation labels) for the first time (new site), because the variation home value are not stored on variation label list, there is no way to set the variation home when you have your source label created (using your code/script in this ...


0

If all of that failed, why not just add Javascript to the master page that uses setTimeOut() to redirect the user to the logout page after 20 minutes? By default, this page is at /_layouts/SignOut.aspx but your FBA may have specified a different one.


1

I have solved my issue. My list's display name contains the following character : é I have changed the encoding of my PowerShell script to UTF8. Now I can retrieve my list by its display name.


0

I believe you will have to retrieve a List by it's internal name, not the display name. Especially if the display name consists of two or more words. This is, at least, case with List items. Examples on how to change list settings using PS script can be found on http://get-spscripts.com/ - Part 1 and Part 2, where the author uses list's name to manipulate ...


0

The documentation is a little thin for creating retention policies. Hopefully this will get you started: http://blogs.msdn.com/b/jfrost/archive/2011/03/15/setting-custom-expiration-programmatically.aspx


1

Combine two lists like in the answer on SE here, or use a tutorial by Melick Rajee Baranasooriya from nothingbutsharepoint.com. A tutorial on creating custom Timer Jobs can be found on MSDN. Sharepoint list-synchronization with Powershell can be found on Jesper Christensen's blog.


1

Basically you have to create a new list (the merge list) the all the items from the two lists and add to the merge list: $web = Get-SPWeb http://mysite $list = $web.Lists["firstList"] $merge = $web.Lists["mergeList"] $items = $list.GetItems() foreach ( $item in $item ) { # do job $newItem = $list.Items.Add() $newItem["Title"] = $item["Title"] ...


0

I've solved it. Needed to run the following code to unprovision the offending application pools: var pool = Microsoft.SharePoint.Administration.SPWebService.ContentService.ApplicationPools["[Name of pool]"]; pool.UnprovisionGlobally(); This removed the application pool from SharePoint allowing me to recreate the web application.


1

I don't have one that takes a specific object as input, but this may help. It will list out the role assignments on web, list, items for users and SharePoint groups. Start-SPAssignment -global $sites = Get-SPsite -limit All foreach ($site in $sites) { foreach ($web in $site.allwebs) { Write-Host -BackgroundColor ...


0

There's no way I know of to ignore the version conflict, you're going to have to restore that backup to a farm (probably in a vm or something) that is running the same version as the backup, then upgrade that farm and create another backup that can be restored into your second farm. Export/Import may work, but it's not going to directly pull from a ...


1

Provided you have added list as a stp file in List template gallery: $site = Get-SPSite http://site foreach($web in $site.AllWebs) { $listTemplates = $site.GetCustomListTemplates($web) $web.Lists.Add("Your name for list", "", $listTemplates["Your List template name"]) } Remember, you can't pass the template ID in the Add method but ...


2

Here is an example of creating a list: Create a list with powershell Then this script will loop through each site in the site collection $siteURL = "http://sp14fdev01/" $site = Get-SPSite($siteURL) foreach($web in $site.AllWebs) { } Simply add your list creation code inside the foreach. Note you will want to check to make sure the list doesn't already ...


0

Upon deactivate and then activate and finally recycle application pool solve my problem.Now the web part is shown in gallery.


1

I don't know why this happens but I've seen it before. So much so that when I built my code on top of this I put a try catch in and had it do the command a second time before I was convinced that I didn't work as expected.


0

I tried all of the above with no success, but managed to bring my MM term store back online with a stop and start of ALL running instances of the Managed Metadata Web Service from the Services on Server page


0

Wow. It's just incredibly slow. In my case it hangs after those lines for about an hour before producing any additional output in the PowerShell host or writing any files to the backup location. As documented elsewhere, both the user running the Backup-SPFarm cmdlet and the user (service account) running the database service need permissions to write to ...


1

First, make your backup directory on your SQL Server, if possible. This gives the fastest backup performance. You need to share out your path (e.g. make a share named BackupTest from C:\backuptest), giving Everyone Full Control on the Share permissions (this is usually fine as we'll override the permissions at the NTFS permission level). Next, remove ...


1

To create a Document library: New-SPList -Web http://spwebaddress -ListTitle “Enter Title Here” -ListUrl “ListURL” -Description “Description” -Template “Document Library” To upload to a folder within document library you should get the spfolder then add to it... $folder=$web.GetFolder(“FolderName″) $folder.Files.Add($folder.Url + “/” + $file.Name, ...


0

make sure you can see the file in 14 hive and that your using the correct guid/url! 14/Template/Features 9 times out of 10 its the wrong guid or spelt incorrectly ;) / wrong url


0

A way to update all content databases. $SourceDB = Get-SPContentDatabase CorrectDatabaseName Get-SPWebApplication | ForEach {$_.ContentDatabases} | %{$_.SearchServiceInstance = $SourceDB.SearchServiceInstance; $_.Update()}


0

Palani, Get-SPWebApplication "http://server-name:8080"|Get-SPSite -limit ALL|Get-SPWeb -limit ALL|Select-Object Title,Url,AssociatedOwnerGroup This will give you Title, Url and the Associated Owner Group for the site... You can than reference the powershell script: PowerShell Script for SP2010 to pull Farm and Site Collections Administrators Try merging ...



Top 50 recent answers are included