Posts

Converting Certificates using OpenSSL

Image
Certificates are an integral part of every IT infrastructure and service since they can be used to encrypt data, secure the communications, verify identities and provide trust. In this article I'm going to demonstrate a number of conversions you may have to perform in order to prepare a certificate to be imported to a system. Before moving on to the actual part about the conversion, a few words about the certificates and their file extensions. Encodings There are two different kinds of encoding for an X509 certificate, DER and PEM. DER encoded files are binary in contrast to PEM which are Base64 encoded and human readable. File Extensions The most commonly used file extensions for certificate and key files are: .crt - Used for certificates in DER or PEM format. .cer - Also used for certificates, alternative to crt .key - Used for private key files .pfx - Used for certificate and private key bundles. Used different format from the others (pkcs12) Conversion When it co...

PowerShell Custom Object Formatting

On this article I'm going to touch a field of PowerShell development that most are not aware of. That is formatting. Every PowerShell user has used the "Format-Table" and "Format-List" cmdlets or even the "Format-Custom" to display data in a manner that suits them. What happens though when you have objects that you'll like to format a bit differently or set the default view for? Then its time to use formatting. To start off, we're going to create a custom module. Pick a name for the module - mine is going to be "TestModule" - and create a directory with that name. Then create the module manifest using the "New-ModuleManifest" cmdlet and a script file with the ".psm1" extension. You should end up with a structure like the following: PS C:\> New-Item -ItemType dir -Name TestModule     Directory: C:\Users\cpolydorou\Desktop Mode        LastWriteTime  Length Name ----        -------------  ------ ---- d--...

Configuring Virtual Machines using Azure Automation DSC

A few days ago, I published an article on how to apply a DSC configuration on an Azure Virtual machine. Although there's nothing wrong with publishing a configuration on an Azure Storage Account and having the machines apply it, there's a better way. Azure offers a service called Automation Accounts, that among  other things, let's you publish configurations, register nodes in order to apply them and report on the node status. Let's see how to get it working! We are going to need and Azure Automation Account to host the configurations, so let's create one: PS C:\> New-AzureRmAutomationAccount -ResourceGroupName "Blog-DSC" `                                      -Name "BlogDSCAutomationAccount" `                                      -Plan Free `           ...

Monitoring Microsoft SQL using OMS

Image
Moving on to the next article about Microsoft Operations Manager Suite, we're going to take a look on a solution for Microsoft SQL servers. The SQL Health Check solution will provide useful information about the status of your SQL servers regarding security, compliance, availability, performance and many other aspects. As you may see below, I have a lot of recommendations for my lab servers, including the accounts used by the SQL services, the performance of the tempdb and even the power settings on the servers! Two of the below stand out, the suggestion to check the logins on the servers - since they are members of an availability group and missing logins can cause application downtime and the suggestion to limit the memory of the SQL server in order to avoid consuming memory needed by the operating system. The solution also provides information about the upgrade and migration status, change management and operations and monitoring. Here, I'm warned that R...

Assessing Security using OMS

Image
Having all this information such as application and security logs, installed updates and anti malware status on OMS, gives you the perfect opportunity to assess the security status of your organization and reduce your risk surface. Fortunately, you don't have to write the queries yourself - although you could - since solutions that can produce security reports are just a few clicks away. The "Security and Audit" solution performs multiple checks regarding update and anti malware status, applied security settings and even failed logon attempts. Below is a sample of the report: The "Antimalware Assessment" solution is all about the health of your machines. It provides status reports, the threats that have been detected and the unprotected machines. The above solutions, when combined, provide a full and detailed view on your organization's security status and give you the ability to tighten your overall security and discover trends and issues. ...

Configuring Azure VMs using Desired State Configuration

Image
Lately I've been working on a project to automate the provisioning of virtual machines on Azure using Azure Resource Manager. The need to apply configuration on the OS level came up and the proffered way was Desired State Configuration. On this article, we are going to publish a configuration and configure a virtual machine to apply it. First we are going to log in and select the subscription that we are going to use: PS C:\>Login-AzureRmAccount Account          : c******s.p******ou@******* SubscriptionName : Pay-As-You-Go SubscriptionId   : e******a-8**c-4**3-9**7-b**********9 TenantId         : 5******f-d**2-4**4-a**e-7**********7 Environment      : AzureCloud PS C:\>Get-AzureRmSubscription |            Out-GridView -PassThru -Title "Select the subscription to use" |                Select-AzureRmSubscription Name ...

Monitoring Active Directory Health using OMS

Image
Following the last OMS article about the update management solution, I would like to show you two more, this time about Active Directory. The Active Directory Health Check solution provides information on many aspects of your Active Directory environment such as Security, Compliance, Business Continuity and Performance. Each group performs a number of checks against the logs, to find possible issues. Good news, apart from the backup issue, my AD is looking great!!! The second solution I'm using for Active Directory is AD Replication Status. It examines the domain controller logs and provides useful insights on the health of the replication of your Active Directory environment. I've left the DC4 domain controller on my lab disconnected from the network on purpose in order to create replication issues. Replication between DC3 and DC4 is broken, since the servers hadn't communicated for a while. Those two solutions can save you from a lot...