PowerShell One-Liner: Is this a debug build or not?

In a dev environment, there are debug builds and there are retail builds.  And there are debug builds that get mistaken for retail builds...

Here's a quick way to see if the binary in question is a debug build or not:

PSH> (Get-Command kernel32.dll).FileVersionInfo.IsDebug

Good.  I'm not running a debug version of Windows.  Thought not. 

Now, if only someone could explain why in PSH2 they decided to duplicate this functionality in Get-Item, but expose the property as VersionInfo, I'd love to know. 

Comments (0)

Skip to main content