Tag Info

New answers tagged

0

If you are wanting to import the list under the same site with the same name you can use -force which forcefully overwrites if it already exists. NB. This will overwrite what is currently there.


0

No. From my understanding of the question, the author wants to know if we can save a site template containing it's subsites. There are many workarounds (backup, export, individual templates), and I believe Tom has layed down some very good approach(es). However, site templates are saved independently for each site (web), and not even PowerShell can ...


1

Yes. It is possible using PowerShell. First, create site templates for the sub-sites. Then use the New-SPWeb cmdlet to create the parent, then the sub-sites from the templates. Keep in mind you must use the GUID of the template. Keep in mind that site templates are only one of many options for provisioning new sites. The new WebTemplate method in 2010 may ...


0

Here is a simple script to add a webpart to a page using PowerShell which is tested and working fine. Please note that to add a webpart to a page export webpart to your local drive .webpart/.dwp file will be in xml format. cls asnp "*sh*" $web=Get-SPweb -Identity "http://SP2013dev.com/sites/addwebpart/" [xml]$webpartxml= Get-Content -Path ...


1

Here is a simple script to add a webpart to a page using PowerShell which is tested and working fine. Please note that to add a webpart to a page export webpart to your local drive and .webpart/.dwp file will be in xml format. cls asnp "*sh*" $web=Get-SPweb -Identity "http://SP2013dev.com/sites/addwebpart/" [xml]$webpartxml= Get-Content -Path ...


0

I encountered the same problem… After reading many blogs, articles, presentations, code samples… etc I decided to develop/assemble an utility being able to set the necessary SSO Cookies in an unattended way for domain PCs and servers. After running the utility you will be able to mount the share without user intervention with the usual “net use…”. Maybe ...


1

There is property called DefaultValue. $FieldName = $list.Fields["NH Department"] Write-Output $("NH Department - Default Value " + $FieldName.DefaultValue)


0

Try this for creating list and view in sharepoint using powershell : http://nkelkar.wordpress.com/2011/06/21/powershell-create-lists-add-columns-set-new-default-view/


1

Use SPList.SaveAsTemplate for your source. Should be the same as the GUI.


1

All you need to change is the object where you add new role assignment, in you case: - change list to folder. Your modified script: function Add-SPPermissionToFolderGroup { param ($Url, $sourceFolder, $GroupName, $PermissionLevel) $web = Get-SPWeb -Identity $Url // $sourceFolderGets the folder that is located at the specified URL. ...


-1

Find a different solution for files of that size, SharePoint cannot handle them.


1

Have you tried the Remote PowerShell ability. Powershell 2.0 uses the concepts of WIN-RM which involves piping the contents of the remote call and running it on the remote server. You need to setup the remote Computer 1st you need to run the following command on your server Enable-PSRemoting you need to let powershell know that your server machine or ...


1

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


0

Service application pools appear in IIS as long random strings of characters. The name you give it in SharePoint is not reflected in IIS Manager. An IIS Application Pool can have but one unique identifier, it’s Name, for which uniqueness is enforced. It works perfectly. However SharePoint has decided to use GUIDs for this Name. Within Central Administration ...


0

I did this a while back, and it's a little fuzzy, but I think your web application has to have the URL "http://abd.spdev", whereas I see you're trying to restore it to the Port 80 web application. Restore it as a site collection to the Port 80; if it's an empty web application, restore it as "" or if there's already something there, try "". If you want to ...


0

I found the solution by my self. Powershell is using the UTC time. It is possible to convert it to the local time: $workflow.Created.ToLocalTime()


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

What are you ultimately trying to do? Load the powershell snapin? Use Add-PSSnapin Microsoft.SharePoint.Powershell in the powershell console to load it. Installing SharePoint should automatically put the dll where it needs to.


0

For sharepoint 2010, you have to run the command which compatibale for .net 3.5,try this C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil /LogToConsole=true C:\Windows\assembly\GAC_MSIL\Microsoft.SharePoint.PowerShell\14.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Powershell.dll the command you mentioned is for .net 4.0 but in 2010 mostly we ...


1

In my case the source of this exact error msg was that my Windows domain account was not granted rights to the SQL Server in the SharePoint farm. Once I used SSMS to add my account to the sysadmin role then the SP2010 management shell opened fine without this error. You may want to add this as an alternate stop-gap resolution. Of course that begs the follow ...


0

I believe I have solved my issue. Half of the issue was also stemming from stale PowerShell sessions, for example I'd leave my PowerShell window open during changes to my Claims Provider but changes were never reflected until I started a new PowerShell session. This is the reason why my EnsureUser was actually showing that it was working even when it ...


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

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


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 ...


0

first use: Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "SITE"} this gets all features from site scope! find your feature and copy the id! next use this, havent properly tested this but i think its what your looking for! Get-SPSite http://yoursite.co.uk | Get-SPWeb -Limit ALL | Where-Object { Get-SPFeature -Limit ALL -ErrorAction ...


0

The SharePoint timer service is a simple windows service. It's listed in the services screen. De timer service executables reside in the bin folder of the SharePoint $hive. The SharePoint timer service is installed and activated by default. It should not be disabled. If you disable it, SharePoint will not run correctly. You can programmatically add (and ...


0

There are timer jobs on Web Application levels, and you can use PowerShell to Start and Stop timer jobs, and more: Disable-SPTimerJob Disables a timer job. Enable-SPTimerJob Enables a timer job. Get-SPTimerJob Returns timer jobs. Set-SPTimerJob Sets the schedule for running a timer job. Start-SPTimerJob Runs a timer job once. Se more here: Timer jobs ...


0

Why do you need PowerShell for that? Just use any tool for identifying broken links, such as Xenu's Link Sleuth You don't need to run from the server either, plus it provides more information and a GUI. Of course you can search for other similar tools if this is not the best choice for you.


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 ...


0

After digging for more clarifications... i found that it was not very complicated... To perform such update 1/ In Production environment : Just need to run Update-SPSolution cmd-let and this will do the job for you... Or we can do the following too 1-Deactivating feature ... 2-Retracting solution ... 3-Deleting solution ... 4-Adding solution ... ...


0

Based on your question and following comments, I believe we actually point out two different aspect of your problem. First - why you lose the data. Short answer: because you told VS to do that. When you debug a solution from Visual Studio, some background check are performed to ensure that the artefact in the solution do not conflict with some artefact ...


0

1) Custom coding: As it is 20K items go for ContentIterator. 2) form a caml query so that the items retrieved is not more 5K(not necessary but will help in quick operation) like you have to loop each time on query farmed 3) you can fetch based on created date 4) create a folder on create date/month/year and move Item from source to destination 5) MoveTo ...


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

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

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: ...


0

This provides a few good points about drawbacks. If a user is a Windows domain user who has a login and password for Windows, he must still provide another (SQL Server) login and password to connect. Keeping track of multiple names and passwords is difficult for many users. Having to provide SQL Server credentials every time that one connects ...


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.


0

Use Explorer View. Open the Library in Explorer View. Drag and drop content to desktop/folder/etc.


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 ...


0

We can find the answer in this post. The "module" folder was empty and we needed to refill the modules list within it. This way we have all the commands available for loading. We can see the list by typing Get-Module -ListAvailable. This should include Microsoft.PowerShell.Utility.


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 -> ...


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 = ...


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 ...


0

have you try to add Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue and run with user that has Admin right then run your code again


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()


0

Try this. Add-PsSnapIn Microsoft.SharePoint.PowerShell $userProfProxy = Get-SPServiceApplicationProxy | where { $_.DisplayName -eq 'User Profile Service Application' } Remove-SPSocialItemByDate -RemoveComments 1 -ProfileServiceApplicationProxy $userProfProxy -EndDate 7/1/2014 To remove tag Remove-SPSocialItemByDate -RemoveTags 1 ...


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

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 ...


0

The page url you must provide is the url to the webpart page. The url you provide is the url to de actual document. For example an url like http://portal.contoso.com/sites/TEST/Shared%20Documents/Forms/DispForm.aspx?ID=1 should work. SPList GetListFromWebPartPageUrl(string pageUrl) pageUrlType: System.String A string that contains the ...



Top 50 recent answers are included