Showing posts with label Drew Madelung. Show all posts
Showing posts with label Drew Madelung. Show all posts

Friday, November 13, 2015

Adjusting Email Notifications For SharePoint 2013 Task Lists

When looking at the settings of a SharePoint 2013 task list you no longer have the option to enable email notifications.  This used to be found under List Settings -> Advanced Settings -> Send e-mail when ownership is assigned. 

This is what it looks like in 2010.

image

This can be still be turned on using Powershell in SharePoint 2013.  Here is the powershell to perform that task along with a link back to the source of the script.  Thanks to the creator of the script karimSP!

$site=Get-SPSite "http://sharepoint2013/"$web=$site.OpenWeb()
$list=$web.Lists.TryGetList("Tasks")
if($list -ne $null)
{
$list.EnableAssignToEmail =$true
$list.Update()
}

Adjusting when the assigned to task email is fired

As it states in the 2010 settings, this will send an e-mail when ownership is assigned or when an item has been changed.  In a high transactional task process (automated task creation as example) this could lead to an incredible amount of emails.  Fortunately we have the ability to change the types of event that fire these emails in powershell.  The primary use case I used this for is too only send task emails on creation of the item (Add). 

The available options for when notifications are sent are listed in the SPEventType enumeration and they are:

Member Name Description
Add Additions to the list or list item. (0x00000001)
Modify All changes made in a list or list item. (0x00000002)
Delete Deletion of a list or list item. (0x00000004)
Discussion Changes in Web discussions. (0x00000FF0)
All All events pertaining to the list or list item. (-1)

 

Powershell to update the events

I have included variables at the top of the script that you can enter depending on the location of the task list(s) along with which ones you want to update.  Make sure you run the powershell to activate the assigned to email, the script above, prior to running this script.

################################################################### NAME: SharePoint2013TaskAlertEventTypes.ps1
# DESCRIPTION: Script to adjust SharePoint 2013 task list email notifications on different events
#
AUTHOR: Drew Madelung
#
LAST UPDATED: 11/11/2015
#
#################################################################

# ***IMPORTANT*** The powershell to enable assigned email notifications must be done prior to this script being ran

Add-PSSnapin Microsoft.SharePoint.Powershell

# Set variables - EXAMPLE variables are set
$sitecollectionUrl = "http://sharepoint2013"
# Eventtypes can be: All, Add, Modify, Delete, Discussion
$eventType = "Add"

# Optional variables - if not used, all event types for all assigned to task alert email notifcations on the listed site will be updated
$subsiteUrl = "/subsite"
$listUrl = "lists/tasks"

$site = Get-SPSite $sitecollectionUrl

# Get subsite if entered
if ($subsiteurl -eq "") { $web = $site.OpenWeb() } else { $web = $site.OpenWeb($subsiteUrl) }

$a = $web.Alerts

foreach ($alert in $a)
{
$alerttemplate = $alert.DynamicRecipient
if ($alerttemplate -eq "AssignedTo") {
if ($listUrl -eq "") {
$alert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
$alert.Update()
Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
}

else {
if ($alert.ListUrl -eq $listUrl) {
$alert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
$alert.Update()
Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
}
}
}
}
$web.Dispose()
$site.Dispose()

Link to download powershell script

SharePoint2013TaskAlertEventTypes.ps1

If anyone has any thoughts or suggestions for this script please let me know!

Originally Posted

Adjusting Email Notifications For SharePoint 2013 Task Lists


by Drew Madelung via Everyone's Blog Posts - SharePoint Community

Tuesday, November 3, 2015

Exporting SharePoint Group Members to Excel Without PowerShell

I was at a client recently and was not allowed to run any powershell commands but needed a list of accounts that existed in a SharePoint Group in a table format.  I also was not allowed site collection administration permission.  I tried a few different options in which trying to manipulate the list view of the group and using Excel data connections to get back to SharePoint but no option worked very cleanly. 

What I ended up using was a REST call to get the users and then downloading the XML response and opening it with Excel.  Use this link to learn about the available REST api's for users & groups

Here are the steps....

1.  Get a client that you can use to test REST calls

2.  Construct the REST call to get a list of users by group

The structure looks like this:  https://siteurl/_api/web/sitegroups/getbyid(groupid)/users

  • To get the group ID simply navigate to the members page of your SharePoint Group and look at the number at the end of the URL  Here is the URL of my "Product Members" group:  http://ift.tt/1Q8DsI19

Here is my call:  http://ift.tt/1ROjVLc(9)/Users

  • We will see the users returned in the entry area of the response.

image

3.  Download the XML response

  • In the Advanced REST Client click Save as file and then Download in the response section.

image

4.  Change the file type

  • The file will download as a .text-plain file type.  Edit the filename and change it to a .xml file type.

image

5.  Open with Excel!

  • In Excel browse and pick out the new .xml file you created and select open this file as an XML table.

image

  • Take a second and look at your pretty data.

image

6.  Remove duplicates

  • The data comes across in a way that there are 2 rows for each user.  We can clean that up by removing the duplicates based on the login name.  First click anywhere in the imported table and under the Data tab click Remove Duplicates.

image

  • Click the Unselect All button then scroll down and check ns4:LoginName

image

  • That will remove your duplicate logins and you will have emails and logins that you can use whatever way you need.

image

 

Handy appendix?

I know this post is titled how to get a list without powershell but I wanted to just include this down here as this is an easier approach if you have the ability.  Here are the commands to get a list of users in a SharePoint Group via powershell.

  • Get-SPSite http://server/sites/yoursite | Select -ExpandProperty RootWeb | Select -ExpandProperty Groups | Where {$_.Name -EQ "group name"} | Select -ExpandProperty Users | Select Name, Email| Export-Csv c:\scripts\users.txt

Here is the command to do it with SharePoint Online

Handy links!

Originally Posted

Exporting SharePoint Group Members to Excel Without PowerShell


by Drew Madelung via Everyone's Blog Posts - SharePoint Community

Monday, October 12, 2015

Display User Profile Picture in O365 using a Content Search Web Part

If you have ever tried to display a user's profile picture that is stored in their SharePoint Online user profile you will have noticed an issue.  When you configure everything just right and log onto the page for the first time you wont see their picture.  All you see is the wonderful grey box with a question mark like this:

clip_image001

This is a documented issue within SharePoint Online/O365.  From Microsoft:

This issue occurs because the profile image is located on another site collection. You must authenticate with the site collection for the image to be displayed in the Content Search Web Part.

The workaround provided involves browsing to a MySite or OneDrive page within your tenant and then browse back to the page.  Obviously this is not a great user experience.  I was putting together an Employee Spotlight section on a client's new portal's landing page and this workaround was not acceptable.  I did some digging through the internet and stumbled across some pieces to put together to solve this issue.  The solution involved a new display template and update the pictureURL to point to a local source instead of the "My" site collection(s).

1.  Make a copy of whatever display template you want to use and give it a new name.  In this example I am using the Picture with 3 lines on the right.  (Item_Picture3Lines.html) 

2.  Open the downloaded and renamed display template and update the Title.

image

3.  Add a new managed property mapping for WorkEmail  -->  'Work Email'{Work Email}:'WorkEmail'

image

4.  Scroll down to the line that holds the pictureURL variable.  Before:

image

5.  Replace the line -->  var pictureURL = $getItemValue(ctx, "Picture URL");

    With the line -->  var pictureURL = "/_layouts/15/userphoto.aspx?size=L&accountname=" + $htmlEncode(ctx.CurrentItem.WorkEmail);

-------------

   Replace the line -->  var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 100, 100, ctx.CurrentItem, "cbs-picture3LinesImg", line1, pictureId);

    With the line -->  var pictureMarkup = "<img src='" + pictureURL + "' class='cbs-picture3LinesImg' alt='" + line1 + "' id='" + pictureId + "' onerror='this.parentNode.innerHTML=Srch.ContentBySearch.getNoPictureMarkup(100);' onload='Srch.ContentBySearch.resizeImageToSquareLength(this, 100);'/>";

    After:

image

6.  Save, upload, and PUBLISH  your new display template.

7.  Set your CSWP to use your new display template.

image

8.  Refresh your page and look at some smiling faces!

image

Here is a helpful link to get started with configuring a content search web part in SharePoint.

*Note* If you are on a domain joined PC with a synchronized identity and ADFS this should not be an issue.

Originally PostedDisplay User Profile Picture in O365 using a Content Search Web Part


by Drew Madelung via Everyone's Blog Posts - SharePoint Community

Thursday, July 16, 2015

SharePoint 2013 PowerPivot Install - Error Deploying Farm Solution

I ran into an issue recently that I thought would be good to pass along. I was installing the BI features for SharePoint 2013 on a new farm and ran into an issue when configuring PowerPivot. This environment is a 3 tier environment as depicted in the image below.

2015-07-15 13_24_45-Document1 - Word

These are the BI steps that I had already completed. (along with some helpful links)

 Here is the download link for SQL Server 2014. The installer does not deploy or configure Power Pivot features in SharePoint. The following components install by default:

  • Power Pivot for SharePoint 2013. This component includes:
    1. PowerShell scripts (.ps1 files)
    2. SharePoint solution packages (.wsp)
    3. Power Pivot for SharePoint 2013 configuration tool to deploy Power Pivot in a SharePoint 2013 farm
  • Microsoft OLE DB Provider for Analysis Services (MSOLAP).
  • ADOMD.NET data provider.
  • SQL Server Analysis Management Objects.

A recommended best practice is to install spPowerPivot.msi on all servers in the SharePoint farm for configuration consistency, including application servers and web-front end servers. The installer package includes the Analysis Services data providers as well as the Power Pivot for SharePoint 2013 configuration tool. When you install spPowerPivot.msi you can customize the installation by excluding individual components.

The next step is to configure the PowerPivot for SharePoint Add-in

This is the area in which I ran into an issue.  Here is the technet article about the configuration.

  1. I launched the configuration tool

    image<

  2. I set the default account information, DB Server and PowerPivot info

    image

  3. I set the parameters for the task "Create PowerPivot Service Application" to use my naming format.  (Remove the GUID from the DB)

    image

  4. I set the web application deployment location for the task "Deploy Web Application Solution"

    image

  5. I set the unattended account info for the task "Create Unattended Account for Data Refresh"

    image

  6. I then clicked Validate and Run

The configuration failed on the task "Deploy Farm Solution" with the error:

Running PS Script failed. Reason: Solution failed to deployed, reason: SPAPP01 :
Error: Cannot add the specified assembly to the global assembly cache: Microsoft.AnalysisServices.SPAddin.dll.

The solution DID deploy to SPWEB01 and SPAPP02.

These were the items I tried to debug first all of which failed:

  1. IIS Reset on all servers
  2. Reset Timer Service on all servers
  3. Ran Configuration tool as Administrator
  4. Set default account to different account names with different permissions (farm/install/service/etc...)

I then stumbled across this blog - Troubleshooting PowerPivot for SharePoint Solution Deployments - which lead me into the correct direction based on this statement:

"...the Timer service depends on the Administration service to carry out the deployment work because the Timer service usually runs under a low-privileged service account that might not have the required permissions to deploy assemblies in the Global Assembly Cache and so forth, while the Administration service uses the high-privileged Local System account with full access to all local resources."

So I head out to SPAPP01 and check out what account is running the Administration service and sure enough it was set to the fully qualified farm domain account!

I reset the log on to be Local System and reran the configuration.

image

Success!

image

Hopefully this helps someone else moving forward!

Originally PostedSharePoint 2013 PowerPivot Install - Error Deploying Farm Solution


by Drew Madelung via Everyone's Blog Posts - SharePoint Community

Wednesday, June 3, 2015

Microsoft Ignite & SharePoint/O365 - Outcomes

MSIgnite

Well this blog post is coming in quite late as Microsoft Ignite was a little less than a month ago. But I believe in better late than never and there are some good topics that I wanted to follow up with. I was lucky enough to attend Ignite with a great group of folks from Concurrency and was also able to do some great networking to meet new folks in the SharePoint and O365 collaboration world. My initial reaction of Ignite was that it was a little overwhelming at times. Coming from the world of smaller SharePoint conferences having 20k+ people in a giant building with all different types of Microsoft technology led to some long walks and not many deep dive sessions. With the amount of announcements in the Office 365 and SharePoint Server 2016 space that were being discussed it was and still is a challenge to keep up with. Looking at the conference from a strictly SharePoint perspective it felt limited at times. Many of the primary SharePoint sessions were packed to the brim and had to be held in overflow areas. I think this directly spoke to the overwhelming usage that SharePoint has in the enterprise still. I am now very excited to attend the smaller SharePoint specific conferences such as SharePoint Fest and SPTechCon to dig deep into the new experiences. I have been trying to go through all of the videos on Channel 9 but there are so many good ones. If you want to download the videos and slides directly here is a link for instructions on how to do it.

In this post I will try to highlight what I believe to be the best sessions for collaboration around SharePoint and Office 365 and also review my pre-conference predictions.

My prediction outcomes

NextGen Portals

Ok we all knew they were already going to announce something but this still was an exciting topic. The new Knowledge Management portal currently called Codename “InfoPedia” was demonstrated. It was apparent that this portal was still in the early stages of development but their strategy to deploy a KM could be great. The new KM portal will consist of Boards, Articles and Microsites in which users are empowered to generate content quickly in a standardized and already styled way. This leads to a more organically and horizontal growing solution rather than a pre-determined hierarchical solution. Here a great post from Benjamin Niaulin about this topic.

Recommended sessions for this topic:

OneDrive for Business Sync Updates

Again we knew this coming but everything announced here was great news. I could write multiple blog posts on all of the new stuff they announced around this topic but here are the juicy highlights. The new OD4B sync client will use the current OneDrive protocol. There will be a unified sync client across OneDrive and OneDrive for Business platforms and the preview and RTM client will be available by end of year. Some other important things to note with the new client:

  • Selective sync (everyone have a round of applause for this one)
  • No more 20k file limit
  • Support for up to 10GB files
  • Blocking of unmanaged PCs
  • Includes PC and Mac

Recommended sessions for this topic:

Simplified Hybrid with SharePoint

I attended the SharePoint Hybrid pre-conference at Ignite and got to see first hand what is coming with hybrid in SharePoint and Office 365. Overall the strategy is clear to me that hybrid will be the new on-premises. There are features that will only be available in Office 365 and Microsoft’s strategy is not to bring you to the cloud but bring the cloud to you. This will allow enterprises to opt-in to hybrid on your own terms. This was very obvious in their hybrid strategy moving forward. Microsoft is trying to make they hybrid experience transparent. I won’t go deep into any of these strategies but if you want to discuss them just shoot me an email or a tweet. Their primary pillars are:

  • Hybrid Search
  • Hybrid OneDrive
  • Hybrid Extranet
  • Hybrid Team Sites
  • Cloud-drive Hybrid Picker
  • In the future with no further info yet…
    • Hybrid taxonomy story
    • Hybrid DLP
    • Hybrid eDiscovery

Recommended sessions for this topic:

What I hoped to see

Future of Forms

Isn’t this everyone’s favorite SharePoint topic? I came in hoping to hear something about forms, or at least anything. With the incredible amount of announcements there was still nothing new on forms. The current state still exists in which InfoPath 2013 will continue to work in Office 365 and SharePoint Server 2016. The only time I heard forms being discussed in a session was during the MVP panel that I linked to above. The panel confirmed the current state and provided similar input to what I am currently telling my clients. If it is a small list form customization go ahead with InfoPath. If you have a larger and more long term forms requirement it is time to look at a 3rd party or custom development.

Future of SharePoint Workflow

There were not architectural changes announced during Ignite. With a total of 0 sessions and 0 discussions about workflow during Ignite I would tend to lean towards the thought that there will be no architectural changes. Workflow will continue to run on Workflow Foundation 4 as an external resource as it does today on-premises and in Office 365. Now there was some news that will affect workflow creators.

There will not be a SharePoint Designer 2016 but SharePoint Designer 2013 will continue to be supported.

I think this is an important step in the evolution of productivity in SharePoint and Office 365. Obviously SharePoint Designer was built with on-premises as its base. That much control is unnecessary in a cloud solution like Office 365. So on that side it makes sense to start bringing in limits. And of course anyone who has used SharePoint Designer heavily in the past knows it was a very buggy product that loved to crash. It is important to remember that we are over a year away from the release of SharePoint Server 2016 so there will be more news around this topic.

As far as workflow creation, I do believe that this is a step in the right direction and hope to see a browser based workflow creation experience. I will also use this time to plug my session at SPBiz that is directly related to SharePoint Designer workflows. This should be a great free online conference.

Future of Yammer

I was very wrong with my prediction here. I was leaning towards the thought that brand for “Yammer” itself would be going away. It was stated pretty loud and clear that this was not the case. There were multiple sessions around this solution including the Yammer Roadmap. Yammer is here to stay and will have a place in the Office 365 ecosystem. Each experience that comes with Office 365 does have its appropriate use cases. The challenge that we currently are and will continue to face is the confusion around when and where to use an experience. There was even a session around this topic titled How to Decide When to Use SharePoint and Yammer and Office 365 Groups and Outlook and Skype. Obviously if we had to have a major session on this topic there is confusion on what to do. I hope this vision continues to clear moving forward.

One item of note around Yammer and Office 365 is that the UI for Yammer is changing to align better with the rest of Office 365. If you are a part of the Office 365 Network (and if you’re reading my blog and are not, go join it now) you are already seeing these changes happening.

The Site Actions Menu in SharePoint Server 2016 not changing locations from the top right

I can confirm that it is staying in the right from the demos performed. No need for any panic from the community.

Anything else interesting?

I think the winner of most interesting topic during Ignite and so far after Ignite has been Office 365 Groups. Microsoft is putting a ton of time and effort into this collaboration experience. I believe that Office 365 Groups still need some help around the governance and control but they will be a go to solution in the future. Here is a link to a great blog post from Nik Patel that will go into a little more detail. Overall groups will be an experience that encompasses nearly all aspects of Office 365.

yammer-post-image

Recommended sessions for this topic:

Here are some other interesting topics and some sessions about each.

SharePoint Server 2016

Office 365 Security

Office 365 Migration API

 

I look forward to the next Microsoft Ignite conference in 2016 coming back to Chicago on May 9-13. It will be interesting to look back on this post and see how different the landscape moves in just 1 year.

Originally Posted

Microsoft Ignite & SharePoint/O365 - Outcomes


by Drew Madelung via Everyone's Blog Posts - SharePoint Community