0
votes
0answers
6 views

Translate GUIDs to library, list, webpart, or component name

I have a list of GUIDs used but I don't have a reference to tell what each guid is for. Could I programmatically convert these Guids to something more useful such as Guid ==> "Document Library" ...
0
votes
2answers
18 views

Move SharePoint list items into folders that exists in the same list programmatically?

Respected members of StackExchange, kindly help me with your kind suggestions to solve the issue. I have +20,000 items in a SharePoint list that i want to move into the folders that also exists in ...
2
votes
1answer
91 views

Get ULS log records programatically

Is it possible to retrieve records from ULS log using C#/SharePoint API without having to manually parse log files? I would like to display logged messages on a custom web page, and I would like to ...
0
votes
1answer
68 views

Can't delete SPWeb from PowerShell or C# Object Model

I have a very strange situation - two sub webs were created through some code but it errored out part way through the process and now I am left two webs I can't seem to delete. The strange part is ...
1
vote
1answer
257 views

Find a farm's database server and instance in PowerShell

Through PowerShell, how can I find the SQL server name AND instance where my databases are stored? Assuming I am not using an alias and can't check cliconfg. In servers in farm, I can see the server ...
1
vote
1answer
67 views

Test-SPContentDatabase doesn't return information

I run Test-SPContentDatabase like this: public string Test_Associate(string DbName,string UrlApp) { Runspace runspace = RunspaceFactory.CreateRunspace(); // open it ...
0
votes
1answer
73 views

run SharePoint management shell with c#

I have some ps1 that I need to run it with SharePoint management shell. I dont have the possibility to run it with the traditionnal powershell even i havce the administrator role : public string ...
0
votes
1answer
34 views

Unattended execution of C# scripts

I'm a beginner designing automatizing tasks. I have 2 scripts in C# .These scripts generate two XML docs which are connected and synchronized with two native lists in a SharePoint Portal through ...
1
vote
1answer
3k views

Export And Import of Subsites Using PowerShell Script

I am using SharePoint 2013. The problem is as follows: There are two Site Collections in a single Web Application. With the following Paths: /sites/Site1/Subsite1/ & /sites/Site2/Subsite2 Using ...
0
votes
0answers
397 views

C#: cannot get listitem field value but works fine in powershell?

back again with a strange issue. Using powershell I can get a handle on a SPListItem and do Item["My Field"] which prints its value. However, in a C# custm workflow activity, when I attempt to do ...
0
votes
1answer
214 views

How can I access/set stsadm properties from code?

I'm trying to set the ChangeLogRetentionPeriod stsadm property from code, which is normally set from the SP powershell. What is the best way to go about setting this property from code? Background: ...
2
votes
2answers
216 views

How to collate/merge two different lists, with the same colums into one list

I have got two different lists. One is live updated by many users. The second list has the same fields and works as the master. I want to every day, at 6:00 o'clock a.m, merge List one with list two. ...
1
vote
1answer
663 views

Remote Powershell: New-SPUser : Access is denied. (Exception from HRESULT: 0x80070005)

I am running a remote powershell script which attempts to setup a web-application and site collection and then attempts to add a user to that site collection. I receive the following error: ...
0
votes
2answers
2k views

Sharepoint 2007 Powershell: $item.update() gives error that file has been modified

I am trying to programmatically update some metadata for a sharepoint item using powershell. Here is my code: $web = getWebByURL("http://test-site/spadmin/") $itm = $web.lists["Documents"].items[0] ...
1
vote
0answers
182 views

UPS Sync started from powershell script / web service

I have a web service that is kicked off from a workflow. The web service runs a powershell script that kicks off the User Profile Synchronization job. The powershell script works perfectly if I run ...
0
votes
2answers
468 views

Fixing programmatic alert URLs

Environment: SP2010 Enterprise, SQL2008R2, VS2012, full server access A while ago I created a massive amount of alerts using a c# console app I made in VS. The app ran on the server using SP ...
1
vote
1answer
294 views

Adding a content type to a list gives me a duplicate field error

I have the following code: list.ContentTypes.Add(contentType); It works on my dev environment, but on test fails with the following error: A duplicate field name "[GUID]" was found. I've had ...
0
votes
2answers
94 views

SP 2010: Set RSS settings for a web application with powershell

PowerShell allows to set/retrieve web application settings e.g. $webApp = Get-SPWebApplication $siteURL $webApp.DefaultTimeZone Will return the Default Time Zone of the web application. I'm now ...
1
vote
2answers
553 views

How can I export external content type as a BDCM file with powershell?

I can export external content type from SharePoint Designer or Central Administration. However, I want to export ect as bdcm file with powershell in order to export ect automatically. There is an ...
0
votes
1answer
506 views

get custom fields only from a sharepoint list

Can anyone tell me how can I get the custom fields from a sharepoint list? I don't want to get all the fields like hidden, just the custom ones or the ones in the default view. The end result will be ...
1
vote
1answer
541 views

Error when enumerating through site columns

I'm working on a Sharepoint 2010 site. I am trying to run this script from a website in order to create an xml containing info on my site columns. $sourceWeb = Get-SPWeb http://farmstuff:1284 ...
1
vote
3answers
5k views

Programatically, how do I change the default document content type of a Document Library in SP2007?

I have 40 document library lists and I have to change the default document content type for these document libraries. In UI, this is possible by On the document library, go to Settings > Document ...
1
vote
1answer
219 views

Download Versions of a SharePoint 2007 Document?

Can anyone point me in the direction of downloading all the versions of a file in a SharePoint 2007 document library? Is this possible with PowerShell, C#, or another way?
4
votes
4answers
803 views

Add a Web Part Zone to “My Newsfeed” Page via PowerShell

I've done a fair amount of looking into this idea without promising leads. Let me define my problem: I need to add a third column (as a Web Part Zone) to the "My Newsfeed" page in My Sites. The ...
2
votes
3answers
260 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, ...
1
vote
2answers
424 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
191 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 ...
6
votes
1answer
720 views

Obtain Default Content Access Account via PowerShell

As part of farm configuration audit, I need to obtain the current content access account. While I've found several resources for setting the default content access account for search using PowerShell, ...
2
votes
1answer
3k views

Does Update-SPSolution trigger a SPFeature.Upgrade()?

I'm looking into Feature versioning and upgrading in SharePoint 2010 and I don't know exactly if the Update-SPSolution cmdlet triggers a SPFeature.Upgrade(). Are <UpgradeActions> elements ...
1
vote
4answers
578 views

openweb does not contain an object.

When writing my powershell code, the openweb command returns an empty object. this is the code: PS C:\Users\SP_admin> $spsite = get-spsite "https://adress.nl/sites/dcprogrammabureau" PS ...
2
votes
1answer
341 views

How to access the web-application hosted on the another Farm using SharePoint 2010 Management Shell?

I am trying to access the web-application that is hosted on the another SharePoint 2010 Farm using SharePoint 2010 Management Shell cmdlets but it is failing with the below error message $spsite = ...
7
votes
4answers
4k views

Automatically add pssnapin Microsoft.Sharepoint.Powershell

I am developing in Sharepoint and I like more Windows Powershell than Sharepoint Management Shell. Every time I restart the development machine, I have to run Add-PSSnapin ...
1
vote
2answers
330 views

Powershell calling custom code has SPWeb.CurrentUser = null (in certain cases)

I have a custom assembly which contains code to setup Variations for a SharePoint 2010 Publishing site. This code is based off a blog post from Waldek I have a PowerShell script in which I create a ...
2
votes
3answers
3k views

How to find the SiteCollection created date in Sharepoint 2010?

I want to find the sitecollection created and last content modified date in Sharepoint 2010, found a SPSite property for last content modified date however could not find any clue to find the created ...
2
votes
1answer
240 views

how to find the user profile property scope which user has set on his mysite - SharePoint 2010?

How can I find the list of colleagues/Team-members for a SharePoint 2010 user? and how can i find the scope for a specific user profile property (eg..birthday--->Everyone, Interest--->My Team)which ...
2
votes
2answers
810 views

Updating a list column thro' a PowerShell script?

I have a sharepoint 2007 list and it has many items, I want to update a column in an item thro' a powershell script even if the item is current edited/locked by someone else. Is it posssible?
1
vote
1answer
86 views

SP 2010 Debuging problem

Please HELP, I creating custom SP2010 intranet site for last few months. During development i didn't have any particular problem with debuging except this one and now I can't figure where's the catch. ...
1
vote
2answers
3k views

Create sptimer job in c# and/or powershell

Can anyone tell me how to go about creating a timer job for sharepoint 2010 either using C# or Powershell. All the best
0
votes
1answer
805 views

Setup an item level auditing for a sharepoint document library

I would like to setup an item level auditing (Opening or viewing or downloading) for a sharepoint 2007 document library without enabling audit for the entire site-collection. This link may help us ...