TOP50 PowerShell blog of 2018

This is a brief message to thank you all for the positive feedback received.

I will do my best to write better content and choose interesting topics.

As always I’m open to suggestions and to contributions so, please, don’t hesitate to contact me. If you want to receive more updates join the newsletter or follow me on twitter.

Last but not least:

It’s my pleasure to announce that scripting library is now listed on the Top 50 PowerShell Blogs And Websites For Developers To Follow in 2018

 

Compress a Folder With a little bit of help from .NET Framework

Few weeks ago I needed to free some space form a disk on a Windows Server 20012 R2, so I wanted to compress a large number folders, each one of them contained few hundred MB of log files.  It required to preserve the folder name and deleting or moving the files or directory from that volume/partition was not an option.

It’s an easy task with PowerShell“, I thought, “I can re-use one of my functions or scripts“.

In fact, few months ago I’ve published an article on how to compress a folder, but to re-use that specific code on that environment I needed to install 7zip (which in this specific case I tried to avoid), because the cmd-let Compress-Archive was released with version 5 and the server is using PowerShell 4.  So I needed to revisit my script that wasn’t ready to go and solve my problem without a little tweak. Continue reading “Compress a Folder With a little bit of help from .NET Framework”

Removing a phishing email from all Exchange 2016 mailboxes with PowerShell

Does’t matter how good is your security and design in your environment with with complex spam filters, gateways and appliances… sooner or later you’ll need to remove some sort of unwanted communication from one or more mailboxes on your Exchange Server.

In a very common incident response scenario like this, PowerShell is a very useful tool, this time the cmdlet used is New-ComplianceSearch and is available on-premises and on cloud services for Exchange Server 2016.

Continue reading “Removing a phishing email from all Exchange 2016 mailboxes with PowerShell”

PowerShell Dot Sourcing

My career in IT started in Software Development and most of the time I take for granted some of the common practices and basics of programming that I learnt are also clear for every one of my IT Pro colleagues.

In brief, as developers, when we try to solve problems we define objects and writing source code we describe them into classes. That class definition has attributes and methods that let us interact with that object. Continue reading “PowerShell Dot Sourcing”