Category Archives: Microsoft

What is DSC?

Desired State Configuration (DSC) is a configuration management platform in Windows PowerShell that enables you to manage your infrastructure and enforce your desired configuration. It allows you to declaratively specify the configuration of your servers, and then automatically ensures that your servers are in the desired state.

How Many Connected Screens?

To determine the number of monitors connected to a computer with C#, you can use the System.Windows.Forms.Screen class, which provides a static AllScreens property that returns an array of Screen objects, one for each display device connected to the computer. You can then use the Length property of the array to determine the number of screens.

Creating Arrays in Powershell

Arrays are useful in PowerShell because they allow you to store multiple values in a single variable. This can be convenient when you want to pass a group of values to a function, or when you want to manipulate multiple values in a loop.

VB6 Still Relevant?

Visual Basic 6 (VB6) is a programming language that was widely used in the past, but it is no longer as relevant as it once was. VB6 was released in 1998 and was succeeded by Visual Basic .NET (VB.NET) in 2002. While VB6 is still used by some organizations, it is no longer supported by Microsoft, and most… Read More »

Powershell Arrays

Using arrays in PowerShell can be a powerful tool for organizing and manipulating data. In this blog post, we will cover the basics of working with arrays in PowerShell, including how to create and access array elements, and how to manipulate arrays using various methods.

Sending Mail from PowerShell

With Send-MailMessage, you can send email from your scripts. This is especially handy when you have some automated processes, say for monitoring. You could have a script that runs via Task Scheduler that checks for disk space utilization, and sends an email if the disk space is below a threshold.

Powershell Background Jobs

In PowerShell, you can use background jobs to run scripts or commands asynchronously, meaning they can run in the background while you continue to work in the console. This can be useful if you have a long-running task that you don’t want to wait for, or if you want to run multiple tasks concurrently.

VB.Net Form Subclassing

In object-oriented programming, subclassing is the process of creating a new class that is a modified version of an existing class. The new class is called the subclass, and the existing class is the superclass.