2

My organization is experimenting with new processes to coordinate developers as they integrate their code into our main branch. Right now it's just a basic task list in Sharepoint, but it seems to be doing the trick pretty well. However, there's a lot of tedious manual labor in the creation of those task tickets, and we're looking to improve this. To that end, I have two questions.

1) I've looked through the list of Powershell cmdlets for Sharepoint, but without being a Sharepoint wiz I don't see anything immediately obvious in terms of automated task creation. Can this be done, or are the cmdlets more for administrative (configuration) purposes rather than for usage?

2) Is this a horrible abuse of sharepoint? Ultimately we're just trying to create a centralized location for tasks to be registered with some basic information concerning task details, task owner, and completion status. If there's some obviously better way to do this I'm all ears since no matter what we do we're probably reinventing some wheel or another.

1

1 Answer 1

1

Task creation in powershell for Sharepoint is as easy as adding item to list. So the basic steps for such script would be: get web, get task list, add item, fill in properties, update item.

This code should work:

$w = get-spweb http://localhost/subweb
$l = $w.Lists['Tasks'] # use display name to index lists collection
$newitem = $l.AddItem()
$newitem['Title'] = 'Task for Peter'
$newitem['Body'] = 'Description of the task'
$newitem['DueDate'] = (get-date).AddDays(5)
$newitem['AssignedTo'] = $userId
$newitem.Update()

But this would mean, you run your PS script on sharepoint server machine. Basically it is possible to run sharepoint cmdlet against local sharepoint.
It is also possible to run those cmdlets remotely, but that needs setting of WinRM service on both sides and is not basic task...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.