Skip to main content

Posts

Showing posts from March, 2016

Diving in deep with GetType()

When I deliver PowerShell classes, I emphasis the importance of sending the objects in the PowerShell Pipeline to Get-Member so you know what information is contained inside the object.  I also do it to get the typename of the object so I can do further research on MSDN.  Recently I’ve started using the .GetType() method if I only need the type information.  Get a look at the difference. PS C:\> Get-Date | GM    TypeName: System.DateTime Name                 MemberType     Definition                                 ----                 ----------     ----------    ...

Just for fun - Storing BLOB files as XML

So, one of the reasons why I like to teach PowerShell is that every once and a while, someone comes up with an unusual idea. So here it goes.  Can you save a BLOB file in an XML file?  This is strictly for the sake of theory.  In the process, we discovered some different behavior of Get-Content . Off the top of my head, the only way that I knew how to create a BLOB file is with an Offline Domain Join.  Here is the Wikipedia definition of a BLOB: A Binary Large Object (BLOB) is a collection of binary data stored as a single entity in a database management system. Blobs are typically images, audio or other multimedia objects, though sometimes binary executable code is stored as a blob. An Offline Domain Join allows you to create an object in Active Directory for a new client without the client being available.  It also allows to client to be configured to join the domain once it is able to contact a Domain Controller.  To get this to work, you need...