Visual Studio – Compilation – Error – “The type or namespace name ‘ManagementScope’ could not be found (are you missing a using directive or an assembly reference?)”

Background Using Visual Studio to compile an application. Ran into a little error. Error Messages Error Messages - Text Error CS0246 The type or namespace name 'ManagementScope' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'ObjectQuery' could not be found (are you missing a … Continue reading Visual Studio – Compilation – Error – “The type or namespace name ‘ManagementScope’ could not be found (are you missing a using directive or an assembly reference?)”

Win OS – Get Domain Information – Using WMI

Background Using WMI, Let us get the short domain name Windows Management Instrumentation (WMI) Script Outline Issue "Get-WmiObject -Class Win32_NTDomain" Capture result of Get-WmiObject in a object Result is actually a list Iterate through the list Each time place list node in an object Here are the important attributes DnsForestName DomainName DomainControllerName DomainControllerAddress Roles Powershell … Continue reading Win OS – Get Domain Information – Using WMI