Following this, you can dissect any one single operation (using its sequenceID or JobID) with Trace-xDscOperation to find out what it did behind the scenes. Ideally, you would first want to use Get-xDscOperations to list out the last few DSC configuration runs on your machines. These details can be extracted using the xDscDiagnostics module as well
That would display the same result as the Get-Winevent cmdlet, such as in the output below.įigure 7 : Output that is identical to a get-winevent output. To display all the events for a particular DSC operation, the following command would suffice: Hence, we could obtain information on the events too, if we saved the output of Trace-xDscOperation into a variable. It contains more information such as the task, eventID, level, etc. This can also the obtained from running the cmdlet Get-Winevent, as in the blog here. These results are summarized in the output of Get-xDscOperation.įigure 1 : Get-xDscOperation that shows a simple output for a list of operations executed in a machineĮvent: This is the actual event logged by DSC, of type .EventLogRecord. This cmdlet lets you find the results of the DSC operations that run on one or multiple computers, and returns an object that contains the collection of events produced by each DSC operation.įor instance, in the following output, we ran three commands, the first of which passed, and the others failed. Help regarding the cmdlets are available when you run get-help. The two cmdlets are explained here and in more detail below. Similarly, every other cmdlet in DSC (such as Get-DscConfiguration, Start-DscConfiguration, etc.) could each be identified as a separate DSC operation.
For instance, Test-DscConfiguration would be a separate DSC Operation. Here, we use the term DSC Operation to define a single unique DSC execution from its start to its end. These functions help in identifying all the events from past DSC operations run in your system, or any other computer (Note: you need a valid credential to access remote computers). XDscDiagnostics is a PowerShell module that consists of two simple operations that can help analyze DSC failures on your machine – Get– xDscOperation and Trace-xDscOperation. However, something that really simplifies life is the new module that has been published in Wave 2 of the DSC Resource Kit, called xDscDiagnostics.
If you read the blog here about DSC troubleshooting, you could learn how to use the Get-WinEvent cmdlet to debug a DSC failure using event logs.
Please note! CMDlets have been changed! This will most likely have an impact on scripts.Have you ever witnessed a DSC Configuration run where you had no idea about what it might have done behind the scenes? Well, then your worries end here! During any DSC Operation, the DSC engine writes into windows event logs, which are like bread crumbs that the engine leaves along the way during any execution. If you use the above module, you no longer need to use the old one to log on to Exchange Online with Multi-Factor Authentication. Get-EXOCasMailbox Why use this V2 module?
Start the following commandlets Install-Module PowershellGet -Force Update-Module PowershellGet Set-ExecutionPolicy RemoteSigned Install-Module -Name ExchangeOnlineManagement Update the exchange online management module Import-Module ExchangeOnlineManagement Get-Module ExchangeOnlineManagement Start your connection to Exchange Online Connect-ExchangeOnlineĮxample command. Open PowerShell as administrator in Windows.
New-PSSession Get-EXOMailbox Get-Mailbox Get-EXORecipient Get-Recipient Get-EXOCASMailbox Get-CASMailbox Get-EXOMailboxPermission Get-MailboxPermission Get-EXORecipientPermission Get-RecipientPermission Get-EXOMailboxStatistics Get-MailboxStatistics Get-EXOMailboxFolderStatistics Get-MailboxFolderStatistics Get-EXOMailboxFolderPermission Get-MailboxFolderPermission Get-EXOMobileDeviceStatistics Get-MobileDeviceStatistics How to install the V2 module via PowerShell? What is new in the PowerShell V2 module? New cmdlet in the EXO V2 module Older related cmdlet Connect-ExchangeOnline Connect-EXOPSSession Very practical so you can get rid of the old way described here. The new Exchange Online PowerShell V2 Module has the ability to log in (authenticate) to Exchange Online with MFA.