Author: jbmurphy

  • 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.

  • When using PowerShell to pull REST data from MS CRM, escape `$filter !

    Note to self. When trying to filter a REST response in PowerShell, by using the “$filter” parameter in the url (as with MS CRM 2011), you must escape the “$” with “`$”. For example: Does not work: $url=”http://crmserver.company.com/Organization/xrmservices/2011/OrganizationData.svc/ContactSet$filter=StateCode/Value eq 0″ Works: $url=”http://crmserver.company.com/Organization/xrmservices/2011/OrganizationData.svc/ContactSet`$filter=StateCode/Value eq 0″ Gets me every time, and I can’t figure out why my…

  • Microsoft Certified Solutions Expert: Cloud Platform and Infrastructure

    I just became a Microsoft Certified Solutions Expert: Cloud Platform and Infrastructure (MCSE) ! I haven’t taken any new exams in over a year – I guess I already had enough of the requirements ! Nice?

  • Using jsforce and node.js to connect to Salesforce

    I wanted to write a node.js app to pull data from Salesforce. I found the NPM library jsforce. I added it to my packages in my package.json: I also added “dotenv” which I am using to load my client secret and all configuration data from a hidden .env file. This is not in my git…

  • Extract ADFS signing certificate from the Federation Metadat URL

    I did not write this, but I liked it, so I thought I would pass it on! Use this script to extract the ADFS signing certificate from the FederationMetadat url (https://sts.yourserver.com/FederationMetadata/2007-06/FederationMetadata.xml): https://raw.githubusercontent.com/bergie/passport-saml/master/docs/adfs/retrieve_adfs_certificate.sh