The new code snippet feature in Teams

UserVoice is one of the places where you can provide Microsoft feedback on their products. Sometimes they put ideas from UserVoice on the backlog and roll it out as a new feature. Recently they did the same thing with the code snippets idea in Microsoft Teams. In this article I will take a quick look at this new feature. Continue reading The new code snippet feature in Teams

SharePoint 2013: How to verify ULS log and Usage log file access

Title

How to verify ULS log and Usage log file access in SharePoint 2013 via PowerShell

Business Goal

Recently I had an incident involving Usage reports that weren’t working properly in a SharePoint 2013 farm. I found a nice troubleshooting article which really helped: Snowburnt…IT happens – How to troubleshoot SharePoint Usage Reports Usage Reports.

One of the checks was what the group permissions of the WSS_WPG and WSS_ADMIN_WPG were on the ULS and Usage log file directory on the different servers in the SharePoint 2013 farm. Since I didn’t wanted to uses explorer I decided to create a script to analyse this.

Technical Overview

The solution is a PowerShell script that uses some different cmdlets (Get-SPServer & Get-SPUsageService) from the SharePoint module and the Get-Acl cmdlet. From the Usage Service you can easily get the usage and log file directory path. Via an UNC path you can check the group permissions via the Get-Acl cmdlet. I use the Get-SPServer to determine on which servers to check these permissions.

Prerequisites

To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to one of the SharePoint 2013 servers
– A domain account that has privileges to manage SharePoint 2013 via PowerShell (SPShellAdmin role)

Steps

1. Run the Powershell script .\verify_logfileaccess.ps1

Additional resources

Gallery Technet – Verify ULS and Log file access
Snowburnt…IT happens – How to troubleshoot SharePoint Usage Reports Usage Reports
Technet Library – Account permissions and security settings in SharePoint 2013
Technet Library – Get-Acl
Technet Library – Get-SPServer
Technet Library – Get-SPUsageService

Applies to

SharePoint 2013

Change History

22-09-2016 – 1.0

SharePoint 2013: How to get the available page layouts of a web

Title

Get the available page layouts of a web in SharePoint 2013 via PowerShell

Business Goal

In my work as a consultant I sometimes need to analyse how a current SharePoint 2013 farm looks like. Of course you have great tools to help you with this like SPDOCKit. But sometimes I need more details of a farm. In this case I needed information on what kind of page layouts where used on a web.

Technical Overview

The solution is a PowerShell script that uses GetAvailablePageLayouts method to get the available page layouts of a web in a SharePoint 2013 farm. It also uses a definition of a parameter to get a value of a web. A nice description of this technique can be found in an article of Don Jones in Technet Magazine – Windows PowerShell: Defining Parameters.

Prerequisites

To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to one of the SharePoint 2013 servers
– A domain account that has privileges to manage SharePoint 2013 via PowerShell (SPShellAdmin role)

Steps

1. Run the Powershell script .\get_pagelayouts.ps1 with your desired weburl, for instance .\get_pagelayouts.ps1 http://weburl

Additional resources

Gallery Technet – Get the available page layouts of a web
SPDOCKit
Technet – PublishingWeb.GetAvailablePageLayouts method
Technet Magazine – Don Jones – Windows PowerShell: Defining Parameters

Applies to

SharePoint 2013, SharePoint 2010

Change History

23-01-2015 – 1.0

Windows Server 2012: How to change password when connected via Remote Desktop

Title

Change password when connected via Remote Desktop

Business Goal

Like a lot of people on the internet I was missing the change password option. Normally that is no problem because there are some shortcut keys for this (CTRL + ALT + END). But those were actually not working when I was connected to a customer environment via a Remote Desktop Session.

Change Password Option

Technical Overview

The basic idea was from this thread on Technet. But in stead of using VBS I just wanted to use PowerShell for this. The solution is a simple PowerShell script that uses New-Object cmdlet of PowerShell. By creating a new Shell object you can run the WindowsSecurity method.

Prerequisites

To complete this how-to, you must have the following prerequisites must be met:
– A domain account that can log on to the Windows Server 2012
– A domain account that has access to Windows PowerShell

Steps

1. Run the Powershell script in Windows PowerShell via the following command .\get_windowssecurity.ps1

Additional resources

Dev Center – Shell object
Dev Center – Shell.WindowsSecurity method
New-Object
Technet Forums – How do I change password when connected to Remote Desktop?

Applies to

Windows Server 2012

Change History

23-09-2014 – 1.0