<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Guides on Martin Olsson</title>
    <link>https://martinolsson.com/guides/</link>
    <description>Recent content in Guides on Martin Olsson</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 09 Apr 2026 13:55:49 +0200</lastBuildDate>
    <atom:link href="https://martinolsson.com/guides/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Configure PowerShell</title>
      <link>https://martinolsson.com/guides/powershell-configuration/</link>
      <pubDate>Thu, 09 Apr 2026 13:55:49 +0200</pubDate>
      <guid>https://martinolsson.com/guides/powershell-configuration/</guid>
      <description>&lt;h1 id=&#34;repositories&#34;&gt;&#xD;&#xA;  Repositories&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#repositories&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Add a custom repository.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Register-PSRepository -Name &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;MyCustomRepository&amp;#39;&lt;/span&gt; -SourceLocation &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;path\to\custom\repository&amp;#39;&lt;/span&gt; -ScriptSourceLocation &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;path\to\custom\repository&amp;#39;&lt;/span&gt; -InstallationPolicy Trusted&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;modules&#34;&gt;&#xD;&#xA;  Modules&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#modules&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Uninstall all versions except the latest for an installed module.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$moduleName&lt;/span&gt; = &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;InsertNameOfTheModule&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Get-InstalledModule -Name &lt;span style=&#34;color:#79c0ff&#34;&gt;$moduleName&lt;/span&gt; | ForEach-Object {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#79c0ff&#34;&gt;$latestInstalledVersion&lt;/span&gt; = &lt;span style=&#34;color:#79c0ff&#34;&gt;$_&lt;/span&gt;.&lt;span style=&#34;color:#79c0ff&#34;&gt;Version&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Get-InstalledModule -Name &lt;span style=&#34;color:#79c0ff&#34;&gt;$_&lt;/span&gt;.&lt;span style=&#34;color:#79c0ff&#34;&gt;Name&lt;/span&gt; -AllVersion | Where-Object { &lt;span style=&#34;color:#79c0ff&#34;&gt;$_&lt;/span&gt;.&lt;span style=&#34;color:#79c0ff&#34;&gt;Version&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-ne&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$latestInstalledVersion&lt;/span&gt; } | Uninstall-Module -Verbose&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;scripts&#34;&gt;&#xD;&#xA;  Scripts&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#scripts&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Uninstall all versions except the latest for an installed script.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Use Git and GitHub</title>
      <link>https://martinolsson.com/guides/git-and-github/</link>
      <pubDate>Thu, 09 Apr 2026 07:45:16 +0200</pubDate>
      <guid>https://martinolsson.com/guides/git-and-github/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.blog/open-source/git/how-to-undo-almost-anything-with-git&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;How to undo (almost) anything with Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://dangitgit.com/en&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Dangit, Git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;a-collection-of-commands-for-reference&#34;&gt;&#xD;&#xA;  A collection of commands for reference&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#a-collection-of-commands-for-reference&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Configure git.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --global user.name &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#34;&amp;lt;name&amp;gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --global user.email &amp;lt;email&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Clone a repository to the local machine.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/MyUsername/MyRepository.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add GitHub remote management to the repository.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote add origin https://github.com/MyUsername/MyRepository.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Show remote repositories.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote -v&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Automatically run PowerShell scripts on Windows startup</title>
      <link>https://martinolsson.com/guides/windows-task-scheduler-autobackup/</link>
      <pubDate>Tue, 26 Aug 2025 06:55:57 +0200</pubDate>
      <guid>https://martinolsson.com/guides/windows-task-scheduler-autobackup/</guid>
      <description>&lt;h1 id=&#34;configure-windows-task-scheduler-to-automatically-run-a-script-on-logon&#34;&gt;&#xD;&#xA;  Configure Windows Task Scheduler to automatically run a script on logon&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#configure-windows-task-scheduler-to-automatically-run-a-script-on-logon&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;h2 id=&#34;create-the-script&#34;&gt;&#xD;&#xA;  Create the script&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#create-the-script&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;This is a sample PowerShell script for backing up files (&lt;strong&gt;Copy-BackupFiles.ps1&lt;/strong&gt;).&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;function&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;Copy-BackupFile {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ff7b72&#34;&gt;param&lt;/span&gt;(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [ValidateNotNull()]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;string&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$Path&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [Parameter(Mandatory)]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [ValidateNotNullOrEmpty()]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;string[]&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$Destination&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;string&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$Filter&lt;/span&gt; = &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;*.*&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;int&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryCount&lt;/span&gt; = &lt;span style=&#34;color:#a5d6ff&#34;&gt;2&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;int&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryWaitSeconds&lt;/span&gt; = &lt;span style=&#34;color:#a5d6ff&#34;&gt;5&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        [&lt;span style=&#34;color:#79c0ff;font-weight:bold&#34;&gt;switch&lt;/span&gt;]&lt;span style=&#34;color:#79c0ff&#34;&gt;$PurgeDestinationFiles&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#ff7b72&#34;&gt;foreach&lt;/span&gt; (&lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt; &lt;span style=&#34;color:#ff7b72&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$Path&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ff7b72&#34;&gt;if&lt;/span&gt; (Test-Path -Path &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt; -PathType Container) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourceFiles&lt;/span&gt; = Get-ChildItem -Path &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-File&lt;/span&gt; -Recurse&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#ff7b72&#34;&gt;if&lt;/span&gt; ((&lt;span style=&#34;color:#79c0ff&#34;&gt;$sourceFiles&lt;/span&gt; | Measure-Object).&lt;span style=&#34;color:#79c0ff&#34;&gt;Count&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-gt&lt;/span&gt; &lt;span style=&#34;color:#a5d6ff&#34;&gt;0&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                &lt;span style=&#34;color:#ff7b72&#34;&gt;foreach&lt;/span&gt; (&lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt; &lt;span style=&#34;color:#ff7b72&#34;&gt;in&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$Destination&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    &lt;span style=&#34;color:#ff7b72&#34;&gt;if&lt;/span&gt; (Test-Path -Path (Split-Path -Path &lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt; -Parent) -PathType Container) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        &lt;span style=&#34;color:#ff7b72&#34;&gt;try&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            Write-Verbose &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#34;&lt;/span&gt;$(&lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt;)&lt;span style=&#34;color:#a5d6ff&#34;&gt; --&amp;gt; &lt;/span&gt;$(&lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt;)&lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            &lt;span style=&#34;color:#ff7b72&#34;&gt;if&lt;/span&gt; (&lt;span style=&#34;color:#79c0ff&#34;&gt;$PurgeDestinationFiles&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                robocopy &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$Filter&lt;/span&gt; /PURGE /S /R:&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryCount&lt;/span&gt; /W:&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryWaitSeconds&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            &lt;span style=&#34;color:#ff7b72&#34;&gt;else&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                robocopy &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$Filter&lt;/span&gt; /S /R:&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryCount&lt;/span&gt; /W:&lt;span style=&#34;color:#79c0ff&#34;&gt;$RetryWaitSeconds&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        &lt;span style=&#34;color:#ff7b72&#34;&gt;catch&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                            Write-Error (&lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;Failed to copy files from &amp;#34;{0}&amp;#34; to &amp;#34;{1}&amp;#34;. {2}&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-f&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt;, &lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt;, &lt;span style=&#34;color:#79c0ff&#34;&gt;$PSItem&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    &lt;span style=&#34;color:#ff7b72&#34;&gt;else&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                        Write-Error (&lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;Cannot find the parent directory of destination path &amp;#34;{0}&amp;#34;.&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-f&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$destPath&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#ff7b72&#34;&gt;else&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                Write-Error (&lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;No files in &amp;#34;{0}&amp;#34;.&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-f&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$Path&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#ff7b72&#34;&gt;else&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            Write-Error (&lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;Cannot find the source path &amp;#34;{0}&amp;#34;.&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;-f&lt;/span&gt; &lt;span style=&#34;color:#79c0ff&#34;&gt;$sourcePath&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$params&lt;/span&gt; = @{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Path = &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$env:USERPROFILE&lt;/span&gt;&lt;span style=&#34;color:#a5d6ff&#34;&gt;\Documents\MyFolder&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Destination = @(&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;\\NAS\home\Backup\MyFolder&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$env:USERPROFILE&lt;/span&gt;&lt;span style=&#34;color:#a5d6ff&#34;&gt;\OneDrive - FirstName LastName\Backup\MyFolder&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    PurgeDestinationFiles = $true&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Copy-BackupFile &lt;span style=&#34;color:#79c0ff&#34;&gt;@params&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;create-the-scheduled-task&#34;&gt;&#xD;&#xA;  Create the scheduled task&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#create-the-scheduled-task&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;Open &lt;strong&gt;Task Scheduler&lt;/strong&gt; and create a new task. Configure the following settings.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to a Linux host using SSH key instead of credentials</title>
      <link>https://martinolsson.com/guides/sshkey-linux-connection/</link>
      <pubDate>Wed, 20 Aug 2025 06:46:54 +0200</pubDate>
      <guid>https://martinolsson.com/guides/sshkey-linux-connection/</guid>
      <description>&lt;h1 id=&#34;generate-a-new-ssh-key-on-the-client&#34;&gt;&#xD;&#xA;  Generate a new SSH key on the client&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#generate-a-new-ssh-key-on-the-client&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-keygen -t rsa -b &lt;span style=&#34;color:#a5d6ff&#34;&gt;4096&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;copy-the-public-key-to-the-hostserver&#34;&gt;&#xD;&#xA;  Copy the public key to the host/server&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#copy-the-public-key-to-the-hostserver&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;h2 id=&#34;method-1-automatically-copy-the-key-to-the-host&#34;&gt;&#xD;&#xA;  Method 1: Automatically copy the key to the host&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#method-1-automatically-copy-the-key-to-the-host&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;Command alternative 1:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat ~/.ssh/id_rsa.pub | ssh user@host &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Command alternative 2:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh user@host &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;#39;&lt;/span&gt; &amp;lt; ~/.ssh/id_rsa.pub&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;method-2-manually-copy-the-key&#34;&gt;&#xD;&#xA;  Method 2: Manually copy the key&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#method-2-manually-copy-the-key&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;On the client: View the public key to be able to copy it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Manage secrets with PowerShell</title>
      <link>https://martinolsson.com/guides/powershell-secret-management/</link>
      <pubDate>Sun, 10 Aug 2025 13:40:57 +0200</pubDate>
      <guid>https://martinolsson.com/guides/powershell-secret-management/</guid>
      <description>&lt;h1 id=&#34;set-up-a-new-secret-store&#34;&gt;&#xD;&#xA;  Set up a new secret store&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#set-up-a-new-secret-store&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Install required modules.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Install-Module Microsoft.&lt;span style=&#34;color:#79c0ff&#34;&gt;PowerShell&lt;/span&gt;.SecretManagement, Microsoft.&lt;span style=&#34;color:#79c0ff&#34;&gt;PowerShell&lt;/span&gt;.&lt;span style=&#34;color:#79c0ff&#34;&gt;SecretStore&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Export your vault password to a CLI XML file in your PowerShell profile directory.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$vaultPassword&lt;/span&gt; = Read-Host &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;Enter a vault password&amp;#39;&lt;/span&gt; -AsSecureString&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$vaultPasswordPath&lt;/span&gt; = Join-Path -Path (Split-Path -Path &lt;span style=&#34;color:#79c0ff&#34;&gt;$PROFILE&lt;/span&gt;) -ChildPath &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;SecretStore.vault.credential&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#79c0ff&#34;&gt;$vaultPassword&lt;/span&gt; | Export-CliXml -Path &lt;span style=&#34;color:#79c0ff&#34;&gt;$vaultPasswordPath&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Register a new vault (named &lt;strong&gt;SecretStore&lt;/strong&gt;).&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Set-SecretStoreConfiguration -Scope CurrentUser -Authentication Password -PasswordTimeout (&lt;span style=&#34;color:#a5d6ff&#34;&gt;60&lt;/span&gt; * &lt;span style=&#34;color:#a5d6ff&#34;&gt;60&lt;/span&gt;) -Interaction None -Password &lt;span style=&#34;color:#79c0ff&#34;&gt;$vaultPassword&lt;/span&gt; -Confirm:$false&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Register-SecretVault -Name &lt;span style=&#34;color:#a5d6ff&#34;&gt;&amp;#39;SecretStore&amp;#39;&lt;/span&gt; -ModuleName Microsoft.&lt;span style=&#34;color:#79c0ff&#34;&gt;PowerShell&lt;/span&gt;.&lt;span style=&#34;color:#79c0ff&#34;&gt;SecretStore&lt;/span&gt; -DefaultVault&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;add-a-secret-to-the-vault&#34;&gt;&#xD;&#xA;  Add a secret to the vault&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#add-a-secret-to-the-vault&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Unlock the vault.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Generate a Let&#39;s Encrypt certificate with PowerShell</title>
      <link>https://martinolsson.com/guides/generate-letsencrypt-cert-powershell/</link>
      <pubDate>Sun, 10 Aug 2025 13:40:43 +0200</pubDate>
      <guid>https://martinolsson.com/guides/generate-letsencrypt-cert-powershell/</guid>
      <description>&lt;p&gt;This method will allow you to automate Let&amp;rsquo;s Encrypt certificate creation/renewal with PowerShell.&lt;/p&gt;&#xA;&lt;p&gt;Install the &lt;a href=&#34;https://poshac.me/docs/latest/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Posh-ACME&lt;/a&gt; module.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Install-Module Posh-ACME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;create-a-new-certificate&#34;&gt;&#xD;&#xA;  Create a new certificate&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#create-a-new-certificate&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;Set the Let&amp;rsquo;s Encrypt server to staging, to make sure everything works before changing it to the production server.&lt;/p&gt;&#xA;&lt;p&gt;This will produce certificate files, but they will not be valid for production use. Changing it to LE_PROD will allow you to create a valid certificate (see steps further down in the guide).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automatically backup files from Linux to an SFTP server</title>
      <link>https://martinolsson.com/guides/backup-linux-sftp/</link>
      <pubDate>Sun, 10 Aug 2025 13:40:11 +0200</pubDate>
      <guid>https://martinolsson.com/guides/backup-linux-sftp/</guid>
      <description>&lt;h1 id=&#34;prepare-authentication-to-the-sftp-server&#34;&gt;&#xD;&#xA;  Prepare authentication to the SFTP server&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#prepare-authentication-to-the-sftp-server&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;h2 id=&#34;generate-an-ssh-key-on-the-client&#34;&gt;&#xD;&#xA;  Generate an SSH key on the client&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#generate-an-ssh-key-on-the-client&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;This will allow the client to authenticate to the server without a username and password.&lt;/p&gt;&#xA;&lt;p&gt;Generate the SSH key.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-keygen -t rsa -b &lt;span style=&#34;color:#a5d6ff&#34;&gt;4096&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Copy the SSH key.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat ~/.ssh/id_rsa.pub&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;add-the-ssh-key-to-the-sftp-server&#34;&gt;&#xD;&#xA;  Add the SSH key to the SFTP server&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#add-the-ssh-key-to-the-sftp-server&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h2&gt;&#xD;&#xA;&lt;p&gt;Open the authorized keys file and add the SSH key on a new line.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Send automated email with PowerShell and Microsoft Graph</title>
      <link>https://martinolsson.com/guides/send-email-msgraph-powershell/</link>
      <pubDate>Thu, 07 Aug 2025 13:08:39 +0200</pubDate>
      <guid>https://martinolsson.com/guides/send-email-msgraph-powershell/</guid>
      <description>&lt;p&gt;Use this method to securely automate the sending of email from your PowerShell scripts, by authenticating to MS Graph with a certificate (instead of username and password) through a custom Entra app.&lt;/p&gt;&#xA;&lt;h1 id=&#34;create-a-mail-enabled-security-group&#34;&gt;&#xD;&#xA;  Create a mail-enabled security group&#xD;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#create-a-mail-enabled-security-group&#34;&gt;&#xD;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xD;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xD;&#xA;  &lt;/a&gt;&#xD;&#xA;&lt;/h1&gt;&#xD;&#xA;&lt;p&gt;This will limit which mailbox(es) can send automated email from the Entra app. It&amp;rsquo;s technically not required, but recommended for security and privacy reasons.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;The group will only be used to control which mailboxes will be allowed to send mail through the Entra app. The group&amp;rsquo;s mail address will not be used for anything.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
