Powershell Pass by Reference and WPF Controls

function Disable-ComboBox ([ref][System.Windows.Forms.ComboBox]$comboBox) { $comboBox.Value.IsEnabled = $false } function Enable-Button ([ref][System.Windows.Forms.Button]$button) { $button.Value.IsEnabled = $True } Disable-ComboBox($myCombobox)

0

Running PowerShell from C#

using System.Collections.ObjectModel; using System.Management.Automation; using static System.Console; namespace InvokePS { class Program { static void Main(string[] args) { string message = “‘does this work?'”; string script = $@”C:\Users\joe.bothwell\Desktop\HelloWorld.ps1 -a {message}”; PowerShell shell = PowerShell.Create(); shell.Commands.AddScript(script); Collection results = shell.Invoke(); foreach(PSObject result in results) { WriteLine(result.ToString()); } WriteLine(“Press any key to continue…”); ReadLine(); } } }

0

After installing v4.4.1642, unable to elevate to PAM Roles

After installing v4.4.1642, we were unable to elevate.  Running Get-PAMUsers returned a not authorize error.  Steps that were taken to resolve the issue:  On the Sync server modify the object deletion run as below – this is done on the Person metaverse person object Delete the connector space of the CTRL MA Ran Full import…

0

Problem installing MIM v4.4.1642 – Access denied

When installing MIM 2016 v4.4.1542 Hotfix, we were getting the following error: Calling custom action Microsoft.IdentityManagement.ServerCustomActions.CustomActions.AddServiceToPerformanceMonitors Adding FIMService account to ‘Peformance Monitor Users’ group Property name = ‘ServiceAccount’, value = ‘domain\msvc’ DomainName=’domain’ AccountName=’msvc’ Domain AD Found Exception Thrown by custom action” System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation —> System.UnauthorizedAccessException: Access…

0