Unhandled Exception

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Unhandled Exception

Post by rmcgre »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 5.6.170.0
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***
I've recently created a script using PowerShell Studio that generates a GUI that is used to delete assets from Active Directory, SCCM, and our ePolicy database.

When I run the PowerShell cmdlets myself for SCCM, it works with no issue. However, if I run them using the GUI, I receive an unhandled exception error.

I'm not particularly sure what to do with this since the commands I added in work with no issue when ran in PowerShell normally.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ConfigurationManagement.AdminConsole.FrameworkInitializer.ProcessConsoleUsageData.workerThread_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4010.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
DebuggerProxyV5
Assembly Version: 1.0.7233.33553
Win32 Version: 1.1.4.0
CodeBase: file:///C:/Program%20Files/SAPIEN%20Technologies,%20Inc/PowerShell%20Studio%202019/Debugger64/DebuggerProxyV5.DLL
----------------------------------------
PowerShellDebuggerV5
Assembly Version: 1.1.6.0
Win32 Version: 1.1.6.0
CodeBase: file:///C:/Program%20Files/SAPIEN%20Technologies,%20Inc/PowerShell%20Studio%202019/Debugger64/PowerShellDebuggerV5.DLL
----------------------------------------
System.Management.Automation
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.145
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.PowerShell.Commands.Diagnostics
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Diagnostics/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Diagnostics.dll
----------------------------------------
System.Configuration.Install
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
----------------------------------------
Microsoft.PowerShell.ConsoleHost
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.ConsoleHost/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.ConsoleHost.dll
----------------------------------------
Microsoft.PowerShell.Commands.Utility
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Utility/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Utility.dll
----------------------------------------
Microsoft.PowerShell.Commands.Management
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Management/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Management.dll
----------------------------------------
Microsoft.Management.Infrastructure
Assembly Version: 1.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Management.Infrastructure/v4.0_1.0.0.0__31bf3856ad364e35/Microsoft.Management.Infrastructure.dll
----------------------------------------
Microsoft.PowerShell.Security
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Security/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Security.dll
----------------------------------------
Microsoft.WSMan.Management
Assembly Version: 3.0.0.0
Win32 Version: 10.0.18362.1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.WSMan.Management/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.WSMan.Management.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.DirectoryServices
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.8.4010.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
⧹C։⧹Users⧹Default⧹Desktop⧹EUCMRT_pstudio.Run.ps1
Assembly Version: 0.0.0.0
Win32 Version: 10.0.18362.145
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll
----------------------------------------
ActiveRoles.ManagementShell
Assembly Version: 7.1.2.0
Win32 Version: 7.1.2.3406
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/ActiveRoles.ManagementShell.dll
----------------------------------------
ActiveRoles.Common
Assembly Version: 7.1.2.0
Win32 Version: 7.1.2.3406
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/ActiveRoles.Common.DLL
----------------------------------------
ActiveRoles.ManagementShell.DirectoryAccess
Assembly Version: 7.1.2.0
Win32 Version: 7.1.2.3406
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/ActiveRoles.ManagementShell.DirectoryAccess.DLL
----------------------------------------
bz5pdwhq
Assembly Version: 0.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Web.Extensions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Web.Extensions/v4.0_4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
Microsoft.CSharp
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.Practices.Unity
Assembly Version: 3.5.0.0
Win32 Version: 3.5.1404.0
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/Microsoft.Practices.Unity.DLL
----------------------------------------
System.Runtime
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.dll
----------------------------------------
ActiveRoles.ManagementShell.Utility
Assembly Version: 7.1.2.0
Win32 Version: 7.1.2.3406
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/ActiveRoles.ManagementShell.Utility.DLL
----------------------------------------
Microsoft.Practices.Unity.Interception
Assembly Version: 3.5.0.0
Win32 Version: 3.5.1404.0
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/Microsoft.Practices.Unity.Interception.DLL
----------------------------------------
NLog
Assembly Version: 3.1.0.0
Win32 Version: 3.1.0.0
CodeBase: file:///C:/Program%20Files/EUC/MachineRemovalTool/DLL/NLog.DLL
----------------------------------------
System.Threading
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Threading/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Threading.dll
----------------------------------------
System.Collections
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Collections/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Collections.dll
----------------------------------------
System.Reflection
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Reflection/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.dll
----------------------------------------
System.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Linq/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Linq.dll
----------------------------------------
System.Globalization
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Globalization/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Globalization.dll
----------------------------------------
System.Resources.ResourceManager
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Resources.ResourceManager/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Resources.ResourceManager.dll
----------------------------------------
System.Runtime.Extensions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Extensions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Extensions.dll
----------------------------------------
System.Linq.Expressions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Linq.Expressions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Linq.Expressions.dll
----------------------------------------
System.Reflection.Extensions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Reflection.Extensions/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Reflection.Extensions.dll
----------------------------------------
System.DirectoryServices.Protocols
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices.Protocols/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.Protocols.dll
----------------------------------------
AdminUI.PS.TypeAdapter
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.TypeAdapter.dll
----------------------------------------
AdminUI.WqlQueryEngine
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1069.1002
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.WqlQueryEngine.dll
----------------------------------------
Microsoft.ConfigurationManagement.ManagementProvider
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ManagementProvider.dll
----------------------------------------
AdminUI.PS.Accounts
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Accounts.dll
----------------------------------------
AdminUI.PS.Common
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Common.DLL
----------------------------------------
AdminUI.PS.Provider
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Provider.DLL
----------------------------------------
AdminUI.PS.Alerts
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Alerts.dll
----------------------------------------
AdminUI.PS.AppMan
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.AppMan.dll
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.AndroidInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.AndroidInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.AppV5xInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.AppV5xInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.AppVInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.AppVInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.iOSInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.iOSInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.MacInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.MacInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.MobileMsiInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.MobileMsiInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.MsiInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.MsiInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.WebAppInstaller
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.WebAppInstaller.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.Win8Installer
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.Win8Installer.DLL
----------------------------------------
Microsoft.ConfigurationManagement.ApplicationManagement.WinPhone8Installer
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.ApplicationManagement.WinPhone8Installer.DLL
----------------------------------------
AdminUI.CreateDT
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.CreateDT.DLL
----------------------------------------
AdminUI.Application
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.Application.DLL
----------------------------------------
AdminUI.PS.AppModel
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.AppModel.dll
----------------------------------------
AdminUI.MigrationAssistant
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.MigrationAssistant.DLL
----------------------------------------
AdminUI.PS.AssetIntelligence
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.AssetIntelligence.dll
----------------------------------------
AdminUI.PS.CalTracking
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.CalTracking.dll
----------------------------------------
AdminUI.PS.Certificates
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Certificates.dll
----------------------------------------
AdminUI.PS.ClientOperations
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.ClientOperations.dll
----------------------------------------
AdminUI.Scripts
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.Scripts.DLL
----------------------------------------
AdminUI.PS.ClientSettings
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.ClientSettings.dll
----------------------------------------
AdminUI.PS.ClientStatus
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.ClientStatus.dll
----------------------------------------
AdminUI.PS.Collections
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Collections.dll
----------------------------------------
AdminUI.AzureServices
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.AzureServices.DLL
----------------------------------------
DcmObjectModel
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/DcmObjectModel.DLL
----------------------------------------
Microsoft.ConfigurationManagement.Migration.ConfigMgr2012
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.Migration.ConfigMgr2012.DLL
----------------------------------------
Microsoft.ConfigurationManagement.Migration.ObjectSerialization
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManagement.Migration.ObjectSerialization.DLL
----------------------------------------
AdminUI.PS.Content
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Content.dll
----------------------------------------
AdminUI.PS.HS
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.HS.DLL
----------------------------------------
Microsoft.ConfigurationManager.CloudBase
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1091.1001
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.ConfigurationManager.CloudBase.DLL
----------------------------------------
AdminUI.PS.DatabaseReplication
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.DatabaseReplication.dll
----------------------------------------
AdminUI.Common
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1069.1002
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.Common.DLL
----------------------------------------
AdminUI.PS.Dcm
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Dcm.dll
----------------------------------------
AdminUI.EmailPolicy
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.EmailPolicy.DLL
----------------------------------------
AdminUI.NetworkPolicy
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.NetworkPolicy.DLL
----------------------------------------
AdminUI.PS.Deployments
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Deployments.dll
----------------------------------------
AdminUI.PS.Osd
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Osd.DLL
----------------------------------------
AdminUI.PS.EP
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.EP.dll
----------------------------------------
AdminUI.SoftwareUpdateManagementPoint
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.SoftwareUpdateManagementPoint.DLL
----------------------------------------
AdminUI.PS.Hybrid
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Hybrid.dll
----------------------------------------
AdminUI.CollectionMenuActions
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.CollectionMenuActions.DLL
----------------------------------------
AdminUI.PS.Migration
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Migration.dll
----------------------------------------
AdminUI.PS.Oob
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Oob.dll
----------------------------------------
AdminUI.OsdCommon
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.OsdCommon.DLL
----------------------------------------
Microsoft.Diagnostics.Tracing.EventSource
Assembly Version: 1.1.28.0
Win32 Version: 1.1.28.0
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/Microsoft.Diagnostics.Tracing.EventSource.DLL
----------------------------------------
AdminUI.WqlInitializer
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1069.1002
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.WqlInitializer.DLL
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AdminUI.PS.Rba
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Rba.dll
----------------------------------------
AdminUI.PS.Reporting
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Reporting.dll
----------------------------------------
AdminUI.PS.Sum
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.Sum.dll
----------------------------------------
AdminUI.AutoDeployment
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.AutoDeployment.DLL
----------------------------------------
AdminUI.PS.SystemStatus
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.PS.SystemStatus.dll
----------------------------------------
AdminUI.FeaturesUtilities
Assembly Version: 5.0.0.0
Win32 Version: 5.1906.1096.2000
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20Configuration%20Manager/AdminConsole/bin/AdminUI.FeaturesUtilities.DLL
----------------------------------------


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Unhandled Exception

Post by mxtrinidad »

It will help if you can provide a sample script that's causing the issue.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Unhandled Exception

Post by Alexander Riedel »

The problem with "System.NullReferenceException: Object reference not set to an instance of an object." is that it never says WHICH actual object reference.
From context and your description is most likely the console object.
A GUI process has no console but some modules created for PowerShell assume there is one, it being a console language and all :D
A somewhat simplistic test would be to export your GUI project to a script and run that resulting script in a console.
It will display the same GUI, but the process does have a console attached to it. If that eliminates the error, then you found the cause.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rmcgre
Posts: 9
Last visit: Fri Aug 11, 2023 8:27 am

Re: Unhandled Exception

Post by rmcgre »

Sorry for the delayed reply.

So I did export the entire script to a PS1 file via PS Studio and the same error occurred when I ran actions within the GUI that I had opened via the PS1 file. Just to further test, I ran the commands written into the script in a separate PowerShell console without the GUI and the commands ran with no issue. It looks like the issue only occurs when ran in the GUI that I created in PS Studio whether it be through the compiled exe or the GUI via PS1 file.

Also, @mxtrinidad, since the issue seems to be with the GUI, I don't think I could paste the entirety of it here because it'd probably be too long. I did attach the PSF file though. I swapped out all of the servers listed with SERVERNAME for obvious reasons. Please let me know if this works for you.
Attachments
EUCMRT_pstudio.psf
(158.82 KiB) Downloaded 103 times
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Unhandled Exception

Post by mxtrinidad »

Have you tried using breakpoints in the code to debug the form? Running the debug will identify which line is causing the issue in the form.

At the same time, you mention you run the code (without the GUI) and runs in PowerShell. In most cases, the code will change a bit when running it on a Windows form.

Please help me understand. Where's that code in the form?
This topic is 4 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.