I am happy to announce that I have been accepted as a speaker at the PowerShell Conference Asia in Singapore! I will be presenting two sessions and I will do joint session together with Jason Yoder. I will be presenting on the following topics:
The PowerShell Conference Asia is held in Singapore for the second year this year and I am happy to once again be a part of this event. To cite the psconf.asia website:
“Join us for the second PowerShell Conference Asia, held in Singapore, where PowerShell speakers from Asia and around the world come together to bring attendees in-depth PowerShell and DevOps content.
Speakers include 4 members of the PowerShell team from Microsoft headquarters in Redmond and a strong line-up of MVPs, well-known international speakers, and community contributors. They’ll cover in-depth topics on the PowerShell language and how you can use PowerShell to automate the technologies you use every day.”
If you are interested in joining the conference or if you would like to know more about it, visit the website, follow @psconfasia on Twitter or join our Slack group psconfasia.slack. See you in Singapore!
Last week as DuPSUG we organized another Dutch PowerShell User Group meetup with no one less than the Microsoft Scripting guy presenting two sessions at our humble event. The event was sponsored by: Methos
During the event we had the following sessions and speakers:
Approximately one year ago I saw the number of downloads tick over a hundred thousand, today my total downloads from the TechNet Script Gallery has reached 250,000. To celebrate this milestone I have uploaded all of the scripts I have stored in the TechNet Script Gallery also to GitHub to simplify the updating and collaboration with others.
My personal preferred method of installing and sharing scripts is by using the PowerShell Gallery, which is available at PowerShellGallery.com or by using the PowerShellGet cmdlets, for example the following two lines of code can find the scripts and modules I have currently posted:
As I personally mostly see benefit in sharing of modules and not so much single scripts and function I am working on converting some of the scripts I have written into modules and once they are finalized I will upload those to the PowerShell Gallery as well. So my question to the community is as follows, which improvements are you most interested in or what would you like to see next?
Feel free to use the comment section underneath this post to share your ideas or feedback. That is it for now, until the next milestone!
As I was looking into some errors in my event log I found that I had a number of certificate errors in the event log. In order to investigate this further I wanted to take a look at the certificate in the event log. There are a number of tools available to extract this from the event log but I wanted to be able to automate this in the future so I settled on writing this in PowerShell.
I had the following events in my system event log:
The interesting portion is what is stored in the XML, specifically EventData – Binary:
In order to retrieve this event using PowerShell we can run the following code:
The binary data is encoded as pairs of hexadecimal numbers, so this needs to be converted before we can write this to disk. In order to do this we split the string into pairs of two and then do a conversion using the ToByte method of the System.Convert class:
Now that we have PowerShell output an array of bytes we are ready to write the output of the event log to file. Because we know this should be a certificate all we have to do is write this to a .cer file and we will have a working certificate:
Now the following functional certificate will be available on the desktop:
So there we have it, in this article we have identified the event that contains a certificate that. Afterwards we went into the xml of this event and retrieved the binary eventdata, converted this to a byte array and then wrote this to file.
In PowerShell it is relatively trivial to retrieve the domain for the logged in user, as this is stored in the environment variable. In multi-domain environments it is often the case that the user account is a member of the same domain as the computer account. To retrieve the domain name of the current computer the following command can be executed: