Tag Info

Hot answers tagged

2

Source: http://blog.kuppens-switsers.net/sharepoint/setting-replicating-directory-changes-using-powershell/ $Identity = "domain\account" $RootDSE = [ADSI]"LDAP://RootDSE" $DefaultNamingContext = $RootDse.defaultNamingContext $ConfigurationNamingContext = $RootDse.configurationNamingContext $UserPrincipal = New-Object ...


2

Out of the box of PowerShell cmdlets, It can't be done. It's no valid cmdlets in the Index of SharePoint Server 2010 Windows PowerShell cmdlets However, Stefan Goßner wrote the blog post SharePoint Variations – The complete Guide – Part 16 – Translation Support which go over the topic in detail. He suggest to use PublishingService to export/import ...


2

You can implement like the following: $web = Get-SPWeb http://sharepoint.contoso.com/sites/sitecollection $web.AnonymousState = [Microsoft.SharePoint.SPWeb+WebAnonymousState]::Enabled $web.Update()


2

You could create a Custom WebPart. A simple button Handler could execute the under given code to fire your PowerShell script. scriptText parameter is the script which you should pass. You can HardCode it or load it from any file. private string RunScript(string scriptText) { // create Powershell runspace Runspace runspace = ...


2

I think it's very hard to have a comprehensive tutorial for SharePoint 2013 powershell. There's so much you can do and to condense all of that into a guide is hard. I would try starting at Technet: Google tasks that you might think you'd need to complete. (Again, everyone uses SharePoint for different reasons, and so that'd also make a 'complete guide' hard ...


2

If you can log into the server as a administrator, use PowerShell, here is a link outlining how you can download the entire document library to a local drive use stsadm; here is a blog post about how to use the gl-exportlistitem command If you can't log into the server, use the MOSS 2007 web services, here is a blog post outlining that method.


1

Done with below code. Use InheritDefaultPageLayout method instead of IsInheritingDefaultPageLayout property. $pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($subsite) $pweb.InheritDefaultPageLayout(); $pWeb.Update();


1

The reason it fails is due to a code bug in Microsoft.Office.Server.Search.Administration.GetErrorMessages. In the loop it checks if allKnownErrors has the key, and of course it does as it's looping that dictionary. The code should check if dictionary2.ContainsKey instead. public Dictionary<int, string> GetErrorMessages() { ...


1

there are a few introductory things you need to be aware of executionpolicy: you will probably disable it completely (set-executionpolicy unrestricted) or set a temporary state and revert back when you are done. this is a must in order for you to run your own scripts inside a sharepoint farm Understand you can use logging (start, stop transcript), ...


1

as user19952 noted, run powershell as admin. Problem: Your running an admin level task, the user DEVRSG\svcwss your user doesn't have the sufficient levels to run the dll for Microsoft.SharePoint.Administration. solution: click start -> click all programmes -> click Microsoft sharepoint 2013 products -> right click sharepoint 2013 management shell -> ...


1

Here's a PowerShell function that returns a hash table with all links on a page at a given URL and their status codes: Function Get-LinksWithStatusCode ( [string] $Url ) { $links = (Invoke-WebRequest -Uri $Url).Links | Select -ExpandProperty href -Unique $hash = @{} foreach ($link in $links) { Try { ...


1

convert the password into a varible that you can pass: $secureString = convertto-securestring "Password" -asplaintext -force now just use that converted secure string: Add-SPProfileSyncConnection -ProfileServiceApplication 3b0a7b01-d954-4120-90b5-caa9382ebd9a -ConnectionDomain MyNETBIOS -ConnectionForestName My.Forest.Name -ConnectionPassword ...


1

You can move it programmatically, so that you can add your business logic as required. To move Files to the sharepoint folders: SPWeb oWebsite = SPContext.Current.Web; SPFolder oFolder = oWebsite.GetFolder("Shared Documents"); SPFileCollection collFile = oFolder.Files; /*Copy the files to a generic List of type SPFile*/ List<SPFile> listFiles = new ...


1

try the below code and see if it works $claim = New-SPClaimsPrincipal -TrustedIdentityTokenIssuerr $ap -Identity UserName $site = New-SPSite $url -OwnerAlias $claim.ToEncodedString() -template "STS#0" I think you need to encode the string to get it works. http://technet.microsoft.com/en-us/library/ff607753(v=office.14).aspx#section1 Also check this one: ...


1

A bit of detail. Performs a synchronization of the Windows SharePoint Services Solution Package (WSP) solutions stored in the configuration database with the files stored on disk. The .wsp files will be synchronized in the order in which they were submitted to the server. Reference This is same as Syncsolution in SP 2007. So bottom line, Synchronization ...


1

If your description is $description, you can try writing it as such. $header = "<STRONG><U>" $footer = "</U></STRONG>" $myHTMLDescription = $description | ConvertTo-HTML -Fragment -PreContent $header -PostContent $footer | Out-String If that doesn't work for you, take a look at these two links: ...


1

Instead of using hard code the name its better to use. [Microsoft.SharePoint.SPBuiltInFieldId]::Author Your code could look something like this $url = "<url>" $list = "<list title>" $ctName = "<name contenttype>" $web = Get-SPWeb $url $list = $web.Lists[$list] $list.Items | % { $item = $_ if ($item.ContentType.Name -eq ...


1

Can you make sure there is a site binding for Workflow Management Site on port 12291? To check, go onto the server where you have the workflow manager installed. Then open IIS and go to Sites and click Workflow Management Site. Then click "Bindings..." on the right hand-side under "Actions" and check if you have a binding there for port 12291. If you ...


1

Automatic check out can be done by ItemEventReceiver on ItemAdded event: http://msdn.microsoft.com/en-us/library/gg252010(v=office.14).aspx if you saw the scripts for check in, it is similar to check out. You just have to run the script under the user to whom should be the files checked out or you can impersonate: $user=$web.AllUsers.GetByID(1073741823); ...


1

The workaround is as follows: Open up your SharePoint 2012 solution in Visual Studio 2012/2013 In the Solution Explorer (use View -> Solution Explorer if you don't see it) expand your solution and browse to the Package within your project Double click on the Package.package entry to open up the package editor Click on the Advanced Tab The Additional ...


1

this can only be done per webapplication. Use PowerShell to automate the process of setting it for a subset or all of the webapplication http://blogbaris.blogspot.co.at/2011/10/limiting-sharepoint-people-picker-with.html



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