Mrman1093

Results 10 comments of Mrman1093

Looking at this a bit closer today, that would work but it would require modifying the lines below it where it verifies that the root key is valid and swaps...

While we're at it, there appears to be another variable in Execute-MSP that is redundant/unused. https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/blob/dc3c003bbb0e78f025e98b96c3fc9c6e672e9c3e/Toolkit/AppDeployToolkit/AppDeployToolkitMain.ps1#L955-L956 $msiOpenDatabaseModePatchFile is only used to create $msiOpenDatabaseMode which is in turn only used once...

I'd like to put in my two cents on this topic by stating that I'm not a huge fan of the way functions are documented currently. I think they take...

I'm also on board with bringing back some of the old controls. I don't know what causes it, but when taking scrolling screenshots from certain web pages, the auto-detection gets...

A few months ago, I ran into a few computers in my environment that had completely broken WMIs. I ended up having to recompile the MOFs to get WMI working...

Replacing `$envOS` with non-WMI alternatives would require a good bit of code and be quite a feat. Looking into the Win32_OperatingSystem WMI class, it appears that the majority of the...

## Win32_ComputerSystem.PartOfDomain The method used by Win32_ComputerSystem to retrieve the `PartOfDomain` property isn’t detailed in Microsoft’s documentation or MOFs. The following options are available: 1. [`GetComputerDomain()`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.domain.getcomputerdomain) inside of a try-catch...

## Win32_ComputerSystem.Domain - [`NetWkstaGetInfo()`](https://learn.microsoft.com/en-us/windows/win32/api/lmwksta/nf-lmwksta-netwkstagetinfo) This property can be obtained using `NetWkstaGetInfo()` as outlined in the mapping strings of Win32_ComputerSystem, or `NetGetJoinInformation()` from the Win32_ComputerSystem.PartOfDomain example although, `NetWkstaGetInfo()` is the method...

## Win32_ComputerSystem.DNSHostName - [`GetComputerNameEx()`](https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexa) ```PowerShell Add-Type @" using System; using System.Text; using System.Runtime.InteropServices; namespace Win32ComputerSystem { // https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ne-sysinfoapi-computer_name_format // https://pinvoke.net/default.aspx/Enums/COMPUTER_NAME_FORMAT.html public enum COMPUTER_NAME_FORMAT { ComputerNameNetBIOS, ComputerNameDnsHostname, ComputerNameDnsDomain, ComputerNameDnsFullyQualified, ComputerNamePhysicalNetBIOS, ComputerNamePhysicalDnsHostname,...

## Win32_ComputerSystem.TotalPhysicalMemory The TotalPhysicalMemory property of Win32_ComputerSystem is obtained using the [`GlobalMemoryStatus()`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalmemorystatus) function. Rather than use that, I opted to use the `GlobalMemoryStatusEx()` function as [Microsoft's documentation](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalmemorystatus) warns against using...