Objects Available to the Scripting Agent

The Scripting Agent uses $ProvisioningHandler and $readOnlyIConfigurable to represent objects available during an action. I could not find any documentation on these objects and did some experimentation. The following is my results: The variable $ProvisioningHandler contains information about the cmdlet being executed. This includes the name of the cmdlet, parameters for the cmdlet, and the user that ran the cmdlet. The name of the cmdlet is stored in $provisioningHandler.TaskName The user running the cmdlet is stored in $provisioningHandler.UserScope.UserID The parameters passed to the cmdlet are stored in $provisioningHandler.UserSpecifiedParameters[“ PName ”] where PName is the name of the parameter that was passed. For example, Identity and Alias are common parameter names that would be used in place of PName . The variable $readOnlyIConfigurable contains the properties of the object being acted upon. For example, when using the Set-Mailbox cmdlet, $readOnlyIConfigurable ...