You can create custom event logs in PowerShell using the New-EventLog cmdlet, and then use the Write-EventLog cmdlet to write events to the log. Here’s an example: In this example, the New-EventLog cmdlet is used to create a new event log named “MyScriptLog” with a source of “MyScript”. The Write-EventLog cmdlet is then used to […]
Terraform Example of a Windows Instance using UserData
Here is an example Terraform code for launching a Windows instance that uses userdata to configure the instance:
Terraform Output Examples for AWS
In Terraform, an output is a way to display the values of resources or data sources that are created by your infrastructure code. There are several types of outputs that you can define in Terraform, and each serves a specific purpose. Here are the possible output types in Terraform and their explanations:
Joining machines to a domain without credentials
Need to join a machine to a domain, but don’t want to give out any credentials?
Accessing secrets from Hashicorp Vault
Access a secret from your Vault.
OpenSSL Commands
It can be useful to check a certificate and key before applying them to a server. The following commands verify the certificate, key and CSR (Certificate Signing Request). To check the certificate To check a key To check the CSR To check the md5 checksums match of the certificate, key and csr; the checksums can […]
Setting Up Pester Tests
Hey, how are you doing? Thought I would write about setting up Pester tests, and the structure I use. This comes about because when I need to start a new project and have some Pester tests running against the infrastructure I have a standard setup I use. So I decided to share it as it […]
Testing Arm Templates in Pipelines
One of the most important things with IaC is to test it. With ARM templates there are a few options as well. To test your ARM Templates you could run the following:- ARM-TTK can be used to lint and validate the arm templates. it does the following: Validating the author’s intentions by eliminating unused parameters […]
Git – Add a forked repo branch to the upstream repo
If you have a forked repo and need to do a merge request/ pull request to the upstream repo but you don’t have permissions to run the MR/PR pipelines and don’t have any pipelines in the forked repo. Then the solution is to bring the forked repo into the upstream repo as a branch and […]
Smelly Office
One day I had to go to a site in Stafford, to an old historic looking building, it had a large hall entrance and was clearly someone’s home which has been turned into an office. I was met in the hallway by the one of the admin staff and directed to work in room with […]