Author: jbmurphy
-

Using Azure Traffic Manager with IP White-listed resources
The question was, how can you use Azure Traffic Manager if the destinations are restricted with IP white lists?This is the only way I could find: There is a blob that contains the source IPs of the probes. Here is the file, And here is the reference This list would need to be queried often…
-
PowerShell to move a VM to a new Log Analytics WorkSpace
This code uninstalls the Microsoft Monitoring agent and re-installs it to a new WorkSpace. Nothing special, just thought I would put it here. Mayby it will help someone?
-
Use the REST API to create a new Project in Azure DevOps
As the title says, I wanted to create a new project in VSTS / Azure DevOps, whatever you want to call it. Here is the code to do that. You need a Personal Access Token to authenticate with. Hope that helps someone?
-
Using PowerShell to query Azure Log Analytics via the REST API
I wanted to pull some data out of Azure Log Analytics using PowerShell and the REST API. Here is the code to Pull all errors in the Application event logs on VMs that are pushing their logs into Log Analytics via MicrosoftMonitoringAgent. Hopefully this may help someone: Notes: I keep my subscription information in Env Varaibles.…
-
Removing machines from Azure State Configuration (DSC)
I have been provisioning machines over an over trying to learn all the VM Extensions. One of the extensions that I have been playing with is the DSC extension. Every time I provision with this extension, it adds an additional record into the State Configuration, resulting in many stale machines. I wanted to clear out…
-
My WSL/BASH setup
Not sure if this a “Bootstrap” or not, but I wanted to have my WSL/Bash home directory match my windows home directory. This is the code that I use when I setup a new WSL/BASH instance. This will find your home directory via PowerShell and put it in a variable “$WINHOME”. Then I make make…
-
My SSL/Certificate Cheatsheet
Whenever a certificate needs to be renewed, I always have to scramble to remember how to update/renew. I finally put a cheat sheet together. I decided I will do all cert related stuff form Linux. Here are some commands: To request a new csr with a new key: To request a new csr with an…
-
My PowerShell scripts to encrypt Azure VM disks
This is my steps that I took from this very long document. First we need to create a Key vault and then an AAD application, then you connect them. Make note of the output of $aadClientID. Once that is setup, you can encrypt a VM: If you did not make note of your aadClientID, then…
-
Using git and a post-recive to update production node.js apps.
I have been trying to figure out the best way to deploy and maintain node.js apps in development and production. If I have a local git repo on my machine, and I want to push it to production, what is the best way to do this? I don’t think the .git files should be there.…
-
Using PowerShell to extract all contacts from MS CRM 2011
We are moving to Salesforce from MSCRM 2011. We need to get our data out so we can import into Salesforce. Here is the PowerShell script I am using to export contacts to csv. Hope that helps someone.
