Book Image

Microsoft System Center 2016 Service Manager Cookbook - Second Edition

By : Steve Buchanan, Steve Beaumont, Anders Asp, Dieter Gasser, Andreas Baumgarten
Book Image

Microsoft System Center 2016 Service Manager Cookbook - Second Edition

By: Steve Buchanan, Steve Beaumont, Anders Asp, Dieter Gasser, Andreas Baumgarten

Overview of this book

Keep your organization up to speed with the Microsoft System Center 2016 Service Manager Cookbook. Over 100 practical recipes for SCSM 2016 give you all the tools to master IT service management.
Table of Contents (23 chapters)
Microsoft System Center 2016 Service Manager Cookbook - Second Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Getting SCSM security roles of a specific user with PowerShell


SCSM security role delegation can be managed (listed and modified) using PowerShell commands. In this recipe, we discuss and provide steps to list all SCSM security roles a specific user is a member of using the SCSM PowerShell commands.

Getting ready

You need to ensure you have successfully installed the SCSM product, are a user in the SCSM Administrators role and have the SCSM console open.

You must download and install the SCSM PowerShell Cmdlets found at http://smlets.codeplex.com/ (see the Downloading and installing SMLets recipe in Chapter 12, Automating Service Manager 2016).

How to do it...

Here are the steps you must follow to list the configuration of security roles using PowerShell commands:

  1. Type the following code into a notepad or a plain text editor:

          Param([string]$userName) 
     
          # Name of the SCSM Management Server 
          $smDefaultComputer = "TDSCSM03" 
     
          Import-Module SMLets 
          Import-Module ActiveDirectory...