[Cmdlet] Get-GroupMemberNames

Hi,

Here is a small variation of another Cmdlet I published earlier to retrieve all the security group names for a give user recursively.
This new Cmdlet will retrieve all user member names for a given group recursively.

Enjoy !

[Cmdlet] to generate Log file in the SCCM style

Hello,

Just a quick post to share the log function I’m using in all my Powershell scripts. This Cmdlet will generate log file written in the SCCM style so they can be easily exploited with CMTrace.

 

Enjoy !

Windows Server : Feature Sniffer

Hi all,

Here is a few simple lines of code that can be used to retrieve all enabled feature of a Windows server and generate the DISM command required to enable the same features on another server.

Enjoy !

SCCM 2012 R2 – Log File Helper

Hi all,

Anyone working with System Center Configuration Manager knows it, SCCM comes with an impressive number of log files, the purpose of some of them is well known by the initiate but there is also a lot of them for which the purpose is more or less unknown…
I was bored to always check the “Technical Reference for Log Files in Configuration Manager“, so I quickly converted their list to a csv and made a very simple WPF application.

This application is available here : SCCM Log File Helper

Enjoy !

Retrieve the extended attibutes of a file

This code is not very new and you will probably find many examples of something similar around the web. As said in the title the goal of the code below is to retrieve the extended attributes of a file… The GetDetailsOf method is really straight forward but the indexing is very obscure and I didn’t found any index reference list on the Net maybe because this may vary between different operating systems, however, I decided to create an “emun” to make things a lot easier. Here is the example code :

Distributed BranchCache – Change Default TCP Port

***EDIT
During our test we noticed that if a computer has already been “infected” by a BranchCache GPO this could lead to some random problems because the original script directly edit the “policies” registry keys. So at the bottom of this post you’ll see another script that does exactly the same but without modifying the “policies” registry keys. I also edited the first one to only modify/create the correct registry keys and not the policies registry keys.

This post is about something not well documented on the Net. How do you change the default TCP Port used by BranchCache ? First of all, DO NOT try to do this with the BranchCache GPO because, by default the GPO will create a Reservation URL targeting TCP Port 80 and if the settings are set by GPO you won’t be able to create a new Reservation URL. So if you want to change the BranCache default TCP Port, you will have to rely on some Registry edition and NetSh.

One side effect I’ve noticed by modifying the BranchCache default TCP Port is some issues with the Performance Monitor not reporting the cache usage especially in combination with SMB (File Share BranchCaching) but nothing really annoying.

So Here is the CmdLet I’ve made to Enable BranchCache and Change the default configuration on a Windows 7 workstation (This should also work with Windows 8 & 10 but I wasn’t able to test it yet)

Of course this has to be run from an elevated powershell session ๐Ÿ˜‰

Here is the same script adapted to avoid direct policies registry key modifications :

Find the nth particular Weekday in a Month for a given Year

Hi all,

Here is a small Cmdlet named Get-NDayOfMonth that’s an extented version of the Get-PatchTuesdayDate Cmdlet already published earlier on this blog. Basically this new Cmdlet Get-NDayOfMonth is a generic form of the Get-PatchTuesdayDate that return a System.DateTime object corresponding to the nth particular Weekday in a Month for a given Year.

Here is the code:

I hope this will be helpful for someone !

Automated Module Testing โ€“ Part 2

Hi,

This post about Automated Module Testing follows the previous one and gives a finished theoretical example of what my future Automated Module Testing will produce as output.
I’ll use the same scheme to demonstrate how it works ! First of all here is a Cmdlet taken from my ExcelPSLib Powershell module (version 0.6.0 Dev version)

Now here is the complete test Cmdlet generated to test the OOXML-Export Cmdlet: