Posts

Showing posts from June, 2023

Get a HTML or XML Starter Group Policy Object (Starter GPO) Report using PowerShell using Get-GPOReport

Image
There is a simple Active Directory Group Policy PowerShell cmdlet for getting a HTML or XML report for a Group Policy Object called Get-GPOReport . This makes life really simple to generate a report however there is no corresponding cmdlet for a Starter Group Policy Object. These are possible to generate as they can be seen in the Group Policy Management Console when you click on the Settings tab. To generate the report in PowerShell simply get the Starter GPO with the Get-GPStarterGPO cmdlet and then call the GenerateReport method directly on the object, passing either "HTML" or "XML" depending on the format you require. $starterGpo = Get-GPStarterGPO -Guid "3C720B80-15F3-4446-BF25-F57548A582CF" ; $starterGpo . GenerateReport( "XML" ); $starterGpo . GenerateReport( "HTML" );   While you're here - Why not check out our  Group Policy Audit and Documentation Tool ?

Visual Studio reports Error HRESULT E_FAIL has been returned from a call to a COM component when viewing a Windows Form

Image
You may see an issue whereby Visual Studio reports the following when viewing a Windows Form Error HRESULT E_FAIL has been returned from a call to a COM component  There are a number of fixes on the internet however none of them resolved the issue. On inspecting the designer.cs files for the affected forms we found errors stating that types from the projected conflicted with types imported from... the project... This seemed strange however found found that Visual Studio had in fact added a reference to the binary created by the project into the project without our doing anything. The Visual Studio WinForms designers are notoriously problematic with unpredictable things like this happening. Having removed the reference the problems went away.  While you're here - Why not check out our  Active Directory Documentation Tool ?

Installing Windows Features and Optional Components such as Group Policy Management and Active Directory PowerShell module using Advanced Installer

Image
We've recently been having problem with installing Windows Server features using Advanced Installer. Whilst AdvancedInstaller does come with a useful Windows Features section this has slowly degraded over time - the filter textbox is broken and finding the features in the list in near impossible combined with some options not being available for Windows desktop operating systems but for servers or vice-versa. This has been exacerbated by Microsoft having multiple user interfaces  Server Manager (Windows Server only) Server Manager PowerShell (Windows Server only) Windows Features in Control Panel (Desktop only and deprecated) Optional Features in Settings (Desktop and Server but missing functionality on the server) Win32_OptionalFeature WMI class (Deprecated) Get-WindowsOptionalFeature  DISM (Doesn't work when feature needs to be downloaded) Get-WindowsCapability  DISM (Works when feature needs to be downloaded, available from Windows Server 2016 onwards) Some more information