5/16/2016

Ed Wilson, the Microsoft Scripting Guy, Cincinnati June 15th!

 

Ed Wilson, the Microsoft Scripting Guy, will be presenting at the Cincinnati PowerShell User Group meeting on June 15th at MAX Technical Training.

Topic: Configuration Management with Azure Automation DSC - Cloud & On-Prem, Windows & Linux

Info and regestration here: http://www.meetup.com/TechLife-Cincinnati/events/230743256/

See you there!

3/15/2016

SharePoint 2013 and SharePoint Online Built-In Accounts

 

image

I’m often chasing one SharePoint rabbit or another down a rabbit hole and spending hours there when I only wanted to ask the rabbit one simple question. In this case the question was who is “Everyone” and are they related to “NT AUTHORITY\Authenticated Users”. A simple question, or so I had thought. In this rabbit hole I found all kinds of interesting accounts, so I thought that I’d take a few notes while I was there. As to “Everyone”, I’ll follow up with another blog article. I also got distracted by two Office 365 users hanging around the hole named “Guest Contributor” and “Guest Reader” that will also get their own article.

If you would like to dive into the rabbit hole, here’s a few tools to investigate user accounts:

  • PowerShell on prem: 
    $site = Get-SPSite http://yourDomain/sites/yourSite
    $site2.RootWeb.AllUsers | FT –AutoSize
  • PowerShell for Office 365:
    Get-SPOUser -Site http://yourDomain/sites/yourSite | Select DisplayName, LoginName
  • In the browser:
    • Go to Settings (gear), Site Settings, People and Groups
    • Edit the URL and change the GroupId to 0    (“?MembershipGroupId=0”)
    • Click any interesting user name. If the user has a User Profile you will probably be redirected to their profile page. If not, you will be redirected to userdisp.aspx where you can see the user name and their internal Account property as listed in the table below.
  • Third party security and auditing tools.

 

Claims Based Authentication

SharePoint 2013 and later uses Claims Based Authentication which can support more than one authentication source. This slightly complicates the UserLogin property as it must have both the user name and the claims source data in the property value. In a non-Claims system the user name might be as simple as contoso\msmith. In a Claims system you need to know where the user was authenticated, so you end up with UserLogins that might look like i:0#.w|contoso\msmith for a Windows AD user or i:0#.f|ContosoFBA|susan for a Forms Based Authentication user.

If you would like to learn more about the Claims identity codes (“c:0!.s”, etc.) see: http://social.technet.microsoft.com/wiki/contents/articles/13921.sharepoint-2013-claims-encoding-also-valuable-for-sharepoint-2010.aspx
and
http://www.wictorwilen.se/Post/How-Claims-encoding-works-in-SharePoint-2010.aspx

 

The Users

image

Who are all of these users? Well… I’m still negotiating with the rabbit for more details, but I’ll soon add these articles with what I have discovered:

  • SharePoint: All Users vs. Everyone vs. Everyone But External vs. NT AUTHORITY\AUTHENTICATED USERS
  • SharePoint Online “Guest Contributor” and “Guest Reader” - Who’s Guest Contributor,
    and what are they doing in my library?
  • SharePoint internal and hidden accounts hiding in your Site Collection

For now:

  • NT AUTHORITY\AUTHENTICATED USERS represents all of the users in your Active Directory, on prem or in the cloud.
  • Everyone at the AD level is NT AUTHORITY\AUTHENTICATED USERS plus the Guest account. The Guest is disabled both by default and as a best practice. (You don’t see this one in SharePoint, but it is often listed as being the same as the SharePoint “Everyone”.)
  • Everyone is defined at the SharePoint level and includes all users authenticated to SharePoint.
  • Everyone except external users is found in SharePoint Online / Office 365 and is as named. External users are people not in your Active Directory, most likely not employees, who got their access from site members clicking the SHARE buttons.
  • All Users (<somename>) is SharePoint defined and represents all of the users from a selected authentication provider. (If I created a Forms Based Authentication provider named “Vendors” then I would have “Everyone (Vendors)”
  • All Users (windows) is SharePoint defined and is same as NT AUTHORITY\AUTHENTICATED USERS. After adding “All Users (windows)” to a site it is displayed as “All Users (windows)” in 2013 on prem and 2016 on prem, but is displayed as NT AUTHORITY\AUTHENTICATED USERS in Office 365.
  • Guest Contributor and Guest Reader are at this time only found in SharePoint Online / Office 365 and represent users with anonymous / link access.

 

Best Practices

I was reviewing some training materials recently and ran across a statement to the effect you should put NT AUTHORITY\AUTHENTICATED USERS in all of your site Visitors groups so everyone can find content in SharePoint. Should you do this? Should everything in your SharePoint be freely accessible to everyone who can logon to your network? Contractors, vendors, summer co-ops, part timers? If you don’t already have a policy or governance on this, then you should be working on it.

SharePoint does not give us any way to prevent the use of the “Everyone” accounts, so you will need to deal with this through education and auditing.

UPDATE! Anders Rask responded to this post with info about a SharePoint Online cmdlet that can hide these “everyone” options in the people pickers. Turns out there are three options:

Set-SPOTenant -ShowEveryoneClaim $false
Set-SPOTenant -ShowEveryoneExceptExternalUsersClaim $false
Set-SPOTenant -ShowAllUsersClaim $false

The Set-SPOTenant cmdlet: https://technet.microsoft.com/en-us/library/fp161390.aspx 
Blog:
https://blogs.office.com/2015/07/16/new-it-management-controls-added-to-onedrive-for-business/

 

Here’s a short list of best practices. The term “everyone” used here includes NT AUTHORITY\AUTHENTICATED USERS and any account that starts with “Everyone” or “All Users”.

  • Educate your users on security, including the use of the “everyone” accounts.
  • Do not use “everyone” accounts if a site contains non-public data.
  • Document who “everyone” is. There’s more than one “everyone” group in SharePoint.
  • Perform regular audits using PowerShell or 3rd party tools to track the usage of “everyone” groups.
  • Document, audit and enforce your SharePoint content policies. Document what is allowed, and what is not allowed to be stored in SharePoint.
  • If you do encourage the use of the “everyone” groups, add a banner to the top of every page that declares “Do not post confidential data in this SharePoint site! It can be seen by everyone with network access.”

 

The Built-In Accounts

While your SharePoint may vary… see the Notes column… here’s a list of the accounts that may include users other than those who you were expecting. This is not complete, so if you discover others please post a comment to this article.

DisplayName UserLogin or SystemUserKeyProperty Notes
     
All Users (membership) 
c:0!.s|forms%3amembership
Only O365
All Users (windows) 
c:0!.s|windows
Same as NT AUTHORITY\ authenticated users
All Users (yourFBAMembershipProviderName) c:0!.s|forms%3aYourFBAMembershipProviderName Form Based Authentication
Everyone c:0(.s|true   
Everyone except external users c:0-.f|rolemanager|spo-grid-all-users/17b83262-5265-… Only O365 (ID will vary)
NT AUTHORITY\ authenticated users c:0!.s|windows  
Guest Contributor SHAREPOINT\writer_9e8a77849f89425c9cff6a6af5175… ID varies with share
Guest Reader SHAREPOINT\reader_cb6f6371456b4542ba0609638a4…  
     
     
_SPOCacheFull ylo001\_spocachefull Only O365. Visible only from PowerShell
_SPOCacheRead ylo001\_spocacheread Only O365. Visible only from PowerShell
_spocrawler_17_3910 ylo001\_spocrawler_17_3910 Only O365 (ID will vary)
System Account SHAREPOINT\system Visible only from PowerShell
System Account S-1-0-0 SystemUserKeyProperty
Company Administrator s-1-5-21-1851826741-1401831065-3463747319-87287… Only O365 (ID will vary)
     
Typical user (Sam Conklin) samc@yourDomain.onmicrosoft.com As seen in O365 PowerShell
Typical user (Sam Conklin) i:0#.w|yourDomain\samc As seen in On Prem PowerShell
Typical user (Sam Conklin) i:0).w|s-1-5-21-2499188511-2905385804-3446143336-… SystemUserKeyProperty
Typical FBA user (Susan) i:0#.f|YourFBAMembershipProviderName|susan Form Based Authentication

.

3/11/2016

New SharePoint 2016 Courses Coming from Microsoft

 

Microsoft is releasing two new SharePoint 2016 administrator courses in July. The courses have a new numbering scheme to better reflect the “Part 1” and “Part 2” nature of the pair. 20339-1 and 20339-2. While the focus is on on-premises SharePoint 2016, some Office 365 content is included.

Course 20339-1: Planning and Administering SharePoint 2016
https://www.microsoft.com/en-sg/learning/course.aspx?cid=20339-1
Publish date: July 8, 2016

Course 20339-2: Advanced Technologies of SharePoint 2016
https://www.microsoft.com/en-sg/learning/course.aspx?cid=20339-2
Publish date: July 21, 2016

.

3/10/2016

SharePoint: I Just Love Consistency! SharePoint, Not So Much

 

SharePoint 2016 is so similar to SharePoint Online / Office 365 that it’s sometimes hard to tell which version you are in. I just ran across an odd change from the past versions. How do you share or break inheritance on a list item?

The steps are different and the end results are different. And I thought 2016 was supposed to be SharePoint Online brought onsite.

 

SharePoint 2013

  • Shared With is available in the ITEMS ribbon and the ribbon of the View Properties page.
  • The “…” menu has a Shared With option:
      image
  • The above link takes you to the Shared With popup.

 

SharePoint Online / Office 365

  • Shared With is available in the ITEMS ribbon and the ribbon of the View Properties page.
  • The “…” menu has a Share option:
      image
  • The above link takes you to the Shared With popup.

 

SharePoint 2016

  • Shared With is grayed out in the ITEMS ribbon, but is available in the ribbon of the View Properties page.
  • The “…” menu has an Advanced popout that has a Manage Permissions option:image
  • The above link takes you to the user.aspx Permissions page.

 

 

I write training materials and really wish I was paid by the word or page! These detail differences waste hours and complicate training!

 

.

SharePoint: Undocumented Pending Shares Page

 

Article applies to SharePoint 2013, SharePoint Online and SharePoint 2016.

 

image

Did you ever wonder after using the Share buttons in SharePoint if the Site Owner ever responded to your request, responded with a question, or approved the request?

The My Permissions page

As I can’t find any documentation, I’ll call this undocumented for now… After a bit of web searching I did find a mention of the page in an Ignite presentation. In any case, this page lists the status of pending requests and lets the user who made the request check and send messages to the site owners. Requests that have been approved or declined will not be listed here.

The site owner can see your requests by going to Settings (gear), Site Settings, Site Permissions and clicking “Show access requests and invitations”. This will take them to the Access Requests page at _layouts/Access%20Requests/pendingreq.aspx.

You can check your pending requests by going to:
http://yourDomain/sites/yourSite/_layouts/mypermissions.aspx
This link will redirect to /_layouts/15 for now and may change in future versions.

Of course, no one knows about this page. There are no out of the box links to it. And… the site owner will probably not know to click the “SEND” button to start a conversation with the person who made the request.

If “Sharing” is important in your organization, you will need to provide some training, easy access to a link to the MyPermissions page, and do some work to “drive adoption”.

image

 

Details:

  • Only “Pending” requests are displayed. Approved requests are not.
  • You can click the “…” to see messages from the site owner, or to send a message to the site owner.
    image
  • This pending invites listed are unique to the current site. I.e. each site has its on MyPermissions page.

 

.

3/08/2016

SharePoint PowerShell Training for Auditing and Site Content Administration

 

image

If you have followed this blog, you know that I’m kind of a SharePoint nut who’s also a PowerShell nut. Over the years I have created a lot of PowerShell scripts while working with SharePoint and answering questions in my classes and in the TechNet forums. There’s plenty of resources for installing and configuring SharePoint using PowerShell, but there’s little on dealing with all of the daily questions on premise admins get that can be quickly answered using PowerShell. I was just going to take my 100+ scripts and create something like a “cookbook”, but instead created a class. The class handout kind of ended up as the cookbook… 85 pages and 175 sample scripts, or maybe more like a giant PowerShell cheatsheet for SharePoint.

This class is for on-premise SharePoint 2010, 2013 and 2016 administrators. A SharePoint Online version is in the works, but not available yet.

If you would like to attend this class, delivered by the author (your’s turely!), we are offering it next Monday, March 14th, at MAX Technical Training in Cincinnati, Ohio. You can attend this class at MAX or remotely from anywhere. If you can’t attend this class, it is available from trainging centers all over the world.

March 14th class at MAX: SharePoint 2010 and 2013 Auditing and Site Content Administration using PowerShell

Search for this class at other training centers: https://www.bing.com/search?q=55095%20powershell

If you would like to see some of the other courses and books I’ve written, then click here.

 

55095 SharePoint 2010 and 2013 Auditing and Site Content Administration using PowerShell

This one day instructor-led class is designed for SharePoint 2010 and 2013 server administrators and auditors who need to query just about anything in SharePoint. The class handout is effectively a cheat sheet with over 175 PowerShell scripts plus the general patterns to create your own scripts. These scripts cover:

  • using the SharePoint Management Shell and the ISE
  • general tips for counting, reformatting and exporting results;
  • drilling up and down the SharePoint object model
  • getting lists / inventories of servers, services web applications, sites, webs, lists, libraries, items, fields, content types, users and much more
  • finding lists by template type, content type and types of content
  • finding files by user, content type, file extension, checked out status, size and age
  • finding inactive sites
  • finding and changing SharePoint Designer settings and finding and resetting customized pages
  • inventorying and managing features
  • deleting and recycling files and list items
  • inventorying users and user permissions and finding out “who can access what”
  • creating sites, lists and libraries
  • uploading and downloading files
  • and much more…

At Course Completion

After completing this course, students will be able to:

  • Use PowerShell to query just about anything inside of SharePoint.
  • Understand the core SharePoint object model and object hierarchy as seen from PowerShell.
  • Format PowerShell output in to reports.
  • Manage resources to limit the impact on production servers.
  • Create and delete Site Collections, subsites, lists, libraries and content.

Prerequisites

Before attending this course, students must:

  • Very good knowledge of SharePoint and its features.
  • Good experience using PowerShell 2 or later or recent completion of a PowerShell class such as 10961 or 50414.

Course Outline

Module 1:  SharePoint and PowerShell

This module provides an introduction to the topics covered in the class, introduces SharePoint PowerShell terminology and provides a review of important PowerShell features.

Lessons:

  • History of PowerShell in SharePoint
  • PowerShell vs. Search
  • PowerShell, SharePoint Management Shell and cmdlets
  • Security and Permissions Needed
  • Getting Started with PowerShell: Counting Items, Custom Columns, Reformatting Numbers, Saving Results to a File
  • Changing and Updating Content: Creating SharePoint Objects, Changing Objects

Lab:

  • Using PowerShell with SharePoint

After completing this module, students will be able to:

  • Get started using PowerShell to inventory and update SharePoint.

Module 2: Working with SharePoint CMDLETs and Objects

This module introduces the SharePoint object model and some important terminology.

Lessons:

  • GUIDs
  • Sites vs. Webs
  • The SharePoint Object Hierarchy

Lab:

  • Get a list of all Site Collections and their GUIDs
  • Get a list of all Webs in all Site Collections
  • Given a web’s URL get its parent web and web application

After completing this module, students will be able to:

  • Explore sites and webs using PowerShell.
  • Retrieve important properties of common SharePoint objects

Module 3: Managing Memory and Limiting Performance Impact

This explores limiting impact on server memory usage and performance.

Lessons:

  • Memory Management and Disposing Objects
  • Limiting Impact on Production Servers

Lab:

  • Exploring PowerShell’s use of system memory.
  • Testing the impact of scripts on server performance

After completing this module, students will be able to:

  • Recognize and manage the impact of PowerShell on a SharePoint server.

Module 4: Working with Content

This module explores SharePoint using PowerShell from the Farm down to individual list items.

Lessons:

  • Getting Farm Information: version, services, services, features
  • Getting Web Application information
  • Exploring Site Collections: retrieve Site Collections, Site Collection Administrators, quotas
  • Working with the Recycle Bins: finding items, getting file counts and bytes, deleted sites
  • Exploring Webs: web templates, finding webs, finding webs based on template, Quick Launch and Top Link Bar navigation
  • Exploring Lists and Libraries: finding all lists, lists by type, lists by Content Type, columns/fields, document count by web or library
  • Exploring Content Types
  • Finding documents: by a word in the title, file type, content type, size, date age, checked out status, approval status and many more…
  • Deleting content
  • Downloading and uploading files

Lab:

  • Explore the farm.
  • Inventory site collections.
  • Create a recycle bin report.
  • Finding all blog sites.
  • Find all picture libraries.
  • Find all PDF files over 5 MB.
  • Delete all videos in a site collection.

After completing this module, students will be able to:

  • Explorer, inventory and maintain SharePoint content using PowerShell.

Module 5: Users and Security

This module covers the use of PowerShell to explore and document SharePoint permissions.

Lessons:

  • Users: find a user, get a list of all users, working with Active Directory groups
  • SharePoint groups: Get lists of groups, get the members of a group, find all groups a user belongs to, find the groups associated with a web
  • Expanding users lists that include Active Directory groups
  • Documenting Broken Inheritance / Unique Permissions: webs, lists, libraries, folders, items
  • Working with Role Assignments

Lab:

  • Get a list of all users who have access to a Site Collection.
  • Get a list of all groups in a Site Collection.
  • Get a list of all groups a user belongs to.
  • List all users who may have access to a SharePoint securable.
  • Get a list of all securables with broken inheritance.

After completing this module, students will be able to:

  • Explore and document users and user permissions.
  • Explore and document SharePoint groups.
  • Explore and document broken inheritance.

Module 6: Managing Sites

This module explorers Site Collection and Web management from PowerShell.

Lessons:

  • Finding Inactive Webs
  • Creating and Deleting Site Collections
  • Getting Site Collection Data
  • Creating and Deleting Subsites
  • Working With SharePoint Designer Settings

Lab:

  • Create a report for inactive sites.
  • Create a site collection and subsites.
  • Delete a site.
  • Delete a site collection.
  • Disable SharePoint Designer in all site collections.

After completing this module, students will be able to:

  • Manage SharePoint Site Collections and webs from PowerShell.

Audience

  • SharePoint server administrators.
  • SharePoint auditors.
  • Also valuable for SharePoint developers.

3/06/2016

SharePoint: The Waffle button is the Waffle button!

 

Something for the SharePoint trivia department…

What do you call this:

image

I had always thought that calling the App Launcher button in Office 365 and SharePoint 2016 the “waffle button” was a bit of a joke. It does look kind of like a waffle, there is no mouse-over tip to give a hint, and no one would ever guess “App Launcher”. Turns out that the word “waffle” is actually in the HTML! So going forward, I will consider both to be an acceptable name for the button.

image

 

Ok, back to work… do something useful…

 

.

2/21/2016

Hide the Attachments Link in a SharePoint Form

 

The problem… While we do want site visitors to see the list items, we don’t want them to see or click the list’s attachments.

More SharePoint Customization tricks!
More Site Owner articles.
More articles about the SPSecurityTrimmedControl
image

One approach is to use CSS and a handy SharePoint control. You could also write a JavaScript solution. Here we will look at the CSS option.

Note: This is not security! This is hiding some HTML using CSS. Users can right-click and select View Source to discover the text hidden by the CSS.

 

General pattern:

  1. View the DispForm.aspx page (the view properties popup in SP 2010) for an item in the list.
  2. Press F12 to open the IE Developer Tools.
  3. Use the Internet Explorer F12 panel’s Select Element button to discover an appropriate tag and ID that could changed by CSS to show/hide the content.  (For this example it happens to be “idAttachmentsRow”.)
    image
  4. Edit the DispForm.aspx page using SharePoint Designer.
  5. Add CSS to hide the tag from everyone.
  6. Add a SharePoint control with additional CSS to unhide the content for users with at least the Edit permission. Set the SharePoint control to only display its content for people who can edit list items.

The SPSecurityTrimmedControl

The magic here is that the SPSecurityTrimmedControl can selectively display content based on a user’s assigned permission. As an example, users with the Read permission level do not have the EditListItems permission while members and owners do. Note that the control can only be set to a single permission, not a Permission Level or group.

More detailed steps:

  1. Open SharePoint Designer and your site.
  2. Click Lists and Libraries and your list.
  3. Click the DispForm.aspx file.
  4. In the ribbon click Advanced Mode.
  5. Find the PlaceholderMain Content tag (<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">)
  6. Add the following block of HTML just after that tag.
  7. Save your changes and test.

 

SharePoint 2010 (and probably 2007) version:

<style type="text/css">
  #idAttachmentsRow { display:none }
</style>
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="EditListItems">
  <style type="text/css">
    #idAttachmentsRow { display:inline }
  </style>
</Sharepoint:SPSecurityTrimmedControl>

SharePoint 2013 and SharePoint Online / O365 (and probably 2016) version:

<style type="text/css">
  #idAttachmentsRow { display:none !important }
</style>
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="EditListItems">
  <style type="text/css">
    #idAttachmentsRow { display:table-row !important}
  </style>
</Sharepoint:SPSecurityTrimmedControl>

A list of the PermissionsStrings can be found here: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx

More about using SPSecurityTrimmedControl can be found here: http://techtrainingnotes.blogspot.com/2009/07/sharepoint-run-javascript-based-on-user.html

 

.

2/20/2016

If you have not finished your SharePoint 2013 Dev Certs… better get to work!

 

Microsoft is “expiring” a long list of exams in September.

This means that:
  • Anyone working on the related certifications has six months to complete these exams, or never be able to finish certifications they have been working on.
  • Anyone wanting these certifications better get started ASAP.
  • Time to review your study and training plans and budgets!
  • You should review the rest of the “Expiring exams list” to see what else is going away, and check this list periodically . (dates currently range from March to Sept 2016.)
  • New certifications, exams and classes are going to be announced soon.

 

These certifications are Impacted. (The tests for them expire 9/16.)

  • MCSD: Windows Store Apps Using HTML5 (481, 482, 490)
  • MCSD: Windows Store Apps Using C# (484, 485, 491)
  • MCSD: SharePoint Applications 2013 (488, 489, 517)

These exams are going away in September:

  • 481: Essentials of Developing Windows Store Apps Using HTML5 and JavaScript
  • 482: Advanced Windows Store App Development Using HTML5 and JavaScript
  • 484: Essentials of Developing Windows Store Apps Using C#
  • 485: Advanced Windows Store App Development Using C#
  • 488: Developing SharePoint Server 2013 Core Solutions
  • 489: Developing SharePoint Server 2013 Advanced Solutions
  • 490: Recertification for MCSD: Windows® Store Apps using HTML5
  • 491: Recertification for MCSD: Windows Store Apps using C#
  • 492: Upgrade Your MCPD: Web Developer 4 to MCSD: Web Applications Examination
  • 499: Recertification for MCSD: Application Lifecycle Management
  • 517: Recertification for MCSD: SharePoint Applications

 

Links:

 

.

2/19/2016

Azure Exams 70-532, 70-533 and 70-534 Getting an Update!

 

Working on your Azure certifications? Take a break and go look at the list of announced updates. While they are listed as being updated as of March 16th, 2016, at least some the listed changes have already been applied.

The exams:

  • 70-532 Developing Microsoft Azure Solutions
  • 70-533 Implementing Microsoft Azure Infrastructure Solutions
  • 70-534 Architecting Microsoft Azure Solutions

 

The links to the exam changes PDFs:

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.