<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Dan's Notes]]></title><description><![CDATA[My take on IT]]></description><link>https://danstis.azurewebsites.net/</link><generator>Ghost 0.8</generator><lastBuildDate>Thu, 23 Apr 2026 13:03:38 GMT</lastBuildDate><atom:link href="https://danstis.azurewebsites.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Get public IP from command line]]></title><description><![CDATA[<p>To get your machines public IP from the command line, run the following command:  </p>

<pre><code>nslookup myip.opendns.com resolver1.opendns.com  
</code></pre>]]></description><link>https://danstis.azurewebsites.net/get-public-ip-from-command-line/</link><guid isPermaLink="false">10c67fcc-9043-4ac2-8d81-6dca8eaa6071</guid><category><![CDATA[CMD]]></category><category><![CDATA[DNS]]></category><category><![CDATA[Debugging]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Mon, 07 Jan 2019 07:10:02 GMT</pubDate><content:encoded><![CDATA[<p>To get your machines public IP from the command line, run the following command:  </p>

<pre><code>nslookup myip.opendns.com resolver1.opendns.com  
</code></pre>]]></content:encoded></item><item><title><![CDATA[Authenticate to Azure Active Directory using PowerShell]]></title><description><![CDATA[<p>I recently had the need to authenticate as an Azure AD (AAD) application to the oAuth endpoint to return an oAuth token. As this procedure was to be performed by an Azure Automation Runbook, I needed a solution that was entirely PowerShell based.</p>

<p>In my case we needed to use</p>]]></description><link>https://danstis.azurewebsites.net/authenticate-to-azure-active-directory-using-powershell/</link><guid isPermaLink="false">09556ae3-3a23-489e-a2eb-cf6ede8a94ae</guid><category><![CDATA[PowerShell]]></category><category><![CDATA[Azure]]></category><category><![CDATA[AAD]]></category><category><![CDATA[oAuth]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Thu, 08 Sep 2016 08:36:41 GMT</pubDate><content:encoded><![CDATA[<p>I recently had the need to authenticate as an Azure AD (AAD) application to the oAuth endpoint to return an oAuth token. As this procedure was to be performed by an Azure Automation Runbook, I needed a solution that was entirely PowerShell based.</p>

<p>In my case we needed to use this token to perform tasks under the context of the AAD application such as accessing an Azure API Management API, as well as sending requests to the Azure GraphAPI.</p>

<p>After having no luck finding anything online, I decided to post my solution here.</p>

<pre><code class="language-PowerShell">function Get-oAuthToken {  
    &lt;#
    .SYNOPSIS
       Function to connect to the Microsoft login OAuth endpoint and return an OAuth token.
    .DESCRIPTION
       This Function connects to the Microsoft AAD OAuth endpoint and generates an OAuth token. 
       This token can then be used for authentication against the resource supplied In the parameters.
    .PARAMETER ClientID
        The ClientID of the application used for authentication against Azure AD.
    .PARAMETER ClientSecret
        The Key generated within the application used for authentication against Azure AD.
        This key should have rights to the resource supplied in the ResourceName parameter.
    .PARAMETER TenantId
        The TenantId of the Azure AD that you wish to authenticate against.
    .PARAMETER ResourceName
        The name of the resource that you want to generate a token for.
    .EXAMPLE
       C:\PS&gt; Get-ApiToken -ClientID '12345678-9012-3456-7890-123456789012' -ClientSecret 'AfXooIr8rswX24yrFXMrO4SbBgutwTtojAZEpQOaaaa=' -TenantId 'abcdefff-d0bc-1234-854a-114710c94dbb' -Resource 'https://test.onmicrosoft.com/apitest'
       Returns the authentication context object generated by the endpoint.
    .NOTES
        Version 1.0
    #&gt;
    [Cmdletbinding()]
    Param(
        [Parameter(Mandatory=$true)][string]$ClientID,
        [Parameter(Mandatory=$true)][string]$ClientSecret,
        [Parameter(Mandatory=$true)][string]$TenantId,
        [Parameter(Mandatory=$false)][string]$ResourceName = "https://graph.windows.net",
        [Parameter(Mandatory=$false)][switch]$ChinaAuth
    )

    #This script will require the Web Application and permissions configured in Azure Active Directory.
    if($ChinaAuth){
        $LoginURL  = 'https://login.chinacloudapi.cn'
    }else{
        $LoginURL  = 'https://login.windows.net'
    }

    #Get an Oauth 2 access token based on client id, secret and tenant id
    $Body = @{grant_type="client_credentials";resource=$ResourceName;client_id=$ClientID;client_secret=$ClientSecret}
    Return Invoke-RestMethod -Method Post -Uri $LoginURL/$TenantId/oauth2/token?api-version=1.0 -Body $Body
}
</code></pre>

<p><strong>The code is fairly straightforward, however I will expand on a few points:</strong></p>

<ol>
<li>In my case I needed the ability to generate tokens against multiple Azure regions, including the Azure China region. To ensure the China authentication requests hit the correct endpoint, I have added a switch -ChinaAuth. If this is specified it will attempt to authenticate to <a href="https://login.chinacloudapi.cn">https://login.chinacloudapi.cn</a>.  </li>
<li>The function will return an object containing:
<ul><li>token_type</li>
<li>expires_in</li>
<li>ext_expires_in</li>
<li>expires_on</li>
<li>not_before</li>
<li>resource</li>
<li>access_token</li></ul></li>
</ol>]]></content:encoded></item><item><title><![CDATA[Check AD ExtentionAttribute Usage with PowerShell]]></title><description><![CDATA[<p>The following script will summarise the ExtentionAttributes in use within an Active Directory Domain.</p>

<p>This script uses the ActiveDirectory CMDlets included in the Active Directory Module for PowerShell, this is part of the Remote Server Administrative Tools (RSAT) pack available from Microsoft for client OSs.</p>

<p>Note that once RSAT has</p>]]></description><link>https://danstis.azurewebsites.net/check-ad-extentionattribute-usage-with-powershell-2/</link><guid isPermaLink="false">c9fdff56-c4c1-4d67-9f51-e4e25ad71ab4</guid><category><![CDATA[PowerShell]]></category><category><![CDATA[AD]]></category><category><![CDATA[Active Directory]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Fri, 29 Jan 2016 05:40:00 GMT</pubDate><content:encoded><![CDATA[<p>The following script will summarise the ExtentionAttributes in use within an Active Directory Domain.</p>

<p>This script uses the ActiveDirectory CMDlets included in the Active Directory Module for PowerShell, this is part of the Remote Server Administrative Tools (RSAT) pack available from Microsoft for client OSs.</p>

<p>Note that once RSAT has been installed, you will need to enable the <strong>Active Directory Module for PowerShell</strong> feature via <strong>Add and Remove Programs</strong>.</p>

<pre><code>Import-Module ActiveDirectory

$attributeName = "SAMAccountName",
  "extensionattribute1",
  "extensionattribute2",
  "extensionattribute3",
  "extensionattribute4",
  "extensionattribute5",
  "extensionattribute6",
  "extensionattribute7",
  "extensionattribute8",
  "extensionattribute9",
  "extensionattribute10",
  "extensionattribute11",
  "extensionattribute12",
  "extensionattribute13",
  "extensionattribute14",
  "extensionattribute15"

$summary = "" | select $attributeName

foreach($attribute in $attributeName){  
    $summary.$attribute = (Get-ADuser -filter {$attribute -like "*"} -Properties $attribute).count
}
$summary | fl
</code></pre>]]></content:encoded></item><item><title><![CDATA[Add PFX Certificate to NetScaler 10.5]]></title><description><![CDATA[<ol>
<li>Open <strong>Traffic Management</strong> -> <strong>SSL</strong>  </li>
<li>Select <strong>Import PKCS#12</strong> <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/6mb7OEAtSJSQetdUBQxU_pic1-1-.png" alt="Pic1" title=""></li>
<li>On the input form, enter the <strong>Output file name</strong> in the format: <em>/nsconfig/ssl/<certname>.pem</certname></em>  </li>
<li>Select the <strong>input PKCS#12 file</strong> (PFX file) by using the <strong>Browse</strong> button  </li>
<li>Enter the password for the PFX file  </li>
<li>Click the <strong>OK</strong> button <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/U67xLm3ITTuCRZCQFgTE_pic2-1-.png" alt="Pic2" title=""></li>
<li>Go to</li></ol>]]></description><link>https://danstis.azurewebsites.net/add-pfx-certificate-to-netscaler-10-5/</link><guid isPermaLink="false">6343a5f2-5b9d-4eb8-9305-bfa0b9a00e07</guid><category><![CDATA[NetScaler]]></category><category><![CDATA[Certificate]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Fri, 29 Jan 2016 04:54:00 GMT</pubDate><content:encoded><![CDATA[<ol>
<li>Open <strong>Traffic Management</strong> -> <strong>SSL</strong>  </li>
<li>Select <strong>Import PKCS#12</strong> <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/6mb7OEAtSJSQetdUBQxU_pic1-1-.png" alt="Pic1" title=""></li>
<li>On the input form, enter the <strong>Output file name</strong> in the format: <em>/nsconfig/ssl/<certname>.pem</certname></em>  </li>
<li>Select the <strong>input PKCS#12 file</strong> (PFX file) by using the <strong>Browse</strong> button  </li>
<li>Enter the password for the PFX file  </li>
<li>Click the <strong>OK</strong> button <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/U67xLm3ITTuCRZCQFgTE_pic2-1-.png" alt="Pic2" title=""></li>
<li>Go to <strong>Traffic Management</strong> -> <strong>SSL</strong> -> <strong>Certificates</strong>  </li>
<li>Click the <strong>Install</strong> button  </li>
<li>Enter the <strong>Certificate-key Pair name</strong> as the FQDN of the cert  </li>
<li>For the <strong>Certificate File Name</strong>, browse and select the pem file that was installed earlier (note that newer files are listed last in the list)  </li>
<li>For the Key File Name, browse and select the same pem file as above  </li>
<li>Set the notification of expiry to an appropriate time, IE 60 days  </li>
<li>Click <strong>Install</strong> <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/gK0iglhS8aYMhpClZLY6_pic3-1-.png" alt="Pic3" title=""></li>
<li>Right-click on the newly added certificate, and select <strong>Link</strong>.  </li>
<li>Link the certificate to its intermediary CA certificate, in order for the NetScaler to supply the full chain to clients. <br>
<img src="https://danstis.azurewebsites.net/content/images/2016/07/oOuv9wD6QgOF53EKcpag_pic4-1-.png" alt="" title=""></li>
</ol>]]></content:encoded></item><item><title><![CDATA[Execute Service Under its Own SVCHOST Process]]></title><description><![CDATA[<p>In order to move a service from a shared SVCHOST process into its own SVCHOST process:</p>

<p>Check the current SVCHOST processes, and the services assigned: <br>
<code>tasklist /SVC /FI "IMAGENAME eq svchost.exe"</code></p>

<p>Change a service to its own SVCHOST processes: <br>
<code>sc config &lt;service name&gt; type= own</code></p>

<p>Change a</p>]]></description><link>https://danstis.azurewebsites.net/execute-service-under-its-own-svchost-process/</link><guid isPermaLink="false">2de2219c-0d44-4d6d-9cab-83a6a08a6ab7</guid><category><![CDATA[Svchost]]></category><category><![CDATA[Windows]]></category><category><![CDATA[CMD]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Fri, 29 Jan 2016 04:39:00 GMT</pubDate><content:encoded><![CDATA[<p>In order to move a service from a shared SVCHOST process into its own SVCHOST process:</p>

<p>Check the current SVCHOST processes, and the services assigned: <br>
<code>tasklist /SVC /FI "IMAGENAME eq svchost.exe"</code></p>

<p>Change a service to its own SVCHOST processes: <br>
<code>sc config &lt;service name&gt; type= own</code></p>

<p>Change a service back to a shared SVCHOST process: <br>
<code>sc config &lt;service name&gt; type= share</code></p>]]></content:encoded></item><item><title><![CDATA[PowerShell Function to export a user's thumbnail photo from AD]]></title><description><![CDATA[<p>The following function is used to export a user's thumbnail photo from Active Directory (AD) to a JPG file on disk. <br>
This function uses the ActiveDirectory CMDlets included in the Active Directory Module for PowerShell, this is part of the Remote Server Administrative Tools (RSAT) pack available from Microsoft for</p>]]></description><link>https://danstis.azurewebsites.net/powershell-function-to-export-a-users-thumbnail-photo-from-ad/</link><guid isPermaLink="false">aac0a3a4-fb8e-4b0d-b2f4-b53667661e13</guid><category><![CDATA[PowerShell]]></category><category><![CDATA[AD]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Fri, 29 Jan 2016 03:26:00 GMT</pubDate><content:encoded><![CDATA[<p>The following function is used to export a user's thumbnail photo from Active Directory (AD) to a JPG file on disk. <br>
This function uses the ActiveDirectory CMDlets included in the Active Directory Module for PowerShell, this is part of the Remote Server Administrative Tools (RSAT) pack available from Microsoft for client OSs.</p>

<p>Note that once RSAT has been installed, you will need to enable the <strong>Active Directory Module for PowerShell</strong> feature via <strong>Add and Remove Programs</strong>.</p>

<pre><code>function Get-UserPhoto(){  
    param(
        [string]$Username,
        [string]$Path = "C:\Temp\AD_Photos"
    )

    Import-Module ActiveDirectory
    $user = Get-ADUser $Username -properties thumbnailPhoto
    if(!(test-path $Path)){mkdir $Path}
    $user.thumbnailPhoto | Set-Content ("$Path\$($User.SamAccountName).jpg") -Encoding byte
}
</code></pre>]]></content:encoded></item><item><title><![CDATA[Configure Domain NTP Sync]]></title><description><![CDATA[<p>As we all know, time sync on domain joined computers is essential. <br>
The following details configuration of the Domain Controllers to sync with a trusted time source via NTP.</p>

<p>I always recommend configuring the PDC Emulator to sync with a known good NTP source, then all other DCs be configured</p>]]></description><link>https://danstis.azurewebsites.net/configure-domain-ntp-sync/</link><guid isPermaLink="false">44b081a3-fcbe-4f0d-ab8e-54d86688c4b9</guid><category><![CDATA[AD]]></category><category><![CDATA[NTP]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Thu, 28 Jan 2016 23:36:00 GMT</pubDate><content:encoded><![CDATA[<p>As we all know, time sync on domain joined computers is essential. <br>
The following details configuration of the Domain Controllers to sync with a trusted time source via NTP.</p>

<p>I always recommend configuring the PDC Emulator to sync with a known good NTP source, then all other DCs be configured as Domain Heirs. <br>
This configuration ensures that all of the DCs have the same time source, which in turn flows to all client PCs.</p>

<p>If the DC is configured with the Hyper-V time provider (as is the case with Azure VMs), this should be disabled before configuring NTP sync. <br>
To disable the Hyper-V time provider, enter the following from an administrative command prompt: <br>
<code>reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0</code></p>

<h3 id="configurationofntponthedomaincontrollers">Configuration of NTP on the Domain Controllers:</h3>

<ol>
<li>Locate the PDC Emulator: <br>
<code>netdom query pdc</code></li>
<li>Open an administrative command prompt on the PDC Emulator.  </li>
<li>Configure the peers for the PDC Emulator to sync with (in my case au.pool.ntp.org): <br>
<code>w32tm /config /manualpeerlist:"au.pool.ntp.org,0x1;1.au.pool.ntp.org,0x1" /syncfromflags:MANUAL</code></li>
<li>Flag this DC as a reliable time source: <br>
<code>w32tm /config /reliable:yes</code></li>
<li>Restart the w32time service, this should start the sync with the configured peers: <br>
<code>net stop w32time &amp;&amp; net start w32time</code></li>
<li>Check the event logs for time sync events. Note that event ID 47 in the System log could represent a firewall blocking the connection on port 123.  </li>
<li>On all other DCs, run the following commands: <br>
<code>w32tm /config /syncfromflags:domhier /update</code><br>
<code>net stop w32time &amp;&amp; net start w32time</code></li>
</ol>

<h6 id="ifrequiredherearesomeotherhelpfulcommands">If required, here are some other helpful commands:</h6>

<ul>
<li>Force a full sync: <code>w32tm /resync /nowait</code></li>
<li>List the NTP service status: <code>w32tm /query /status</code></li>
<li>List the configured NTP peers: <code>w32tm /query /peers</code></li>
<li>List the configured time Source: <code>w32tm /query /source</code></li>
<li>Check the NTP configuration: <code>w32tm /query /configuration</code></li>
</ul>

<h6 id="atanytimeyoucanresetthew32timeserviceconfigurationasfollows">At any time you can reset the w32time service configuration as follows:</h6>

<ol>
<li>Stop the w32time service: <br>
<code>net stop w32time</code></li>
<li>Unregister the w32time service: <br>
<code>w32tm /unregister</code></li>
<li>Re-register the w32time service: <br>
<code>w32tm /register</code></li>
<li>Start the w32time service: <br>
<code>net start w32time</code></li>
</ol>]]></content:encoded></item><item><title><![CDATA[Check returned SSL certificates from website using OpenSSL]]></title><description><![CDATA[<p>The following command will return the certificate chain from a website using OpenSSL: <br>
<code>openssl.exe s_client -connect www.google.com:443 -prexit -showcerts</code></p>]]></description><link>https://danstis.azurewebsites.net/check-returned-ssl-certificates-from-website-using-openssl/</link><guid isPermaLink="false">20f4495b-cf35-42ac-80f3-7f27c37298d4</guid><category><![CDATA[CMD]]></category><category><![CDATA[Certificate]]></category><category><![CDATA[OpenSSL]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Thu, 28 Jan 2016 06:35:00 GMT</pubDate><content:encoded><![CDATA[<p>The following command will return the certificate chain from a website using OpenSSL: <br>
<code>openssl.exe s_client -connect www.google.com:443 -prexit -showcerts</code></p>]]></content:encoded></item><item><title><![CDATA[Remotely Enable PowerShell Remoting]]></title><description><![CDATA[<p>In order to remotely enable PS remoting we can leverage PSEXEC (<a href="http://live.sysinternals.com.au/psexec.exe">http://live.sysinternals.com.au/psexec.exe</a>).</p>

<p><code>psexec \\[computer name] -u [admin account name] -p [admin account password] -h -d powershell.exe "enable-psremoting -force"</code></p>]]></description><link>https://danstis.azurewebsites.net/remotely-enable-powershell-remoting/</link><guid isPermaLink="false">96f9421f-8541-46e9-bf45-87d2232b601b</guid><category><![CDATA[CMD]]></category><category><![CDATA[PowerShell]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Wed, 13 Jan 2016 22:58:00 GMT</pubDate><content:encoded><![CDATA[<p>In order to remotely enable PS remoting we can leverage PSEXEC (<a href="http://live.sysinternals.com.au/psexec.exe">http://live.sysinternals.com.au/psexec.exe</a>).</p>

<p><code>psexec \\[computer name] -u [admin account name] -p [admin account password] -h -d powershell.exe "enable-psremoting -force"</code></p>]]></content:encoded></item><item><title><![CDATA[Find executable path from PID in Linux]]></title><description><![CDATA[<p>To find the path to a running executable from a PID in Linux, run the following: <br>
<code>readlink -f /proc/&lt;PID&gt;/exe</code></p>]]></description><link>https://danstis.azurewebsites.net/find-executable-path-from-pid-in-linux/</link><guid isPermaLink="false">482a8b74-a30e-4240-bfb2-77afe637442f</guid><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Tue, 22 Sep 2015 22:46:00 GMT</pubDate><content:encoded><![CDATA[<p>To find the path to a running executable from a PID in Linux, run the following: <br>
<code>readlink -f /proc/&lt;PID&gt;/exe</code></p>]]></content:encoded></item><item><title><![CDATA[Connect to remote windows share with other user account]]></title><description><![CDATA[<p>In order to connect to a remote Windows server via CIFS using a different user account, enter the following command in a Command Prompt (CMD) window: <br>
<code>net use \\&lt;servername&gt;\IPC$ /user:&lt;netbiosdomain&gt;\&lt;username&gt; *</code></p>

<p>This will authenticate the supplied user to the remote server, ensuring</p>]]></description><link>https://danstis.azurewebsites.net/connect-to-remote-windows-share-with-other-user-account/</link><guid isPermaLink="false">8457eefc-963a-471a-b191-a93e7328c90a</guid><category><![CDATA[CMD]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Tue, 22 Sep 2015 00:38:00 GMT</pubDate><content:encoded><![CDATA[<p>In order to connect to a remote Windows server via CIFS using a different user account, enter the following command in a Command Prompt (CMD) window: <br>
<code>net use \\&lt;servername&gt;\IPC$ /user:&lt;netbiosdomain&gt;\&lt;username&gt; *</code></p>

<p>This will authenticate the supplied user to the remote server, ensuring that future CIFS connections use the authenticate user account. <br>
Note that if existing connections have been made with another user account, they will need to be removed first. You can display a list of connections using <code>net use</code>. Connections can be removed using <code>net use \\&lt;servername&gt;\&lt;sharename&gt; /delete</code></p>

<p>One this command has completed successfully, open a Windows Explorer window and connect to the desired path as per normal.</p>]]></content:encoded></item><item><title><![CDATA[KeePass Autotype string for creating AD users]]></title><description><![CDATA[<p>In order to create an Active Directory (AD) user from a KeePass entry:</p>

<ol>
<li>Modify the KeePass group that contains the password entry  </li>
<li>On the Autotype tab, enter the following (Replacing the Folder names if required): <br>
<code>{TAB}{TAB}{TAB}{Title}{TAB}{Title}{TAB}{TAB}{TAB}{TAB}{SPACE}{DELAY 1000}{Password}{TAB}</code></li></ol>]]></description><link>https://danstis.azurewebsites.net/keepass-autotype-string-for-creating-ad-users/</link><guid isPermaLink="false">37b035d8-3311-484d-9962-185b850782bb</guid><category><![CDATA[AD]]></category><category><![CDATA[KeePass]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Tue, 22 Sep 2015 00:33:00 GMT</pubDate><content:encoded><![CDATA[<p>In order to create an Active Directory (AD) user from a KeePass entry:</p>

<ol>
<li>Modify the KeePass group that contains the password entry  </li>
<li>On the Autotype tab, enter the following (Replacing the Folder names if required): <br>
<code>{TAB}{TAB}{TAB}{Title}{TAB}{Title}{TAB}{TAB}{TAB}{TAB}{SPACE}{DELAY 1000}{Password}{TAB}{Password}{TAB}{SPACE}{TAB}{SPACE}{TAB}{SPACE}</code></li>
<li>Save the changes to the group  </li>
<li>Open AD Users and computers, and create a new user in the appropriate OU  </li>
<li>Wait for the form to load, then with the first fileld selected, switch to KeePass  </li>
<li>Press <code>CTRL + V</code></li>
</ol>

<p>This will autotype the KeePass entry details into AD Users and Computers for you.</p>]]></content:encoded></item><item><title><![CDATA[KeePass Autotype string for adding records to LastPass]]></title><description><![CDATA[<p>In order to add a KeePass entry to LastPass: <br>
    1. Modify the KeePass group that contains the password entry
    2. On the Autotype tab, enter the following (Replacing the Folder names if required):
<code>{URL}{TAB}{Title}{TAB}Folder1\Folder2{TAB}{UserName}{TAB}{Password}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}</code>
        3.</p>]]></description><link>https://danstis.azurewebsites.net/keepass-autotype-string-for-adding-records-to-lastpass/</link><guid isPermaLink="false">04301b7e-4eb0-45ac-8bec-2e93ec2ea696</guid><category><![CDATA[LastPass]]></category><category><![CDATA[KeePass]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Tue, 22 Sep 2015 00:27:00 GMT</pubDate><content:encoded><![CDATA[<p>In order to add a KeePass entry to LastPass: <br>
    1. Modify the KeePass group that contains the password entry
    2. On the Autotype tab, enter the following (Replacing the Folder names if required):
<code>{URL}{TAB}{Title}{TAB}Folder1\Folder2{TAB}{UserName}{TAB}{Password}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}</code>
        3. Save the changes to the group
    4. Open LastPass Vault and select <strong>'Add Site'</strong>
    5. Wait for the browser to load, then with the first field selected (URL), switch to KeePass
    6. Press <code>CTRL + V</code></p>

<p>This will autotype the KeePass entry details into the LastPass browser window for you.</p>]]></content:encoded></item><item><title><![CDATA[Using OpenSSL to convert a PFX Cert to PEM]]></title><description><![CDATA[<p>Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM <br>
<code>openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes</code>
<em>You can add -nocerts to only output the private key or add -nokeys to only output the certificates.</em></p>

<p>To convert a PEM certificate file and a</p>]]></description><link>https://danstis.azurewebsites.net/using-openssl-to-convert-a-pfx-cert-to-pem/</link><guid isPermaLink="false">629b67ba-ae55-45d4-8c94-5d69e2535530</guid><category><![CDATA[OpenSSL]]></category><category><![CDATA[Certificate]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Tue, 22 Sep 2015 00:21:00 GMT</pubDate><content:encoded><![CDATA[<p>Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM <br>
<code>openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes</code>
<em>You can add -nocerts to only output the private key or add -nokeys to only output the certificates.</em></p>

<p>To convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12) <br>
<code>openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt</code></p>]]></content:encoded></item><item><title><![CDATA[Troubleshoot SMTP with Telnet]]></title><description><![CDATA[<ol>
<li>Open a telnet session: From a command prompt, type telnet, and then press ENTER.  </li>
<li>Type set local_echo on a computer running Microsoft Windows® 2000 Server or SET LOCALECHO on a computer running Windows Server™ 2003 or Windows XP, and then press ENTER. This command allows you to view the</li></ol>]]></description><link>https://danstis.azurewebsites.net/troubleshoot-smtp-with-telnet/</link><guid isPermaLink="false">43ec2749-4849-4d62-9641-13d8e541613e</guid><category><![CDATA[CMD]]></category><category><![CDATA[Telnet]]></category><category><![CDATA[Email]]></category><dc:creator><![CDATA[Dan Anstis]]></dc:creator><pubDate>Wed, 22 Jul 2015 00:23:00 GMT</pubDate><content:encoded><![CDATA[<ol>
<li>Open a telnet session: From a command prompt, type telnet, and then press ENTER.  </li>
<li>Type set local_echo on a computer running Microsoft Windows® 2000 Server or SET LOCALECHO on a computer running Windows Server™ 2003 or Windows XP, and then press ENTER. This command allows you to view the responses to the commands.  </li>
<li>Type <code>o &lt;your mail server domain&gt; 25</code>,and then press ENTER.  </li>
<li>Type <code>EHLO &lt;your mail server domain&gt;</code>, and then press ENTER.  </li>
<li>Type <code>MAIL FROM:&lt;sender@domain.com&gt;</code>, and then press ENTER. If the sender is not permitted to send mail, the SMTP server returns an error.  </li>
<li>Type <code>RCPT TO:&lt;recipient@remotedomain.com&gt;</code>,and then press ENTER.If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error.  </li>
<li>Type <code>DATA</code>.  </li>
<li>Type <code>SUBJECT: &lt;subject&gt;</code>.  </li>
<li>If desired, type message text, press ENTER, type a period (.), and then press ENTER again.  </li>
<li>If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:</li>
</ol>]]></content:encoded></item></channel></rss>