Tag Info

Hot answers tagged

4

You cannot edit the Name directly, because the Name of the TermStore is simply the name of the MetadataWebServiceApplicationProxy. So what you have to do is to rename that one instead. In your example, you have to get the SPMetadataServiceApplication first, find the right proxy and rename it. This should look like this, assumed that your ...


4

Nico, I found a source that may help you immensely. The following link walks you through how to use a PowerShell script to import a list of users from Excel and create them for FBA. Importing and Exporting Data in Extranet Collaboration Manager (ExCM) 2010 You can also download the PowerShell source code from this link. It looks like the code creating ...


4

John Q: First you need to dig deeper into the field definition using SharePoint Manager 2013, and observe if property 'AllowGridEditing' exists? A: The property doesn't exist so give PowerShell a break ;) Why: In SharePoint 2013, client-side rendering (CSR) provides a way to control the output/design of your fields and set of controls by leveraging HTML ...


3

@john You can try setting ReadOnlyField property of the field to True $field.ReadOnlyField = $True


2

I think AllowGridEditing property is not avaiable but still you can hide it, You can set these values using the object model (likely Powershell, since this is a one off run). The properties of the SPField object are the same (ShowInNewForm / ShowInEditForm). those you already have in your code. you just need the update at the end. How to hide a column from ...


2

go to the folder “ C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration” and edit “SharePoint.ps1” file. Find the following line: Set-location $home and replace $home with your folder: Set-location "c:\" Change default location of Sharepoint management console


2

Could be a language / culture issue. Try this script instead. It renames the list for all in SPWeb supported cultures. Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue $web = Get-SPWeb http://mysite ForEach($culture in $web.SupportedUICultures) { [System.Threading.Thread]::CurrentThread.CurrentUICulture=$culture; $list ...


2

Microsoft.sharepoint.client.folder does not have property for "BreakRoleInheritance" You can use as below to break permission inheritance $RootFolder.ListItemAllFields.BreakRoleInheritance($true,$false) Hope it will help to you.


2

You will have to write a recursive method for this. You can exclude Forms folder as all the List & Libraries in SharePoint has a default Forms folder where all the view/Add/Edit forms will be stored. function GetChildFolders($RootFolder) { $Context.Load($RootFolder) $Context.Load($RootFolder.Folders) $Context.ExecuteQuery() ...


2

Try to use Owner instead of owneralias, and SecondaryContact instead of secondaryowneralias.


2

The method SPFieldCollection.Add (String, SPFieldType, Boolean, Boolean, StringCollection) has only five arguments. Whereas, in your code you are passing 6 parameters. Try changing the code to this: $newSiteColumn = $web.Fields.Add($name,[Microsoft.SharePoint.SPFieldType]::Choice, $false,$false, $stringColl) Source: ...


1

You should use microsoft.SharePoint.Client.RoleDefinitionBindingCollection instead of Microsoft.SharePoint.Client.RoleAssignment. Try below snippet (Not tested but will give you idea of what all steps are required): # Get the list by Title and load. $web = $ctx.Web $list = $web.Lists.GetByTitle("Quiz") $ctx.Load($list) # Load in list of groups on the ...


1

Below script will upload file recursively from folder to document library if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } Function UploadFiles($web,$path,$docLibrary) { $files = Get-ChildItem $path foreach ($file in $files) { if($file.GetType().Name -eq "DirectoryInfo") { ...


1

If you notice in both of your given code examples the Palette001 is without .spcolor extension. I suspect this could be the issue. Refer screen shot which show Palatte001 with extension. I have not tested this code but you can try using below improvements Improving your code with added .spcolor extension: ...


1

Try with Out-Null instead of $null or null or Empty String follow this link for more information http://sprider.org/2015/03/24/o365-sharepoint-online-apply-theme-csom-powershell/


1

You can use the [Force][1] Paramter. Force = Specify to overwrite an existing backup file if it already exists. Your command should be looks like this Backup-SPSite -Identity http://xyz -Path D:\SP_BACKUPS\test.bak -force


1

You specified a wrong Id. Use Ribbon.Documents.New.NewDocument instead of Ribbon.Library.Actions.NewDocument. Your code should look like this: $CustomAction = $list.UserCustomActions.Add() $CustomAction.Title = "Hide New Document" $CustomAction.Location = "CommandUI.Ribbon" $CustomAction.commandUIExtension = " <CommandUIExtension> ...


1

On the SharePoint server you can launch SharePoint 2013 Management Shell. It loads Microsoft.SharePoint.dll and other libraries, some command lets also. Here you can use whole Server Side object model. You also have helpfull cmdlets like get-spsite, get-spweb and others. Here are all documentation of them.


1

Yes it is possible, Please follow the steps below. On the client machine (the management server): Enable-WSManCredSSP -Role Client -DelegateComputer * -Force Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentials -Name WSMan -Value WSMAN/* Set-ItemProperty ...


1

their two things. Not using SharePoint Client Components? Set the execution policy unrestricted Make sure that the assembly hasn’t been blocked, right click > properties PowerShell supports a config file which by default is not present.by default, it ought to be created here: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.config Using ...


1

In order to move the subsites from one site collection to another site collection, their are couple of ways. Method # 1 Save the list as template with content. create new subsite using that template. Method # 2 use export-spweb export-spweb -identity http://www.whsmith.co.uk/Books -path \serversharebackupWHBooksSiteBackup.cmp Then run Import-spweb ...


1

Using PowerShell, you can always use the command Backup-SPSite to take a backup and then restore it to an empty site collectiong using Restore-SPSite. Backup-SPSite http://server_name/sites/old_site -Path C:\Backup\site_name.bak One important thing is that the site collection backup and the new site collection need to be based on the same template. If you ...


1

Here is your answer (function () { var fieldContext = { Templates: { Fields: { ID1: { View: function (ctx, b) { b.AllowGridEditing = false; return ctx.CurrentItem.ID1; } } } } }; ...


1

Because you are trying to restore a site collection, I would remove the host headerwebapplication url from coomand i.e Restore-SPSite http://contoso.com/ -Path xxx.bak -DatabaseServer xxx -DatabaseName xxx -Force


1

If you want to access profile of single user following is the script $mySiteUrl = "http://mysite" $adAccount = "DOMAIN\chill" $upAttribute = "WebSite" $upAttributeValue = “http://get-spscripts.com” #Get site objects and connect to User Profile Manager service $site = Get-SPSite $mySiteUrl $context = Get-SPServiceContext $site $profileManager = New-Object ...


1

As far as I know, that property isn't mapped to an actual member on the SPContentType object. Setting the Inherits flag in a CAML content type declaration only result in a different set of fields begin added to the content type field link during the initial creation process. This means that you cannot modify that property at a later time. What you can do, ...


1

CAML query is used to get information from List. You requirement is to filter Lists which belongs to object Web. We can't use CAML for that. I would suggest you use PowerShell piping etc.


1

$webapp = get-spwebapplication "https://my.comp.com" $allsites = $webapp.Sites $ht = @{} foreach($msite in $allsites) { $ht.add($msite.Rootweb.Title, $msite.Allwebs.Count) } $ht.GetEnumerator() | Sort-Object -Property Name


1

I have created a script iterating through all Document Libraries checking for difference in filesize between what SharePoint thinks and how big the file in the Database really is. Im also doing a try/catch so make sure I don't miss any totally corrupt files. Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue ...


1

This will be a tedious task. Since there are many file types, validating each one requires custom coding for specific type of files. For example to validate Word documents you need to use Office InterOp or OpenXML SDK. For PDF you need to use ADOBE or other available API's. I would recommend doing another migration. If you only want to do basic ...



Only top voted, non community-wiki answers of a minimum length are eligible