Introduction to the PowerShell Management Agent

Slides:



Advertisements
Similar presentations
NIMAC 2.0: The Accessible Media Producer Portal NIMAC 2.0 for AMPs.
Advertisements

AD User Import From SIMS.NET
12-CRS-0106 REVISED 8 FEB 2013 PRESENTS vTools Voting: Getting Voter List.
Eric J. Oszakiewski MCTS: SharePoint Application Development SharePoint Configuration.
Office 365 Identity June 2013 Microsoft Office365 4/2/2017
The ]po[ Workflow Introduction Frank Bergmann, This guide contains ]po[ workflow overview information for developers with experience with PostgreSQL.
Services Course Windows Live SkyDrive Participant Guide.
Whether you like it or not! Importance increases significantly with SharePoint 2013 Pretty much every investment area relies on Profiles for core.
© 2009 GroundWork Open Source, Inc. PROPRIETARY INFORMATION: Information contained herein is not for use or disclosure outside of GroundWork Open Source,
SFDC Integration Basics Gerry Winning. Integrating Your Progress App with SFDC Ovid Back Office App is Fully Integrated with SFDC (about two and a half.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Introduction to HTML Bent Thomsen Institut for Datalogi Aalborg Universitet.
1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
Installation and Deployment in Microsoft Dynamics CRM 4.0
Unauthorized Reproduction Prohibited SkyPoint Alarm Integration Add-On Using OnGuard Alarms to create events in SkyPoint Also called ‘SkyPoint V0’ CR4400.
Microsoft Office Illustrated Using Advanced Features.
Exchange server Mail system Four components Mail user agent (MUA) to read and compose mail Mail transport agent (MTA) route messages Delivery agent.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Internet, 16 July 2014 Predica bag of (FIM)tricks Tomasz Onyszko
Chapter 8 Chapter 8: Managing the Server Through Accounts and Groups.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
How to Establish a Blog. What is a Blog A blog is a collection of informational articles/ideas intended to update a viewer on new information associated.
ManageEngine ADAudit Plus A detailed walkthrough.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
SmartLog X 3 TEAM Basic SmartLog X 3 TEAM Basic DescoEMIT.com USER STATUS USER EDIT TEST LOG ADMIN TEST MACHINE SCHEDULE INSTALL System Requirements:
Migration XenDesktop 7. © 2013 Citrix | Confidential – Do Not Distribute Migration prerequisites Set up a XenDesktop 7 Site, including the site database.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Chapter 7 PHP Interacts with Ms. Access (Open DataBase Connectivity (ODBC))
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
© 2011 PLANET TECHNOLOGIES, INC. Extending User Profiles with Line of Business Data Patrick Curran, MCT FEBRUARY 24, 2013.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
Customer Service and Support Sutherland Global Services Consultant Learning Services Microsoft Store.
Section 1: Introducing Group Policy What Is Group Policy? Group Policy Scenarios New Group Policy Features Introduced with Windows Server 2008 and Windows.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Tom Castiglia Hershey Technologies
The In’s and Out’s of the IIS 6.0 Migration Tool The In’s and Out’s of the IIS 6.0 Migration Tool Chris Adams Web Platform Supportability Lead Microsoft.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Enabling High-Quality Printing in Web Applications
DTS Conversion to SSIS Conversion Best Practices Mike Davis
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
Searching Business Data with MOSS 2007 Enterprise Search Presenter: Corey Roth Enterprise Consultant Stonebridge Blog:
Module 4 : Installation Jong S. Bok
Oracle Data Integrator Procedures, Advanced Workflows.
10/25/20151 Single Sign-On Web Service Supervisors: Viktor Kulikov Alexander Sherman Liana Lipstov Pavel Bilenko.
Presentation_title Forefront Identity Manager 2010
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
Guide to MCSE , Second Edition, Enhanced1 The Windows XP Security Model User must logon with: Valid user ID Password User receives access token Access.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Master Data Management & Microsoft Master Data Services Presented By: Jeff Prom Data Architect MCTS - Business Intelligence (2008), Admin (2008), Developer.
Mirek Sztajno SQL Server Security PM
Chapter 4- Part3. 2 Implementing User Profiles A local user profile is automatically created at the local computer when you log on with an account for.
Configuring and Deploying Web Applications Lesson 7.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
How To Build a Production-Ready SP 2013 Farm Martin Cox SharePoint / O365 Architect SharePoint 2013 BI Farm Setup Best Practices.
BIT 286: Web Applications Lecture 04 : Thursday, January 15, 2015 ASP.Net MVC -
SQL Database Management
ASP.NET Programming with C# and SQL Server First Edition
Max Fritz Senior Systems Consultant, Now Micro
CollegeSource Security Application &
z/Ware 2.0 Technical Overview
Using Microsoft Identity Manger with SharePoint 2016 to fill the User Profile Sync Gap Max Fritz Senior Systems Consultant Now Micro.
Introduction to CodeIgniter (CI)
Searching Business Data with MOSS 2007 Enterprise Search
Kent Nordström Blog: Twitter:
Searching Business Data with MOSS 2007 Enterprise Search
Hybrid Search Technical Guidance.
SharePoint 2016 in MIM 2016 Robi Vončina Kompas Xnet.
Michelle Haarhues Keeping up with SSMS.
How to install and manage exchange server 2010 OP Saklani.
Presentation transcript:

Introduction to the PowerShell Management Agent Søren Granfeldt (soren@granfeldt.dk) Twitter - @MrGranfeldt Blog - http://Blog.goverco.com

To create a management agent that could fit any MA needs not covered by built-in Management Agents Every customer project has shown need for custom code and/or Management Agents and it was originally built as part of customer project I love PowerShell and the .NET Framework and all it’s possible magic If we can hit it with PowerShell, we can get at it with FIM, I tell my customers PowerShell’s pretty easy for it-pro’s to understand A high interest from other customers and consultant helped decision make it publically available Its free (http://blog.goverco.com/p/powershell-management-agent.html) Current version is 4.5 but new version is coming soon Built on ECMA2 Now part of every FIM project that I do – and used for managing a lot of systems Proof-of-Concepts (PoC’s) Office 365 SharePoint User home/profile directories (have made som cool ones with DFS configuration and remote PS) - DEMO SQL/Oracle (with delta support) - DEMO Web services (REST/OData, SOAP etc.) Plain text files with weird formatting and/or weel-structured XML files Even Active Directory (as supplement to built-in ADMA) Pictures (from share to FIM/Active Directory) Has replaced a few advanced import and export flows (i.e. casing, normalizing and other formatting stuff) Other uses – ODBC with Lotus Notes / Kent Nordström - http://blog.konab.com/2013/04/using-powershell-ma-to-replace-ecma-1-0- used-for-odbc/ HomeFolders / Kent Nordström - http://blog.konab.com/2013/03/homefolder-script-for-powershell-ma/ OpenLDAP / Kent Nordström - http://blog.konab.com/2013/02/replacing-openldap-ma-with-ps-ma/ Pictures / Remi Vandemir - http://www.iamblogg.com/2013/04/14/import-pictures-into-fim-portal/ vision and background

The technical stuff One simple setup / install on your FIM sync box Consists of a packaged MA Supports Full and delta import paged import is supported from next version Constructed anchor also supported in next version Export Password Management Flexible schema All functionality is in your PowerShell scripts; you need to be the PS guru Schema Import Password Management (optional) You MUST know PowerShell to make the most of this MA – but then almost no limits to functionality and creativity All scripts are run in the security context of the Synchronization Service service account, so make sure that the account can run scripts on your FIM box. Alternative credentials can be specified on the MA and these are passed to all scripts. MA logging can be turned on through manual registry key Automatic log file clean up may be in next version The technical stuff

Defines which attributes the MA has and your import/export scripts can use Called on configuration and on schema refreshes Very simple syntax; just create one or more PSCustomObjects and stick them into the pipeline Sample script with two object types - $obj = New-Object -Type PSCustomObject $obj | Add-Member -Type NoteProperty -Name "Anchor-Id|String" -Value 1 $obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "user” $obj | Add-Member -Type NoteProperty -Name "AccountName|String" -Value "SG” $obj | Add-Member -Type NoteProperty -Name ”DisplayName|String" -Value "Soren Granfeldt” $obj | Add-Member -Type NoteProperty -Name "ObjectSID|Binary" -Value 0x10 $obj | Add-Member -Type NoteProperty -Name "JustABoolean|Boolean" -Value $true $obj | Add-Member -Type NoteProperty -Name "Manager|Reference" -Value 2 $obj | Add-Member -Type NoteProperty -Name "MemberOf|Reference[]" -Value (2,3) $obj | Add-Member -Type NoteProperty -Name ”ProxyAddresses|String[]" -Value ("Value1", "Value2") $obj $obj = New-Object -Type PSCustomObject $obj | Add-Member -Type NoteProperty -Name "Anchor-id|String" -Value 0x10 $obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value ”group” $obj | Add-Member -Type NoteProperty -Name "AccountName|String" -Value ”group1” $obj | Add-Member -Type NoteProperty -Name ”DisplayName|String" -Value ”Sales Department” $obj | Add-Member -Type NoteProperty -Name "Members|Reference[]" -Value (2,3) $obj Schema script

Import script Called for each import operation Takes five parameters – $Username and $Password (configured on MA) $OperationType (Full or Delta) $UsePagedImport (boolean) (next version) $PageSize (how many or less objects to return) (next version) $global:RunStepCustomData value is passed between MA and import script. Holds delta watermark (if you want to support delta) Must be maintained by script $global:PageToken value is passed between MA and import script. Holds your paging token You should stuff a hashtable object in the pipeline for each import object Control values are in brackets - [DN], [ErrorName], [ErrorDetail] To signal import success send ‘success’ text value in [ErrorName] or custom errormessage to signal import failure For delta deletes, return only anchor value, objectclass and special attribute ‘changeType’ with value delete A sample return hashtable with an import error may look like this - $Obj = @{} $Obj.Add("Id", "1") $Obj.Add("[DN]", "CN=Luke Skywalker,OU=Normal Users,DC=domain,DC=com") $Obj.Add("sAMAccountName", "LS") $Obj.Add("[ErrorName]", "read-error") $Obj.Add("[ErrorDetail]", "An permission error occurred during directory read") $Obj Import script

Export script Called for each export operation Export objects are batched in pipeline Always paged (pagesize determined by Run Profile) Object Replacements (no value means null/delete) Script takes two parameters – $Username and $Password (configured on MA) Two flavors of export objects CSEntryChange (see MSDN) Simple object (PSCustomObject with all attributes and control values) [Identifier], [Anchor], [DN], [ObjectType], [ChangedAttributeNames], [AttributeNames], [ObjectModificationType] Return hashtable object in the pipeline for status of each export Control values [DN], [ErrorName], [ErrorDetail] Next version will allow you to return datasource constructed anchor (SQL, Office 365 and other similar datasources) A sample return hashtable object with no export error may look like this - $status = @{} $status."[Identifier]" = $identifier #the identifier (cs guid) $status."[ErrorName]" = ”success” $status."[ErrorDetail]" = ”” $status Export script

Password Management script Script is called on password changes and sets received from Password Change Notification Service (PCNS) If password change/set is unsuccessful, just throw error PS C:\> throw “up” #or a bit better description  If not using PCNS, just create empty script as MA requires script file to exist Password Management script

Demo environment FIM Synchronization Server (R2) Flat file for HR data (has account name, first and lastname) Default AD management agent PowerShell MA for full/delta import and export to remote SQL server with simple Stored Procedures for calculating users displayname and home directory path Some calculations could of course be done in FIM Service instead PowerShell MA for home directory management Imports users from AD and uses join (no provisioning) Manages homeDrive and homeDirectory No FIM Service or FIM portal Provisioning is done using FIM Codeless Provisioning Framework (https://fimmre.codeplex.com/) – simple XML rules and metaverse rules extension Demo environment

Now for the risky part of the presentation – a live demo..!

Powerfull MA but you need to write solid PowerShell scripts for it Gotcha’s No space in script paths or use short path name Set PowerShell Execution Policy for Synchronization Service service account Later version may have option to select security context to run scripts (impersonate) Error message ‘Unable to retrieve schema’ may be permission issue or plain error in schema script New version coming out soon Constructed anchors on import Optional paged imports Additional control values on Simple Export objects making it preferable in most cases [Anchor], [ChangedAttributeNames], [AttributeNames] A few bugfixes Has really been very stable; most errors has been script errors Support No free direct support FIM 2010 forum / PowerShell forums (I may just visit that from time to time) Thanks for all ideas; they help shape the MA’s future Mail ideas to soren@granfeldt.dk or Twitter DM @mrgranfeldt Better yet – share them as comments on the blog for others to comment on as well Wrap-up and questions