<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss-style.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sajal Choudhary - Garden</title><description>A collection of documentation, notes, and explorations from my projects and learning.</description><link>https://sajalchoudhary.net/</link><item><title>The four diseases leading to slow death</title><link>https://sajalchoudhary.net/evergreen/the-four-diseases-leading-to-slow-death/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/the-four-diseases-leading-to-slow-death/</guid><pubDate>Tue, 14 Apr 2026 11:54:01 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/outlive&quot;&gt;Outlive&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Heart disease&lt;/li&gt;
&lt;li&gt;Cancer&lt;/li&gt;
&lt;li&gt;Neurodegenerative disease&lt;/li&gt;
&lt;li&gt;Type 2 diabetes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Slow death moves very slowly. We need to step in sooner or better yet prevent them altogether.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>health</category><category>longevity</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Generators in python</title><link>https://sajalchoudhary.net/til/generators-in-python/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/generators-in-python/</guid><pubDate>Mon, 30 Mar 2026 13:27:36 GMT</pubDate><content:encoded>&lt;p&gt;Generators return iterator objects in Python. Instead of using a return statement, it uses a &lt;code&gt;yield&lt;/code&gt; statement to provide a list of results. The iterator object can then be used in a loop.&lt;/p&gt;
&lt;p&gt;Generators stop running and save state once a &lt;code&gt;yield&lt;/code&gt; statement is reached.&lt;/p&gt;
&lt;p&gt;When compared to traditional method, the benefit is that it uses less memory, because it does not load everything in memory. It is ideal for producing sequences lazily.&lt;/p&gt;
&lt;h2&gt;How to define&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;# Define function
def sum_upto(n):
    num = 0
    while num &amp;lt; n:
       yield num
       num += 1
       
       
# Generate object
gen = sum_upto(3)

## call
next(gen)
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;def read_log_lines(filepath):
    &quot;&quot;&quot;
    Creates a generator that reads a log file, yielding valid, non-comment lines.
 
    Args:
        filepath (str): The path to the log file.
 
    Yields:
        str: A stripped, non-empty, non-comment line from the file.
    &quot;&quot;&quot;
    # TODO: Implement the generator logic.
    # 1. Open the file safely.
    # 2. Iterate through each line, removing whitespace and checking whether it&apos;s valid.
    # 3. If the line is valid, yield it.
   
    with open (filepath, &quot;r&quot;) as logfile:
        for line in logfile:
            logline = line.strip()
            if logline:
                if not logline[0] == &quot;#&quot;:
                    yield logline
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Conditionals in python</title><link>https://sajalchoudhary.net/til/conditionals-in-python/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/conditionals-in-python/</guid><pubDate>Wed, 25 Mar 2026 10:50:38 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;if &amp;lt;condition&amp;gt;:
    Code
elif &amp;lt;condition&amp;gt;:
    Code
else:
    Code
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Difference between lists tuples and sets</title><link>https://sajalchoudhary.net/til/difference-between-lists-tuples-and-sets/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/difference-between-lists-tuples-and-sets/</guid><pubDate>Wed, 25 Mar 2026 10:15:05 GMT</pubDate><content:encoded>&lt;p&gt;Lists are ordered, mutable and allow duplicates.&lt;br /&gt;Tuples are ordered, immutable and allow duplicates.&lt;br /&gt;Sets are unordered, mutable and do not allow duplicates.&lt;/p&gt;
&lt;p&gt;Sets can be used to deduplicate data or performing membership checks.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;## Lists
list_name = [“web1”, “web2”]

# Tuples
tuple_name = (“web1”, “web2”)

# Set
set_name = {“web1”, “web2”}
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>To remove duplicates from a list use sets</title><link>https://sajalchoudhary.net/til/to-remove-duplicates-from-a-list-use-sets/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/to-remove-duplicates-from-a-list-use-sets/</guid><pubDate>Tue, 24 Mar 2026 14:55:58 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# create set using {} or with set keyword

unique_ports = set([80,443,8080,80])
unique_servers = {“web1”, “web2”}
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>To create a single item tuple add a comma to the end</title><link>https://sajalchoudhary.net/til/to-create-a-single-item-tuple-add-a-comma-to-the-end/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/to-create-a-single-item-tuple-add-a-comma-to-the-end/</guid><pubDate>Tue, 24 Mar 2026 14:50:21 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;single_value_tuple = (“single”,)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>What does a kernel do</title><link>https://sajalchoudhary.net/til/what-does-a-kernel-do/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/what-does-a-kernel-do/</guid><pubDate>Wed, 18 Mar 2026 09:55:49 GMT</pubDate><content:encoded>&lt;p&gt;Generally, a kernel manages task in four general areas -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Processes - what process is allowed to run in the CPU &lt;/li&gt;
&lt;li&gt;Memory - what is allocated to a process, what is shared, what is free&lt;/li&gt;
&lt;li&gt;Device drivers - kernel operates the hardware, acting as interface &lt;/li&gt;
&lt;li&gt;System calls and support - Processes use system calls to communicate with the kernel&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From &lt;a href=&quot;/bookshelf/how-linux-works&quot;&gt;How Linux Works&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>til</category><category>linux</category><category>os</category><category>kernel</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Coupling and cohesion</title><link>https://sajalchoudhary.net/til/coupling-and-cohesion/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/coupling-and-cohesion/</guid><pubDate>Mon, 09 Mar 2026 12:19:56 GMT</pubDate><content:encoded>&lt;p&gt;In the context of micro-services architecture, from &lt;a href=&quot;/bookshelf/building-microservices&quot;&gt;Building microservices&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Cohesion&lt;/h2&gt;
&lt;p&gt;We want related behaviour to sit together and unrelated behaviour to sit elsewhere. Because when we want to change one behaviour, we want to be able to do it. &lt;/p&gt;
&lt;h2&gt;Coupling&lt;/h2&gt;
&lt;p&gt;Systems should be loosely coupled. So that changes to one system does not affect the other systems.&lt;/p&gt;
</content:encoded><category>til</category><category>micro-services</category><category>architecture</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of coupling</title><link>https://sajalchoudhary.net/til/types-of-coupling/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-coupling/</guid><pubDate>Mon, 09 Mar 2026 12:18:43 GMT</pubDate><content:encoded>&lt;p&gt;In the context of micro-services architecture, learned from &lt;a href=&quot;/bookshelf/building-microservices&quot;&gt;Building microservices.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Domain coupling&lt;/h2&gt;
&lt;p&gt;One service needs to interact with a different service. This is mostly unavoidable. &lt;/p&gt;
&lt;h2&gt;Passthrough coupling&lt;/h2&gt;
&lt;p&gt;One service passes data to a different service, because the data is needed by the other service further downstream. It can be problematic because if they need it in a different format or need different items, than we may need to make changes as well.&lt;/p&gt;
&lt;h2&gt;Common coupling&lt;/h2&gt;
&lt;p&gt;In common coupling two of more services use a common data source. Not desirable.&lt;/p&gt;
&lt;h2&gt;Content coupling&lt;/h2&gt;
&lt;p&gt;Very similar to common coupling, the difference is that the external system can directly make changes to the internal state. Should be avoided.&lt;/p&gt;
</content:encoded><category>til</category><category>micro-services</category><category>architecture</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Learning microservices and k8s</title><link>https://sajalchoudhary.net/now/learning-microservices-and-k8s/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/learning-microservices-and-k8s/</guid><pubDate>Fri, 06 Mar 2026 11:01:56 GMT</pubDate><content:encoded>&lt;p&gt;Getting reacquainted with k8s and microservices. The goal is CKA at the end of this. Targeting this exam some time in April, perhaps the last week.&lt;/p&gt;
&lt;h2&gt;Log&lt;/h2&gt;
&lt;p&gt;2026-03-06 13:00 - Started reading &lt;a href=&quot;/bookshelf/building-microservices&quot;&gt;Building microservices by Sam Newman&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>now</category><category>technical</category><category>k8s</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AI</title><link>https://sajalchoudhary.net/now/azure-ai/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/azure-ai/</guid><pubDate>Mon, 23 Feb 2026 10:09:48 GMT</pubDate><content:encoded>&lt;p&gt;This is a certification quest for the next few months. The goal for this is the Azure AI 900 certification.&lt;/p&gt;
&lt;p&gt;Primary source for learning is the Microsoft Learning Path with 14 modules for this path.&lt;/p&gt;
&lt;h2&gt;Log&lt;/h2&gt;
&lt;p&gt;2026-02-27 13:07 - Started with the module.&lt;/p&gt;
</content:encoded><category>now</category><category>azure</category><category>ai</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Write a letter to your child</title><link>https://sajalchoudhary.net/evergreen/write-a-letter-to-your-child/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/write-a-letter-to-your-child/</guid><pubDate>Sat, 31 Jan 2026 18:25:30 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/bird-by-bird&quot;&gt;Bird by bird&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When stuck, or unsure what to write, write it as a letter to your child. Tell them whatever you want to tell them, however you want to tell them.&lt;/p&gt;
&lt;p&gt;That might just be enough to get you writing and finding the story.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>writing</category><category>craft</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to craft a story</title><link>https://sajalchoudhary.net/evergreen/how-to-craft-a-story/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-craft-a-story/</guid><pubDate>Wed, 28 Jan 2026 08:49:01 GMT</pubDate><content:encoded>&lt;p&gt;There are three acts to a story - beginning, middle and end.&lt;/p&gt;
&lt;p&gt;Consider a 100K word novel.&lt;/p&gt;
&lt;p&gt;You spend 25 K for the beginning, 50 K for the middle and 25 K for the end.&lt;/p&gt;
&lt;p&gt;Each scene or chapter should ideally be around 2K words. Why? Because readers can’t quit in the middle of a chapter. 2K words is a good enough length, a potato chip length, where the reader will keep reading one more chapter.&lt;/p&gt;
&lt;p&gt;This comes out in terms of scenes - 12 for the beginning, 25 for the middle and 13 for the end - more or less.&lt;/p&gt;
&lt;p&gt;There are fifteen scenes that each part needs to have - &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Inciting&lt;/li&gt;
&lt;li&gt;Complication&lt;/li&gt;
&lt;li&gt;Crisis&lt;/li&gt;
&lt;li&gt;Climax&lt;/li&gt;
&lt;li&gt;Resolution&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So that’s 15 scenes done. Now, for the rest of the 35.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>writing</category><category>craft</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Importing Goodreads data to Astro</title><link>https://sajalchoudhary.net/til/importing-goodreads-data-to-astro/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/importing-goodreads-data-to-astro/</guid><pubDate>Tue, 06 Jan 2026 20:18:14 GMT</pubDate><content:encoded>&lt;p&gt;I pulled my read list from Goodreads to my blog today. There are no notes or reviews for these books on Goodreads. &lt;/p&gt;
&lt;p&gt;I love my bookshelf page. But I have had it for this year only and the literature notes since 2021, even then not noting every book I read. All of this is a long way to say there will be missing books.&lt;/p&gt;
&lt;p&gt;This is good enough though. Most of the books are from 2013, while I was in my third year at college. I guess that’s when I would have known about Goodreads. &lt;/p&gt;
&lt;p&gt;Here’s how I did it -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Export data from Goodreads.&lt;/li&gt;
&lt;li&gt;There would be a zip of review.json. This file has your data.&lt;/li&gt;
&lt;li&gt;Ask Claude to create a script to pull this info into markdown.&lt;/li&gt;
&lt;li&gt;Build the site.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>reading</category><category>books</category><category>astro</category><category>goodreads</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The systems in a Jenkins installation</title><link>https://sajalchoudhary.net/til/the-systems-in-a-jenkins-installation/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/the-systems-in-a-jenkins-installation/</guid><pubDate>Tue, 30 Dec 2025 09:55:42 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Master - Has access to all config and options, and full list of jobs. By default jobs run on master if any other system is not specified. However, other systems should be configured to run jobs.&lt;/li&gt;
&lt;li&gt;Agent - Any nonmaster system. Managed by master to run jobs. Associated with declarative pipeline.&lt;/li&gt;
&lt;li&gt;Node -  a generic term for both masters and agents. Associated with scripted pipeline.&lt;/li&gt;
&lt;li&gt;Executor - a slot for running a job. No of executors defines how many jobs can run on a node in parallel.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>jenkins</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ultraprocessed food is designed to be irresistible</title><link>https://sajalchoudhary.net/evergreen/ultraprocessed-food-is-designed-to-be-irresistible/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/ultraprocessed-food-is-designed-to-be-irresistible/</guid><pubDate>Mon, 29 Dec 2025 13:39:08 GMT</pubDate><content:encoded>&lt;h2&gt;How?&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Bliss point - the amount of an ingredient (salt/sugar/fat) which optimises deliciousness &lt;/li&gt;
&lt;li&gt;Texture - soft foods require less chewing, so we eat more food&lt;/li&gt;
&lt;li&gt;Marketing - Colourful packaging, cartoons to market to kids, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ultraprocessed food uses all of these things to be just irresistible. The industry uses many of the items from the cigarette industry playbook - denying addiction, different packaging and so on.&lt;/p&gt;
&lt;p&gt;I saw this &lt;a href=&quot;https://m.imdb.com/title/tt34778117/&quot;&gt;documentary (Irresistible: Why We Can&apos;t Stop Eating)&lt;/a&gt; which talked about these points in detail.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>food</category><category>health</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to read</title><link>https://sajalchoudhary.net/evergreen/how-to-read/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-read/</guid><pubDate>Fri, 26 Dec 2025 20:48:05 GMT</pubDate><content:encoded>&lt;p&gt;Read anything and everything. &lt;/p&gt;
&lt;p&gt;Anything that draws you to it - whether you like the book’s cover or a blurb or its description or the writer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Have a wide funnel. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But you don’t have to finish every book you start reading. If you don’t like it, drop it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Have a sharp filter.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This idea - wide funnel / sharp filter - came across it while reading &lt;a href=&quot;/bookshelf/the-art-of-spending-money&quot;&gt;The art of spending money&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>reading</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Write for one person</title><link>https://sajalchoudhary.net/evergreen/write-for-one-person/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/write-for-one-person/</guid><pubDate>Fri, 26 Dec 2025 17:59:24 GMT</pubDate><content:encoded>&lt;p&gt;Write for one person. It’s difficult to make every one happy. If you try to write that way you will not be able to write anything. So, write for one person - the person you love. Try to make them happy.&lt;/p&gt;
&lt;p&gt;Hemingway thought the same (from &lt;a href=&quot;/bookshelf/ernest-hemingway-on-writing&quot;&gt;Ernest Hemingway on writing&lt;/a&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I believe that basically you write for two people: yourself to try to make it absolutely perfect; or if not that, then wonderful. Then you write for who you love, whether she can read or write or not, and whether she is alive or dead.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>evergreen</category><category>writing</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Limitations mean freedom</title><link>https://sajalchoudhary.net/evergreen/limitations-mean-freedom/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/limitations-mean-freedom/</guid><pubDate>Sun, 21 Dec 2025 20:32:54 GMT</pubDate><content:encoded>&lt;p&gt;I had this thought a couple of days back about time-limits. &lt;/p&gt;
&lt;p&gt;I have had this thought a couple of times in the past, mostly with regard to my writing. About having a deadline, a shipping date by which I have to ship a work.&lt;/p&gt;
&lt;p&gt;This recent thought I had was with regard to reading, specifically the type of reading I am doing now - using e-kirjasto (e-library). Compared to the traditional books I borrow from Helmet, I borrow e-books or audiobooks from the e-library. Both of those are borrowed for 14 days. That time limit forces me to finish the book in this time. I find myself reading whenever possible. I have mostly stopped listening to podcasts now. I read ebooks while eating lunch or whenever I have time.&lt;/p&gt;
&lt;p&gt;I find this applies to other things as well - like figuring out what to learn. It’s good to limit yourself to one or two things, using two or three resources. The technology landscape is huge and limitations are good. This limitation is not the time-limitation I talked about in the last paragraph. It is a different limitation - of choice.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>limitation</category><category>freedom</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Three types of tests</title><link>https://sajalchoudhary.net/til/three-types-of-tests/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/three-types-of-tests/</guid><pubDate>Fri, 19 Dec 2025 08:03:49 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Unit tests - to test the behaviour of small pieces of app in isolation.&lt;/li&gt;
&lt;li&gt;Component tests - to test the behaviour of several components.&lt;/li&gt;
&lt;li&gt;Acceptance tests - test the whole application to ensure acceptance set by the org.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>testing</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to run powershell as system account</title><link>https://sajalchoudhary.net/til/how-to-run-powershell-as-system-account/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-run-powershell-as-system-account/</guid><pubDate>Thu, 18 Dec 2025 10:32:50 GMT</pubDate><content:encoded>&lt;p&gt;There are two ways to run your powershell script as the SYSTEM account:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use PsExec&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Psexec.exe -i -s C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe`
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Create a scheduled task that runs it as system, use &lt;code&gt;-User &apos;NT AUTHORITY\SYSTEM&apos; &lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Yubikey Minidriver install</title><link>https://sajalchoudhary.net/til/yubikey-minidriver-install/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/yubikey-minidriver-install/</guid><pubDate>Thu, 18 Dec 2025 10:32:33 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# Quiet instal
msiexec /i YubiKey-Minidriver-5.0.1.272-x64.msi /quiet

# To verify install
Get-WindowsDriver -Online | where {($_.ProviderName -like &quot;Yubico&quot;) -and ($_.ClassName -like &quot;SmartCard&quot;) -and ($_.Version -like &quot;*&quot;)} | select ProviderName,ClassName,Version
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>windows</category><category>yubikey</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows upgrade fails with optional component installation failed</title><link>https://sajalchoudhary.net/til/windows-upgrade-fails-with-optional-component-installation-failed/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-upgrade-fails-with-optional-component-installation-failed/</guid><pubDate>Thu, 18 Dec 2025 10:32:16 GMT</pubDate><content:encoded>&lt;h1&gt;Error&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;Setupdiag reports Optional Component installation failed to open the OC package.&lt;/code&gt;&lt;br /&gt;Already checked the windows modules installer server and ensure it is automatic and running. Upgrade continues to fail&lt;/p&gt;
&lt;h1&gt;Issue&lt;/h1&gt;
&lt;p&gt;Missing foundation packages from the server. This registry key was empty = &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;h2&gt;Method 1&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to a healthy server.&lt;/li&gt;
&lt;li&gt;Run the following and check that &lt;code&gt;Microsoft-Windows-Foundation-Package&lt;/code&gt; is present.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;dism /online /get-packages /format:table
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Also check at &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages&lt;/code&gt;, export the Packages key.&lt;/li&gt;
&lt;li&gt;Go to the failing machine, and merge this .reg file.&lt;/li&gt;
&lt;li&gt;Verify that the merge was successful.&lt;/li&gt;
&lt;li&gt;Retry the upgrade.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Method 2 - In place repair&lt;/h2&gt;
&lt;h3&gt;Some points&lt;/h3&gt;
&lt;p&gt;In-place upgrade will only replace the contents of the C:\Windows folder. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is a non-destructive process as it does not alter/delete any user profiles, files and programs.  &lt;/li&gt;
&lt;li&gt;You do not have to restore anything from the backup. This is because any programs/applications are installed either in C:\ProgramFiles or C:\ProgramFilesx86 which are outside C:\Windows folder. (but taking a backup is recommended)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please note however, that in-place upgrade will delete all your windows update, and we would have to install the updates again. (Since the update is cumulative, you only need to install the latest one to resolve the issues.)&lt;/p&gt;
&lt;p&gt;From &lt;a href=&quot;https://learn.microsoft.com/en-us/mem/configmgr/osd/understand/in-place-upgrade-recommendations&quot; title=&quot;https://learn.microsoft.com/en-us/mem/configmgr/osd/understand/in-place-upgrade-recommendations&quot;&gt;In-place upgrade recommendations&lt;/a&gt; -  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If this is a DC, you need to demote the machine to a domain member.&lt;/li&gt;
&lt;li&gt;If you have IIS installed on this, you need to remove IIS and reinstall once the OS is back up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;1. Please prepare and download Window Server 2016 ISO image at: &lt;a href=&quot;https://admin.microsoft.com/adminportal/home#/subscriptions/vlnew&quot; title=&quot;https://admin.microsoft.com/adminportal/home#/subscriptions/vlnew&quot;&gt;Microsoft 365 admin center&lt;/a&gt; or from the original ISO provider you choose to download when first install Window Server 2016.&lt;br /&gt;2. Double click the “Setup” of the mounted WS 2016 image&lt;br /&gt;3. Select Yes to start the setup process.&lt;br /&gt;4. For internet-connected devices, select the Download updates, drivers and optional features (recommended) option, and then select Next.&lt;br /&gt;5. Setup checks your device configuration, you must wait for it to finish, and then select Next.&lt;br /&gt;6. Select the Windows Server 2016 edition you want to install, and then select Next.&lt;br /&gt;7. Select Accept to accept the terms of your licensing agreement, based on your distribution channel (such as, Retail, Volume License, OEM, ODM, and so on).&lt;br /&gt;8. Select Keep personal files and apps to choose to do an in-place upgrade, and then select Next.&lt;br /&gt;9. If you see a page that tells you upgrade isn&apos;t recommended, you can ignore it and select Confirm. It was put in place to prompt for clean installations, but it isn&apos;t necessary.&lt;br /&gt;10. Setup will tell you to remove Microsoft Endpoint Protection using Add/Remove programs.&lt;br /&gt;11. After Setup analyzes your device, it will prompt you to proceed with your upgrade by selecting Install.&lt;br /&gt;12. The in-place upgrade starts, showing you the Upgrading Windows screen with its progress. After the upgrade finishes, your server will restart.&lt;br /&gt;13. After your upgrade completes, continue to upgrade with the 2019 ISO using the same method.&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>upgrade</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to export csv from cis scan</title><link>https://sajalchoudhary.net/til/how-to-export-csv-from-cis-scan/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-export-csv-from-cis-scan/</guid><pubDate>Thu, 18 Dec 2025 10:31:55 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
[xml]$arf = Get-Content 0250803011443.xml


# Define the ARF namespace
$ns = New-Object System.Xml.XmlNamespaceManager($arf.NameTable)
$ns.AddNamespace(&quot;arf&quot;, &quot;http://scap.nist.gov/schema/asset-reporting-format/1.1&quot;)

$reports = $arf.SelectNodes(&quot;//arf:report&quot;, $ns)
$reports.Count


$rules = $arf.SelectNodes(&quot;//*[local-name()=&apos;Rule&apos;&quot;)

$rules = $arf.SelectNodes(&quot;//*[local-name()=&apos;Rule&apos;]&quot;)

$rows = @()

foreach ($rule in $rules) {
    $rows += [pscustomobject]@{
        Title = $rule.Title
        ID = $rule.id
        CISRef = $rule.reference | Where-Object { $_.href -match &quot;cisecurity.org/benchmark/&quot;} | Select-Object -ExpandProperty &apos;#text&apos; -First 1
    }
}

$rows | Export-Csv -Path rules3.csv -NoTypeInformation -Encoding UTF8
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>cis</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to configure time source using Group Policy</title><link>https://sajalchoudhary.net/til/how-to-configure-time-source-using-group-policy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-configure-time-source-using-group-policy/</guid><pubDate>Thu, 18 Dec 2025 10:30:51 GMT</pubDate><content:encoded>&lt;p&gt;Can be useful for non-domain joined machines.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Computer Configuration\Administrative Templates\System\Windows Time Service&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enable NTP Client.&lt;/li&gt;
&lt;li&gt;Configure Windows NTP Client&lt;ul&gt;
&lt;li&gt;Double-click &lt;strong&gt;Configure Windows NTP Client&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set it to &lt;strong&gt;Enabled&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Configure:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NTP Server&lt;/strong&gt;: Enter your NTP server(s), e.g.:&lt;pre&gt;&lt;code&gt;0.pool.ntp.org,0x1
&lt;/code&gt;&lt;/pre&gt;
  (The &lt;code&gt;,0x1&lt;/code&gt; flag means &quot;special poll&quot; mode.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;: Set to &lt;code&gt;NTP&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CrossSiteSyncFlags&lt;/strong&gt;: Leave default.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ResolvePeerBackoffMinutes&lt;/strong&gt;: Default is fine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SpecialPollInterval&lt;/strong&gt;: Common value is &lt;code&gt;3600&lt;/code&gt; (seconds = 1 hour).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EventLogFlags&lt;/strong&gt;: Default is fine.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Apply and Close&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;gpupdate /force&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>time</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create GPO to copy a file in a certain location and create a shortcut to that exe on Desktop</title><link>https://sajalchoudhary.net/til/create-gpo-to-copy-a-file-in-a-certain-location-and-create-a-shortcut-to-that-exe-on-desktop/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-gpo-to-copy-a-file-in-a-certain-location-and-create-a-shortcut-to-that-exe-on-desktop/</guid><pubDate>Thu, 18 Dec 2025 10:30:46 GMT</pubDate><content:encoded>&lt;h2&gt;Copy a file&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Run gpmc.msc&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;Computer Configuration&lt;/code&gt; → &lt;code&gt;Preferences&lt;/code&gt; → &lt;code&gt;Windows Settings&lt;/code&gt; → &lt;code&gt;Files&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Right-click → &lt;strong&gt;New&lt;/strong&gt; → &lt;strong&gt;File&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Action&lt;/strong&gt;: &lt;code&gt;Create&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Source file&lt;/strong&gt;: &lt;code&gt;\\YourServer\SharedFolder\App.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Destination file&lt;/strong&gt;: &lt;code&gt;C:\Program Files\AppFolder\App.exe&lt;/code&gt;&lt;br /&gt;  &lt;em&gt;(Create&lt;/em&gt; &lt;code&gt;_AppFolder_&lt;/code&gt; &lt;em&gt;if needed)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Optionally, set &lt;strong&gt;&quot;Run in logged-on user&apos;s security context&quot;&lt;/strong&gt; if needed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Create Desktop Shortcut**&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to:&lt;br /&gt; &lt;code&gt;User Configuration&lt;/code&gt; → &lt;code&gt;Preferences&lt;/code&gt; → &lt;code&gt;Windows Settings&lt;/code&gt; → &lt;code&gt;Shortcuts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Right-click → &lt;strong&gt;New&lt;/strong&gt; → &lt;strong&gt;Shortcut&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Action&lt;/strong&gt;: &lt;code&gt;Create&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: &lt;code&gt;App Shortcut&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Target type&lt;/strong&gt;: &lt;code&gt;File System Object&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Location&lt;/strong&gt;: &lt;code&gt;All Users Desktop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Target path&lt;/strong&gt;: &lt;code&gt;C:\Program Files\AppFolder\App.exe&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Icon file path&lt;/strong&gt;: &lt;em&gt;(optional)&lt;/em&gt;`&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>windows</category><category>gpo</category><category>shortcut</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to write commit messages</title><link>https://sajalchoudhary.net/til/how-to-write-commit-messages/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-write-commit-messages/</guid><pubDate>Mon, 24 Nov 2025 18:54:37 GMT</pubDate><content:encoded>&lt;p&gt;The authors of &lt;a href=&quot;/bookshelf/continuous-delivery&quot;&gt;continuous delivery&lt;/a&gt; prefer commit messages be multiple paragraph.&lt;/p&gt;
&lt;p&gt;The first paragraph being a summary of the change, and the rest of them explaining the commit in detail.&lt;/p&gt;
&lt;p&gt;It should also include ID for the project/bug this fixes.&lt;/p&gt;
</content:encoded><category>til</category><category>git</category><category>ci-cd</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to renew access token to Threads API</title><link>https://sajalchoudhary.net/til/how-to-renew-access-token-to-threads-api/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-renew-access-token-to-threads-api/</guid><pubDate>Mon, 24 Nov 2025 18:54:28 GMT</pubDate><content:encoded>&lt;p&gt;I use a Github workflow to sync content to Threads, Mastodon and Bluesky. &lt;/p&gt;
&lt;p&gt;Mastodon and Bluesky do not require any weird things - you set them up once and they are done.&lt;/p&gt;
&lt;p&gt;For threads though the access token expires every 60 days.&lt;/p&gt;
&lt;p&gt;The steps to renew it are as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;a href=&quot;https://developers.facebook.com/apps/&quot;&gt;FB developers website.&lt;/a&gt; and find the app you created for the integration. Open the app.&lt;/li&gt;
&lt;li&gt;On dashboard, there is an option to &apos;Customize the Access the Threads API use case&apos;. Click that.&lt;/li&gt;
&lt;li&gt;Go to settings in the next window.&lt;/li&gt;
&lt;li&gt;There is a user token generator at the very end of the page, with an action called &apos;Generate Access token&apos;.&lt;/li&gt;
&lt;li&gt;Click it. It will open a new window, authenticate to Threads and then it will generate a new access token.&lt;/li&gt;
&lt;li&gt;Copy this token and add it to the secrets on Github Actions.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>git</category><category>facebook</category><category>threads</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The goal of software engineering</title><link>https://sajalchoudhary.net/til/the-goal-of-software-engineering/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/the-goal-of-software-engineering/</guid><pubDate>Thu, 20 Nov 2025 08:14:14 GMT</pubDate><content:encoded>&lt;p&gt;Read first in &lt;a href=&quot;#&quot;&gt;continuous delivery.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To deliver high quality, valuable software in an efficient, fast and reliable manner. We need to achieve low cycle time and high quality.&lt;/p&gt;
&lt;h1&gt;How?&lt;/h1&gt;
&lt;p&gt;By making frequent, automated deployments.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automated deployments are repeatable.&lt;/li&gt;
&lt;li&gt;Frequent deployments ensure the delta between changes is low, as is the risk of issues.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Feedback is essential to this goal. There are three criteria for feedback to be useful -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Any change should trigger it&lt;/li&gt;
&lt;li&gt;Feedback must be delivered asap&lt;/li&gt;
&lt;li&gt;Team must receive the feedback and act on it&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>software</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Learning Jenkins</title><link>https://sajalchoudhary.net/now/learning-jenkins/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/learning-jenkins/</guid><pubDate>Wed, 19 Nov 2025 09:24:25 GMT</pubDate><content:encoded>&lt;p&gt;Started learning Jenkins.&lt;/p&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;bookshelf/continuous-delivery&quot;&gt;Continuous delivery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a&gt;Jenkins udemy course by Valentin Despa&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The CAP principle</title><link>https://sajalchoudhary.net/til/the-cap-principle/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/the-cap-principle/</guid><pubDate>Thu, 30 Oct 2025 11:46:10 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/the-practice-of-cloud-system-administration&quot;&gt;The practice of cloud system administration&lt;/a&gt; and other places.&lt;/p&gt;
&lt;p&gt;CAP stands for -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Consistency &lt;/li&gt;
&lt;li&gt;Availability &lt;/li&gt;
&lt;li&gt;Partition resistance&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The CAP principle states that a distributed system can have at max two of the three.&lt;/p&gt;
&lt;h1&gt;Consistency&lt;/h1&gt;
&lt;p&gt;All nodes see the same data at the same time. It is not necessary that this is achieved. Some delay for replication is considered OK, depending on the use case.&lt;/p&gt;
&lt;h1&gt;Availability&lt;/h1&gt;
&lt;p&gt;Whether the system is up or not - that is every request receives a response, whether successful or not.&lt;/p&gt;
&lt;h1&gt;Partition Resistance&lt;/h1&gt;
&lt;p&gt;System continues to work despite partial loss of functionality or arbitrary message loss.&lt;/p&gt;
&lt;p&gt;This principle leads to three types of systems -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;CA&lt;/li&gt;
&lt;li&gt;CP&lt;/li&gt;
&lt;li&gt;AP&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>distributed-systems</category><category>sysadmin</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Distributed system design patterns</title><link>https://sajalchoudhary.net/evergreen/distributed-system-design-patterns/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/distributed-system-design-patterns/</guid><pubDate>Wed, 29 Oct 2025 09:11:33 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/the-practice-of-cloud-system-administration&quot;&gt;The practice of cloud system administration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These are the three patterns:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Load balancer with replicated backends&lt;ol&gt;
&lt;li&gt;LB forwards query to backend server.&lt;/li&gt;
&lt;li&gt;Backend server are replicated, so any backend should give the same response for a certain query.&lt;/li&gt;
&lt;li&gt;Round-robin or slow start algorithm to assign traffic.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Server with multiple backend &lt;ol&gt;
&lt;li&gt;Server receives a query and then forward it to different components. &lt;/li&gt;
&lt;li&gt;The components all send their responses and then combine it to form the response the user gets.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Server tree&lt;ol&gt;
&lt;li&gt;Root receives the full query and forwards eat to leaf nodes.&lt;/li&gt;
&lt;li&gt;Each leaf node works on the query.&lt;/li&gt;
&lt;li&gt;It allows for parallel searching of a large corpus of data for example.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>distributed-systems</category><category>sysadmin</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Work at a natural pace</title><link>https://sajalchoudhary.net/evergreen/work-at-a-natural-pace/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/work-at-a-natural-pace/</guid><pubDate>Sun, 26 Oct 2025 20:55:28 GMT</pubDate><content:encoded>&lt;p&gt;There should be a varying approach to work, periods of rest and celebration, followed by periods of work.&lt;/p&gt;
&lt;h1&gt;How?&lt;/h1&gt;
&lt;h2&gt;Take longer to do things&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Have long terms plans - 5 years or so&lt;/li&gt;
&lt;li&gt;Double the time taken for projects &lt;ol&gt;
&lt;li&gt;Initial time estimates are usually guesses and wrong&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Simplify your day to day&lt;ol&gt;
&lt;li&gt;Schedule fewer meetings - If you block time for meeting, block similar amount of time for work&lt;/li&gt;
&lt;li&gt;Schedule lesser work - so that you have more time to do things&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>work</category><category>time-management</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create a simulated pull workflow</title><link>https://sajalchoudhary.net/evergreen/how-to-create-a-simulated-pull-workflow/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-create-a-simulated-pull-workflow/</guid><pubDate>Sun, 26 Oct 2025 20:52:38 GMT</pubDate><content:encoded>&lt;p&gt;Related to &lt;a href=&quot;#&quot;&gt;Pull vs push method for getting projects&lt;/a&gt;. Read about this first in &lt;a href=&quot;/bookshelf/slow-productivity&quot;&gt;Slow Productivity&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is especially useful when you don’t have control over how work gets assigned to you.&lt;/p&gt;
&lt;p&gt;The core of this system are the two buckets where projects live -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On hold&lt;/li&gt;
&lt;li&gt;In progress&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Every new work comes to the on hold bucket. Things you are actually working on are in progress bucket. The key point is to ensure a max number of projects in the in progress bucket - three.&lt;/p&gt;
&lt;p&gt;Once a project is done we add a new project from the on-hold bucket. If for example, writing a book is a project in the on-hold bucket, what you pull in the in-progress bucket is ‘write chapter 2’.&lt;/p&gt;
&lt;p&gt;When a new project request, we need to ingest it properly, by:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Acknowledging the requester&lt;/li&gt;
&lt;li&gt;Giving a time line&lt;/li&gt;
&lt;li&gt;Giving a list of open projects you have&lt;/li&gt;
&lt;li&gt;Any information you need from them&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The final step is to ensure proper cleanup of the on hold bucket on schedule.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>management</category><category>projectmanagement</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Obsess over quality</title><link>https://sajalchoudhary.net/evergreen/obsess-over-quality/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/obsess-over-quality/</guid><pubDate>Sun, 26 Oct 2025 20:50:47 GMT</pubDate><content:encoded>&lt;p&gt;Have pride in what you build. Give it time and the effort it deserves.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>work</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Do fewer things</title><link>https://sajalchoudhary.net/evergreen/do-fewer-things/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/do-fewer-things/</guid><pubDate>Sun, 26 Oct 2025 20:49:33 GMT</pubDate><content:encoded>&lt;p&gt;Limiting missions&lt;br /&gt;Limiting projects&lt;br /&gt;Limiting tasks on a daily basis - &lt;/p&gt;
&lt;h1&gt;How?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;By time blocking or doing certain things at certain times&lt;/li&gt;
&lt;li&gt;By paying for services that save time and take admin work off your hands.&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>evergreen</category><category>work</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Pythonic coding conventions</title><link>https://sajalchoudhary.net/til/pythonic-coding-conventions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/pythonic-coding-conventions/</guid><pubDate>Tue, 21 Oct 2025 12:45:15 GMT</pubDate><content:encoded>&lt;p&gt;In PEP 8, from &lt;a href=&quot;/bookshelf/the-quick-python-book&quot;&gt;The quick python book&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Module/package names - short lower case, underscores only if needed&lt;/li&gt;
&lt;li&gt;Function names - all lowercase, underscores for readability &lt;/li&gt;
&lt;li&gt;Variable names - all lowercase, underscores for readability &lt;/li&gt;
&lt;li&gt;Class names - capitalise each word&lt;/li&gt;
&lt;li&gt;Constant names - all caps with underscores&lt;/li&gt;
&lt;li&gt;Indentation - 4 spaces, no tabs&lt;/li&gt;
&lt;li&gt;Comparisons - don’t compare explicitly to true or false&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Learning python</title><link>https://sajalchoudhary.net/now/learning-python/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/learning-python/</guid><pubDate>Tue, 21 Oct 2025 08:53:27 GMT</pubDate><content:encoded>&lt;p&gt;2026-03-31:&lt;br /&gt;Using the &lt;a href=&quot;https://tcsglobal.udemy.com/course/python-devops/&quot;&gt;Python for DevOps: Mastering Real-World Automation&lt;/a&gt; course now. Re-doing the same exercises (create a variable, etc.) feels weird without the context. This course provides important context on how these things matter in a Devops contxt. &lt;/p&gt;
&lt;h2&gt;Progress - Course 291 modules&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Started on 2026-03-24.&lt;/li&gt;
&lt;li&gt;Current progress as of 2026-03-31 - 80/291 completed&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;More like re-learning python.&lt;/p&gt;
&lt;p&gt;The first time around I had used the book &lt;a href=&quot;https://learnpythonthehardway.org/book/preface.html&quot;&gt;Learn Python the hard way&lt;/a&gt;. It was great, I had created a Pokémon type game and learnt it. &lt;/p&gt;
&lt;p&gt;I did not really have a chance to use Python at work outside of a few scripts, so those skills atrophied.&lt;/p&gt;
&lt;p&gt;Now I’m relearning Python and additionally pick up some data analysis skills. &lt;/p&gt;
&lt;h2&gt;Resources - Intro level&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://programming-25.mooc.fi&quot;&gt;Helsinki University Intro to Programming MOOC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;[[202509281354 The quick python book]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Progress - MooC&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Completed Part1 on 29th October.&lt;/li&gt;
&lt;li&gt;Completed Part2 on 5th November.&lt;/li&gt;
&lt;li&gt;Completed Part3 from the Mooc on 19th November.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to automate something</title><link>https://sajalchoudhary.net/evergreen/how-to-automate-something/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-automate-something/</guid><pubDate>Thu, 16 Oct 2025 10:31:07 GMT</pubDate><content:encoded>&lt;p&gt;After you’ve figured out &lt;a href=&quot;/evergreen/what-to-automate&quot;&gt;what to automate&lt;/a&gt;, follow these steps -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure you know how to do the thing manually. &lt;/li&gt;
&lt;li&gt;Document the steps needed for the same&lt;/li&gt;
&lt;li&gt;Make sure you can automate each step&lt;/li&gt;
&lt;li&gt;Bring it together - add one step after the next and test after each addition, incrementally.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;From &lt;a href=&quot;/bookshelf/time-management-for-system-administrators&quot;&gt;Time management for system administrators&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>automation</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>What to automate</title><link>https://sajalchoudhary.net/evergreen/what-to-automate/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/what-to-automate/</guid><pubDate>Thu, 16 Oct 2025 10:26:58 GMT</pubDate><content:encoded>&lt;p&gt;There are four types of things that we can automate -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Simple things done once&lt;/li&gt;
&lt;li&gt;Hard things done once&lt;/li&gt;
&lt;li&gt;Simple things done often&lt;/li&gt;
&lt;li&gt;Hard things done often&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It is better to try to automate &lt;strong&gt;simple things done often&lt;/strong&gt; and &lt;strong&gt;hard things done once&lt;/strong&gt;. We should consider buying tools for &lt;strong&gt;hard things done often&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;From &lt;a href=&quot;/bookshelf/time-management-for-system-administrators&quot;&gt;Time management for system administrators&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>work</category><category>automation</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>A little inefficiency is good</title><link>https://sajalchoudhary.net/evergreen/a-little-inefficiency-is-good/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/a-little-inefficiency-is-good/</guid><pubDate>Thu, 16 Oct 2025 07:17:00 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/same-as-ever&quot;&gt;Same as Ever&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Like in nature, species are not perfect. There are some imperfections. &lt;/p&gt;
&lt;p&gt;Small inefficiencies in the work we do are similarly required - especially in knowledge work. We need time to think, to work the problem but seldom get the time to do so. Our days are filled with things - meetings, calls, disruptions. &lt;/p&gt;
&lt;p&gt;The 9 to 5 is great if the work is formulaic and repetitive. But it does not work if you have to think.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>work</category><category>thinking</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Progress takes time while destruction is instantaneous</title><link>https://sajalchoudhary.net/evergreen/progress-takes-time-while-destruction-is-instantaneous/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/progress-takes-time-while-destruction-is-instantaneous/</guid><pubDate>Thu, 16 Oct 2025 07:16:45 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/same-as-ever&quot;&gt;Same as ever&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Good things take time, they compound and that is difficult to point at and understand. Bad things on the other hand are things that did happen - a market crash, for example.&lt;/p&gt;
&lt;p&gt;Creating a good reputation may take twenty years while losing it takes just five minutes.&lt;/p&gt;
&lt;p&gt;Construction need engineers and planning while demolition needs someone with a sledgehammer.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>progress</category><category>psychology</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Be a rational optimist</title><link>https://sajalchoudhary.net/evergreen/be-a-rational-optimist/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/be-a-rational-optimist/</guid><pubDate>Thu, 16 Oct 2025 07:16:34 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;/bookshelf/same-as-ever&quot;&gt;Same as Ever&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A rational optimist is someone who knows that in the short term things will go bad, but over a longer time, things work out.&lt;/p&gt;
&lt;p&gt;Being a pessimist or optimist all the times is not optimal. Because life does not work like that.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>optimism</category><category>psychology</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to avoid wasting time</title><link>https://sajalchoudhary.net/evergreen/how-to-avoid-wasting-time/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-avoid-wasting-time/</guid><pubDate>Wed, 15 Oct 2025 10:36:55 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Set a timer for the thing that you want to do - for me playing a game &lt;/li&gt;
&lt;li&gt;Once the timer rings, stop doing the thing&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have found myself getting lost while playing a game in my playstation. It takes my partner calling me out and telling me to get off my ass, that I think about shutting it off. &lt;/p&gt;
&lt;p&gt;Gaming is not bad. It’s entertaining. There should be a limit though.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>howto</category><category>gaming</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to decide what to watch or read</title><link>https://sajalchoudhary.net/evergreen/how-to-decide-what-to-watch-or-read/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-decide-what-to-watch-or-read/</guid><pubDate>Wed, 15 Oct 2025 10:32:58 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Keep a list &lt;/li&gt;
&lt;li&gt;When it comes to pick what to read/watch next just pick the next item in the list&lt;/li&gt;
&lt;li&gt;Delete that item from the list&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>reading</category><category>tv</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to handle stress at work</title><link>https://sajalchoudhary.net/evergreen/how-to-handle-stress-at-work/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-handle-stress-at-work/</guid><pubDate>Tue, 14 Oct 2025 12:50:39 GMT</pubDate><content:encoded>&lt;p&gt;These are the things that work for me. They may or may not work for you.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If feeling overwhelmed with work, add stuff to the planner, see what can be done now, prioritise. Talk to your boss for prioritisation. &lt;/li&gt;
&lt;li&gt;The rubber duck hypothesis- if stuck talk to anyone, sometimes just the act of explaining unlocks a problem.&lt;/li&gt;
&lt;li&gt;Take vacations - not let me do some chores vacations- actual vacations&lt;/li&gt;
&lt;li&gt;Walk. Do yoga. Meditate.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>work</category><category>stress</category><category>yoga</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Risk is what you can’t see coming</title><link>https://sajalchoudhary.net/evergreen/risk-is-what-you-cant-see-coming/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/risk-is-what-you-cant-see-coming/</guid><pubDate>Tue, 14 Oct 2025 12:50:25 GMT</pubDate><content:encoded>&lt;p&gt;Like Covid, or any of the great depressions. Sure in hindsight it seems obvious, but for people living the happening, it’s anything but.&lt;/p&gt;
&lt;p&gt;There are two things to do then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Plan for risk without prediction. You will not when it comes but you must plan anyway.&lt;/li&gt;
&lt;li&gt;Always plan more than what might seem ok - like in personal finance it should feel like you have saved up more than needed for the emergency fund.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>risk</category><category>planning</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Happiness relies on expectation</title><link>https://sajalchoudhary.net/evergreen/happiness-relies-on-expectation/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/happiness-relies-on-expectation/</guid><pubDate>Tue, 14 Oct 2025 12:47:26 GMT</pubDate><content:encoded>&lt;p&gt;By almost every metric, we are better off than we were in an earlier age, still we earn for the golden period we had earlier (supposedly).&lt;/p&gt;
&lt;p&gt;The difference is expectation. The delta between expectation and our reality is what causes happiness or sorrow. We should have reasonable expectations and take whatever happens with stoicism.&lt;/p&gt;
&lt;p&gt;Expectation comes from looking at what others around us have. That may or may not be what we need or want.&lt;/p&gt;
&lt;p&gt;Also expectation is easier to manage than the outcomes.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>happiness</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to work with your boss</title><link>https://sajalchoudhary.net/evergreen/how-to-work-with-your-boss/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-work-with-your-boss/</guid><pubDate>Sun, 12 Oct 2025 18:15:01 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Make your boss’s life easier. Understand the priorities, if they ask for some information or task there may be a bigger ask they are trying to accomplish. &lt;ol&gt;
&lt;li&gt;If they ask you to do something go to them with solutions, or clearly ask for help.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Make sure your boss knows your career goals. Once a year have a chat. The preferred outcome is that they will tell you what you need to do.&lt;/li&gt;
&lt;li&gt;Upward delegate only when it makes sense. When you need your boss’s authority for example to deal with other business units etc.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>work</category><category>management</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>You can create a web scraper in chatGPT</title><link>https://sajalchoudhary.net/til/you-can-create-a-web-scraper-in-chatgpt/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/you-can-create-a-web-scraper-in-chatgpt/</guid><pubDate>Sat, 11 Oct 2025 05:57:03 GMT</pubDate><content:encoded>&lt;p&gt;For the last few days I would see an alert from ChatGPT saying that it has found some new data engineer jobs. I ignored it for most of last week. Today curiosity got the better of me and I opened the chat. &lt;a href=&quot;#&quot;&gt;Prerna&lt;/a&gt; had talked to ChatGPT about the job situation in Finland and for market research regarding data engineer jobs.&lt;/p&gt;
&lt;p&gt;I checked the chat and it turns out ChatGPT had told Prerna that it could create a web scraper, she had said yes, and it went ahead and created a web-scraper for her. &lt;/p&gt;
&lt;p&gt;Today I told it to create a web scraper for me, scheduled to run at 09:00 each day and report back with any new jobs. &lt;/p&gt;
&lt;p&gt;I will know in 5 mins what it finds.&lt;/p&gt;
</content:encoded><category>til</category><category>chatgpt</category><category>job-search</category><category>web-scraping</category><category>web</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Best practices for presenting things</title><link>https://sajalchoudhary.net/evergreen/best-practices-for-presenting-things/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/best-practices-for-presenting-things/</guid><pubDate>Thu, 09 Oct 2025 16:26:08 GMT</pubDate><content:encoded>&lt;p&gt;These are things that I have noticed in presentations given by others. Presentations that I have liked have these qualities.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Less text on the slide. Just pointers not descriptions. A person viewing should be able to skim quickly. This is not a SOP document.&lt;/li&gt;
&lt;li&gt;Have a demo. Demos are fun.&lt;/li&gt;
&lt;li&gt;If you include diagrams, it should be visible, i.e. the text should be visible.&lt;/li&gt;
&lt;li&gt;Consistent design language, don’t jump from one style to a different one. I prefer minimalist styles.&lt;/li&gt;
&lt;li&gt;Do not dive too deep technically - depends on the audience actually&lt;/li&gt;
&lt;li&gt;Pick a topic accordingly. A super technical presentation will be difficult to pull off. Generally speaking, it’s easier to do overview sort of talks.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>presentation</category><category>talks</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How and when do I read</title><link>https://sajalchoudhary.net/evergreen/how-and-when-do-i-read/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-and-when-do-i-read/</guid><pubDate>Mon, 06 Oct 2025 18:49:17 GMT</pubDate><content:encoded>&lt;p&gt;At present, I am mostly consuming audio books now. I listen to them whenever I can, but mostly -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;While commuting (a 40 min commute at present)&lt;/li&gt;
&lt;li&gt;While walking&lt;/li&gt;
&lt;li&gt;While out for groceries, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I love physical books - hardcover and paperback. I used to borrow from my local library and read during my commute which was via the Metro. I miss that.&lt;/p&gt;
&lt;p&gt;Inspired by this article on &lt;a href=&quot;https://www.thecut.com/article/how-to-find-time-to-read-books.html&quot;&gt;the reading habits of some well-read people&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>reading</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to change how a link looks like in Obsidian</title><link>https://sajalchoudhary.net/til/how-to-change-how-a-link-looks-like-in-obsidian/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-change-how-a-link-looks-like-in-obsidian/</guid><pubDate>Thu, 18 Sep 2025 11:07:50 GMT</pubDate><content:encoded>&lt;p&gt;In order to link to an internal link, what I used to do was use the aliases property. &lt;/p&gt;
&lt;p&gt;I append the timestamp to each note title (available as the core plugin - unique note creator). But that plugin does not allow you to insert a template to it.&lt;/p&gt;
&lt;p&gt;Most of my notes are created on mobile, using Apple shortcuts to fill out the basic template metadata.&lt;/p&gt;
&lt;p&gt;I would add an alias to all the notes I created, which in most cases was the title. But in order to reference that note elsewhere in a different note, I would add a different alias each time.&lt;/p&gt;
&lt;p&gt;This was not ideal.&lt;/p&gt;
&lt;p&gt;TIL that I could just provide whatever I want as the display text and it works. The format is this -&lt;br /&gt;&lt;code&gt;[ display text](#)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Works great!&lt;/p&gt;
</content:encoded><category>til</category><category>obsidian</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ergonomics for sitting at a desk</title><link>https://sajalchoudhary.net/evergreen/ergonomics-for-sitting-at-a-desk/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/ergonomics-for-sitting-at-a-desk/</guid><pubDate>Thu, 11 Sep 2025 08:57:25 GMT</pubDate><content:encoded>&lt;p&gt;From &lt;a href=&quot;https://youtu.be/F8_ME4VwTiw?si=kwIBEgnzG8h_hn_L&quot;&gt;this YouTube video&lt;/a&gt; and many other articles I’ve read elsewhere.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adjust chair or table so that elbows and arms are at 90 degrees to your desk&lt;/li&gt;
&lt;li&gt;Monitor at arms length, top of the monitor should be at eye level&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>ergonomic</category><category>sitting</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Curation matters</title><link>https://sajalchoudhary.net/evergreen/curation-matters/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/curation-matters/</guid><pubDate>Wed, 10 Sep 2025 07:45:20 GMT</pubDate><content:encoded>&lt;p&gt;Or, curation can have long term consequences.&lt;/p&gt;
&lt;p&gt;I read about this first in Yuval Noah Harrari’s &lt;a href=&quot;/bookshelf/nexus&quot;&gt;Nexus: A Brief History of Information Networks from the Stone Age to AI&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The Bible is not one book, but rather a collection of different texts that were canonised over many years.&lt;/p&gt;
&lt;p&gt;A committee did this task. The things they decided to add - like how women are somehow inferior and have little rights compared to men - took a lot of time to roll back and fight against in the modern world.&lt;/p&gt;
&lt;p&gt;Curation is important. I am thinking about this of course in terms of what I write here. I wrote earlier about &lt;a href=&quot;#&quot;&gt;writing more&lt;/a&gt; and &lt;a href=&quot;#&quot;&gt;the things I write on my blog&lt;/a&gt;. I keep going back to the value that micro posts bring, if any. &lt;/p&gt;
&lt;p&gt;I know I don’t need to justify what I write about.&lt;/p&gt;
&lt;p&gt;Curation is important though. Especially in this age. And even more so going forward. There is a list of blogs, newsletters and news sites I follow via RSS. What I share after reading things there is my curation. &lt;/p&gt;
&lt;p&gt;You may decide to follow me based on that, because you value my taste and curation.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>curstion</category><category>information-systems</category><category>information</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to set time zone on windows using PowerShell</title><link>https://sajalchoudhary.net/til/how-to-set-time-zone-on-windows-using-powershell/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-set-time-zone-on-windows-using-powershell/</guid><pubDate>Mon, 08 Sep 2025 17:52:04 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# To set time zone
Set-TimeZone -Id &apos;FLE Standard Time&apos;

# To get IDs
Get-TimeZone -ListAvailable

# To get current timezone
Get-TimeZone
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to configure entra connect sync filtering</title><link>https://sajalchoudhary.net/til/how-to-configure-entra-connect-sync-filtering/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-configure-entra-connect-sync-filtering/</guid><pubDate>Mon, 08 Sep 2025 17:51:55 GMT</pubDate><content:encoded>&lt;p&gt;[MSFT has good documentation around this.](&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sync-configure-filtering&quot;&gt;Microsoft Entra Connect Sync: Configure filtering - Microsoft Entra ID | Microsoft Learn&lt;/a&gt;) &lt;/p&gt;
&lt;p&gt;There are a few filtering options available:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Group-based&lt;/li&gt;
&lt;li&gt;Domain-based&lt;/li&gt;
&lt;li&gt;OU-based&lt;/li&gt;
&lt;li&gt;Attribute-based&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Our requirement is to not sync some objects having a certain extension attribute. The difference is the cloudFiltered attribute which should be True if you want to filter these objects.&lt;/p&gt;
&lt;p&gt;Here are the steps to follow for adding &lt;strong&gt;attribute based inbound filtering&lt;/strong&gt;:&lt;/p&gt;
&lt;h1&gt;Pre-tasks&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Disable the synchronization scheduler.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Import-Module ADSync
Set-ADSyncScheduler -SyncCycleEnabled $False
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Enable staging mode.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Activity&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Start Synchronization Rules Editor. Make sure inbound is selected and click add new rule.&lt;/li&gt;
&lt;li&gt;In description, &lt;ol&gt;
&lt;li&gt;Add rule name and description. &lt;/li&gt;
&lt;li&gt;In CS object type, select whatever is required - for example, user.&lt;/li&gt;
&lt;li&gt;In MV object type, select relevant item - for example, person for user.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Link Type&lt;/strong&gt;, select &lt;strong&gt;Join&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Precedence&lt;/strong&gt;, type a value that isn&apos;t currently used by another synchronization rule&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;In scoping filter,&lt;ol&gt;
&lt;li&gt;click add group and click Add Clause.&lt;/li&gt;
&lt;li&gt;Under Attribute, select the appropriate value, example extensionAttribute1&lt;/li&gt;
&lt;li&gt;Under operator, select  the appropriate value, example startswith&lt;/li&gt;
&lt;li&gt;Under value specify the value, for example A&lt;/li&gt;
&lt;li&gt;Click Next&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Leave Join rules empty&lt;/li&gt;
&lt;li&gt;Under Transformations&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Add Transformation&lt;/strong&gt;, &lt;/li&gt;
&lt;li&gt;select the &lt;strong&gt;FlowType&lt;/strong&gt; as &lt;strong&gt;Constant&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;select &lt;strong&gt;cloudFiltered&lt;/strong&gt; as the &lt;strong&gt;Target Attribute&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Source&lt;/strong&gt; text box, type &lt;strong&gt;True&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add&lt;/strong&gt; to save the rule.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Apply and verification&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Do full sync.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Start-ADSyncSyncCycle -PolicyType Initial
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;After the synchronization, all changes are staged to be exported. Before you actually make the changes in Microsoft Entra ID, you want to verify that all these changes are correct.&lt;/li&gt;
&lt;li&gt;Start a command prompt, and go to &lt;code&gt;C:\Program Files\Microsoft Azure AD Sync\bin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run the following&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;csexport &quot;Name of Connector&quot; C:\Temp\export.xml /f:x
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Run the following&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;CSExportAnalyzer &apos;C:\Temp\export.xml&apos; &amp;gt; &apos;C:\Temp\export.csv&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;The csv contains the changes to be exported.&lt;/li&gt;
&lt;li&gt;Verify and proceed if happy with the changes it will make.&lt;/li&gt;
&lt;li&gt;Remove staging mode.&lt;/li&gt;
&lt;li&gt;Re-enable the sync scheduler&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Set-ADSyncScheduler -SyncCycleEnabled $True
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Enable or install windows defender on Windows server</title><link>https://sajalchoudhary.net/til/enable-or-install-windows-defender-on-windows-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/enable-or-install-windows-defender-on-windows-server/</guid><pubDate>Mon, 08 Sep 2025 17:51:25 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Get feature status and find Windows-Defender
Get-WindowsFeature

# Intall using
Install-WindowsFeature -Name &apos;Windows-Defender&apos;
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>windows</category><category>defender</category><category>av</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Write more</title><link>https://sajalchoudhary.net/evergreen/write-more/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/write-more/</guid><pubDate>Sat, 06 Sep 2025 06:56:40 GMT</pubDate><content:encoded>&lt;p&gt;Should I write more or less has been a constant tension that I have felt over time. Should I write and publish essays like Craig Mod, polished things, which exist on their own. Or should I write more, publishing links as I go along, little thoughts, things I’ve learned and so on. Not super polished, but living documents, which I can edit over time.&lt;/p&gt;
&lt;p&gt;Over the course of redesigning the website and ensuring I have a place to do both, I have found myself writing more and more. I used to think what’s the point of a link blog, sure someone else reading it might get some benefit out of it. But what benefit do I get from writing those? &lt;/p&gt;
&lt;p&gt;I think two-&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As a personal bookmark for things and ideas that I could refer to later&lt;/li&gt;
&lt;li&gt;It just contributes to the volume&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And this second point is what I have realised recently. Yesterday while walking, in fact.&lt;/p&gt;
&lt;p&gt;The more I write, the more I practice this muscle that I have, the easier it gets. I am writing more in the daily note - a journal, more micro posts, more evergreen notes, and so on. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The more I write - the more I write. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Always, write more.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>writing</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Humans and algorithms think differently when coming to a decision</title><link>https://sajalchoudhary.net/evergreen/humans-and-algorithms-think-differently-when-coming-to-a-decision/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/humans-and-algorithms-think-differently-when-coming-to-a-decision/</guid><pubDate>Mon, 01 Sep 2025 07:25:34 GMT</pubDate><content:encoded>&lt;p&gt;Humans take one or two factors into consideration when deciding on something. These factors may be reached by further subconscious factors.&lt;/p&gt;
&lt;p&gt;While algorithms refer to a multitude of factors. When asked to explain it’s decision an algorithm may point to pages upon pages of reasons why it took a decision.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>algorithm</category><category>ai</category><category>thinking</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Algorithms affect what we post on the socials</title><link>https://sajalchoudhary.net/evergreen/algorithms-affect-what-we-post-on-the-socials/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/algorithms-affect-what-we-post-on-the-socials/</guid><pubDate>Mon, 01 Sep 2025 07:25:15 GMT</pubDate><content:encoded>&lt;p&gt;In order to maximise engagement, algorithms figured out that incendiary things drive more engagement, so they promoted that content.&lt;/p&gt;
&lt;p&gt;Once people figured out that that is the stuff more likely to be viral or popular they started making that stuff.&lt;/p&gt;
&lt;p&gt;This is also noticed in how YouTubers have to change how they make things - the image for the video for example, based on whatever the YouTube algorithm wants.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>algorithm</category><category>ai</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>When someone has been dead for a while</title><link>https://sajalchoudhary.net/evergreen/when-someone-has-been-dead-for-a-while/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/when-someone-has-been-dead-for-a-while/</guid><pubDate>Sat, 30 Aug 2025 08:50:28 GMT</pubDate><content:encoded>&lt;p&gt;When someone has been dead for a while, you don’t remember how they look. Their image, in your mind becomes muddied. The image is not that sharp. It feels like you are looking at them through a muddied window or without eyeglasses. &lt;/p&gt;
&lt;p&gt;It happens gradually of course. Perhaps because there’s peace in that, peace and a respite from suffering.&lt;/p&gt;
&lt;p&gt;In your mind’s eye, this new image, this muddied not-so-sharp image is the correct image. It’s how they looked.&lt;/p&gt;
&lt;p&gt;Recently, I got a picture of my mother, cropped, sharpened so I could put it on a wall in my home. The first time I saw that picture, I thought this is not right. This is too sharp. This is artificial. But I just did not remember her face that well.&lt;/p&gt;
&lt;p&gt;It had felt that way since the day I had put up her picture on the wall. Something felt wrong all these months.&lt;/p&gt;
&lt;p&gt;Today, as I saw her smiling face, I felt recognition. I saw her, and remembered her. I felt glad to have spent the extra money on this picture to get it sharpened.&lt;/p&gt;
&lt;p&gt;Someone somewhere had said this once -&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dead people die twice. Once when they die. And the other time when people stop talking about them.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>evergreen</category><category>personal</category><category>death</category><category>memory</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The things I write on my blog</title><link>https://sajalchoudhary.net/evergreen/the-things-i-write-on-my-blog/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/the-things-i-write-on-my-blog/</guid><pubDate>Sat, 30 Aug 2025 08:47:22 GMT</pubDate><content:encoded>&lt;p&gt;The first step is to figure out the things I write and a brief description of those things. Then, we can move onto how those could be organised.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Links with a little occasional commentary from my end&lt;/li&gt;
&lt;li&gt;Notes on something I came across - written in my words with links/quotes where needed&lt;/li&gt;
&lt;li&gt;Notes on books I’ve read&lt;/li&gt;
&lt;li&gt;Weekly newsletter - nordletter&lt;/li&gt;
&lt;li&gt;TILs - notes on things I’ve learned&lt;/li&gt;
&lt;li&gt;Short stories&lt;/li&gt;
&lt;li&gt;Poems&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>writing</category><category>scdotnet</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Why journal</title><link>https://sajalchoudhary.net/evergreen/why-journal/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/why-journal/</guid><pubDate>Sat, 30 Aug 2025 08:42:24 GMT</pubDate><content:encoded>&lt;p&gt;I was not into journaling for a long time. Maybe I would write something if I was feeling particularly sad, or happy, if I had achieved something that I would want to remember. But I wasn’t consistent with it. While reading &lt;a href=&quot;https://sive.rs/dj&quot;&gt;Derek Sivers’ talk about their daily journaling practice&lt;/a&gt;, I felt I needed to be consistent with it. Consistency was the point.&lt;/p&gt;
&lt;p&gt;Today, I read &lt;a href=&quot;https://www.theverge.com/analysis/764519/ai-gemini-pixel-journal-app&quot;&gt;Victoria Song talk about journaling&lt;/a&gt;, especially this part:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Some days, it’s abundantly obvious what you should write about. A great tragedy, a joyous occasion, an event you’ve been looking forward to — anything that sparks a strong emotion is an obvious prompt. But most days pass without much happening at all, forcing you to sift through mundane minutiae to find anything worth recording. That’s the point. Honing your discernment, exercising your brain, wracking your vocabulary to find the right phrase to express your inner world. These are not things that are supposed to be easy.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I felt motivated to write about my own reasons. Here they are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As future notes to myself, as random things I might read back on. As things my future self might reference.&lt;/li&gt;
&lt;li&gt;As a kind of therapy, a signal to wind down after a long day.&lt;/li&gt;
&lt;li&gt;So that one day, if Savya wants to, he could train an AI on these notes and ask the AI, if Dad were here, what would he think, or say.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Principles&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Do daily journaling, preferably at the end of the day.&lt;ul&gt;
&lt;li&gt;If it’s not possible to do it at the end of the day, do it early next morning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Write anything&lt;ul&gt;
&lt;li&gt;What I did&lt;/li&gt;
&lt;li&gt;What happened and how it made me feel&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content:encoded><category>evergreen</category><category>journaling</category><category>writing</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The keyboard shortcuts I use in Obsidian</title><link>https://sajalchoudhary.net/evergreen/the-keyboard-shortcuts-i-use-in-obsidian/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/the-keyboard-shortcuts-i-use-in-obsidian/</guid><pubDate>Sat, 30 Aug 2025 08:42:13 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Open daily note - &lt;code&gt;Cmd+D&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create unique note - &lt;code&gt;Cmd+Shift+Z&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Show file explorer - &lt;code&gt;Cmd+Shift+E&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Insert current date - &lt;code&gt;Cmd+Shift+D&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Close current tab/note - &lt;code&gt;Cmd+Shift+X&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Move note to different folder - &lt;code&gt;Cmd+M&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>obsidian</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Configure mobile quick action on Obsidian</title><link>https://sajalchoudhary.net/til/configure-mobile-quick-action-on-obsidian/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/configure-mobile-quick-action-on-obsidian/</guid><pubDate>Fri, 29 Aug 2025 10:37:58 GMT</pubDate><content:encoded>&lt;p&gt;I have two shortcuts I use to publish micro blog to my website -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Linkblog - which takes a selection from a url and pastes that url and add the selection as a quote, and,&lt;/li&gt;
&lt;li&gt;Publish to Astro - Which moves the note to a folder from where I can run git sync&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Publish to Astro shortcut is available from the share button. To do this was a multi step process:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click the three dot button&lt;/li&gt;
&lt;li&gt;Scroll down&lt;/li&gt;
&lt;li&gt;Click share&lt;/li&gt;
&lt;li&gt;Then select the Publish to Astro shortcut&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Today I update the mobile quick action (pull down in the ios app) to share.&lt;br /&gt;This removes steps 1-3 from the workflow above and makes it simpler to run the publish to Astro shortcut.&lt;/p&gt;
&lt;p&gt;To configure:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to settings &amp;gt; Toolbar &amp;gt; Configure mobile quick action&lt;/li&gt;
&lt;li&gt;Click configure and set it as share.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This can be set to other options also previously I had set it to open the search bar, but that is available by default in the app, so it’s not needed anymore!&lt;/p&gt;
</content:encoded><category>til</category><category>obsidian</category><category>productivity</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Majority of the organisations are not seeing any monetary benefits from deploying AI</title><link>https://sajalchoudhary.net/evergreen/majority-of-the-organisations-are-not-seeing-any-monetary-benefits-from-deploying-ai/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/majority-of-the-organisations-are-not-seeing-any-monetary-benefits-from-deploying-ai/</guid><pubDate>Fri, 22 Aug 2025 05:05:43 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://slashdot.org/story/25/08/21/1919258/bank-forced-to-rehire-workers-after-lying-about-chatbot-productivity-union-says?utm_source=rss1.0mainlinkanon&amp;amp;utm_medium=feed&quot;&gt;Bank Forced To Rehire Workers After Lying About Chatbot Productivity, Union Says - Slashdot&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As banks around the world prepare to replace many thousands of workers with AI, Australia&apos;s biggest bank is scrambling to rehire 45 workers after allegedly lying about chatbots besting staff by handling higher call volumes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This aligns with a previous study out of MIT with similar findings.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The GenAI Divide: State of AI in Business 2025&lt;/em&gt;, &lt;a href=&quot;https://docs.google.com/forms/d/e/1FAIpQLSc8rU8OpQWU44gYDeZyINUZjBFwu--1uTbxixK_PRSVrfaH8Q/viewform&quot;&gt;a new report&lt;/a&gt; published by MIT’s &lt;a href=&quot;https://nanda.media.mit.edu/&quot;&gt;NANDA&lt;/a&gt; initiative, reveals that while generative AI holds promise for enterprises, most initiatives to drive rapid revenue growth are falling flat.&lt;/p&gt;
&lt;p&gt;Despite the rush to integrate powerful new models, about 5% of AI pilot programs achieve rapid revenue acceleration; the vast majority stall, delivering little to no measurable impact on P&amp;amp;L. The research—based on 150 interviews with leaders, a survey of 350 employees, and an analysis of 300 public AI deployments—paints a clear divide between success stories and stalled projects.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>evergreen</category><category>ai</category><category>work</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Analogical thinking</title><link>https://sajalchoudhary.net/evergreen/analogical-thinking/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/analogical-thinking/</guid><pubDate>Wed, 20 Aug 2025 19:17:51 GMT</pubDate><content:encoded>&lt;p&gt;Read about this first in &lt;a href=&quot;#&quot;&gt;Range&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Analogical thinking allows us to use existing things to explain new things.&lt;/p&gt;
&lt;p&gt;The more analogies we use to explain something, the better. The more diverse places these analogies are from, the more likelier we are to find a solution.&lt;/p&gt;
&lt;p&gt;It is better to look at deeper relations between things than surface level things like category, or domain. &lt;/p&gt;
&lt;p&gt;As an example - sweating and fed are both examples of negative feedback loops. If we sweat more, we don&apos;t need to sweat that much. The fed controls monetary policy to increase or decrease spending, if spending increases, then it does the opposite.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>learning</category><category>thinking</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to learn effectively</title><link>https://sajalchoudhary.net/evergreen/how-to-learn-effectively/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/how-to-learn-effectively/</guid><pubDate>Wed, 20 Aug 2025 19:13:19 GMT</pubDate><content:encoded>&lt;p&gt;Read about this in &lt;a href=&quot;#&quot;&gt;Range&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Humans are very good at doing the least amount of work to produce a solution. So, in class or while learning, we end up figuring out the rules to get to the solution. If these rules are not what the teacher wants us to learn, then the learning is ineffective.&lt;/p&gt;
&lt;p&gt;Getting hints while working on a problem improves short term performance but harms long term learning.&lt;/p&gt;
&lt;p&gt;There are three science based methods that one could use to help with long term learning - spacing, testing and making connections problems.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Making connections problems&lt;/li&gt;
&lt;li&gt;Spaced repetition - Waiting between practice sessions of the same thing&lt;/li&gt;
&lt;li&gt;Testing effect/Retrieval practice/Generation effect - When you are forced to recall something, it helps with further learning, even if you recall it wrong. The act of trying to recall strengthens your memory of that event.&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>evergreen</category><category>learning</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to check windows upgrade errors</title><link>https://sajalchoudhary.net/til/how-to-check-windows-upgrade-errors/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-check-windows-upgrade-errors/</guid><pubDate>Tue, 12 Aug 2025 14:11:23 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows/deployment/upgrade/log-files#analyze-log-files&quot;&gt;Windows update log files&lt;/a&gt;are present under &lt;code&gt;$Windows.~BT\Sources\Panther&lt;/code&gt;. There are two files &lt;code&gt;setupact.log&lt;/code&gt; and &lt;code&gt;setuperr.log&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Additionally, during upgrade &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/deployment/upgrade/setupdiag&quot;&gt;setupdiag&lt;/a&gt; automatically creates logs under &lt;code&gt;%windir%\logs\SetupDiag\SetupDiagResults.xml&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This above file will be useful as it has the appropriate message.&lt;/p&gt;
&lt;p&gt;Check at what stage the error occurred, and what is the error code, which can be checked against &lt;a href=&quot;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d&quot;&gt;Win32_Error codes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;0x00000070 - ERROR_DISK_FULL
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>windows</category><category>upgade</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ESX update fails with error 15</title><link>https://sajalchoudhary.net/til/esx-update-fails-with-error-15/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/esx-update-fails-with-error-15/</guid><pubDate>Tue, 12 Aug 2025 09:59:30 GMT</pubDate><content:encoded>&lt;p&gt;Check in &lt;code&gt;/var/run/log/esxupdate.log&lt;/code&gt; file, better to run the following and let it write the logs to a temporary file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tail -f /var/log/esxupdate.log &amp;gt; /tmp/esxupdate.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It will have error like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; cat /tmp/esxupdate.log | grep -i &apos;error&apos;  
2025-08-12T09:44:57Z Er(11) esxupdate[2109082]: An esxupdate error exception was caught:  
2025-08-12T09:44:57Z Er(11) esxupdate[2109082]: esxutils.EsxcliError: Errors:  
2025-08-12T09:44:57Z Er(11) esxupdate[2109082]: Error getting data for filesystem on &apos;/vmfs/volumes/67c5a845-d967bb36-da89-0025b502014f&apos;: Cannot open volume: /vmfs/volumes/67c5a845-d967bb36-da89-0025b502014f, skipping.  
2025-08-12T09:44:57Z Er(11) esxupdate[2109082]: esximage.Errors.InstallationError: Failed to query file system stats: Errors:  
2025-08-12T09:44:57Z Er(11) esxupdate[2109082]: Error getting data for filesystem on &apos;/vmfs/volumes/67c5a845-d967bb36-da89-0025b502014f&apos;: Cannot open volume: /vmfs/volumes/67c5a845-d967bb36-da89-0025b502014f, skipping.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fix is to remap the LUN. The issue is that the LUN may be in use.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/370834/patching-an-esxi-host-fails-with-error-e.html&quot;&gt;Patching an ESXi host fails with error &quot;esxupdate returned with exit status: 15&quot;&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>esxi</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>List vmfs volumes along with naa id</title><link>https://sajalchoudhary.net/til/list-vmfs-volumes-along-with-naa-id/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/list-vmfs-volumes-along-with-naa-id/</guid><pubDate>Tue, 12 Aug 2025 09:57:30 GMT</pubDate><content:encoded>&lt;p&gt;This commands lists naa id, vmfs id and datastore name. We can grep to search for a particular vmfs volume.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage vmfs extent list
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><category>esxi</category><category>esxcli</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to show password passed using secure password</title><link>https://sajalchoudhary.net/til/how-to-show-password-passed-using-secure-password/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-show-password-passed-using-secure-password/</guid><pubDate>Fri, 08 Aug 2025 11:53:48 GMT</pubDate><content:encoded>&lt;p&gt;Mostly for troubleshooting&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# if $ADCreds is the created password credential variable

$ADCreds.GetNetworkCredential().password
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Asking Claude to create a calendar entry from a screenshot</title><link>https://sajalchoudhary.net/til/asking-claude-to-create-a-calendar-entry-from-a-screenshot/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/asking-claude-to-create-a-calendar-entry-from-a-screenshot/</guid><pubDate>Mon, 04 Aug 2025 09:53:07 GMT</pubDate><content:encoded>&lt;p&gt;I wrote about &lt;a href=&quot;/micro/new-updates-to-claude&quot;&gt;new updates to claude&lt;/a&gt; recently, in which there was a mention of using Claude to create calendar entries.&lt;/p&gt;
&lt;p&gt;I tried that today. &lt;/p&gt;
&lt;p&gt;I went to ManUtd app. Yes, I’m a &lt;a href=&quot;https://en.wikipedia.org/wiki/Manchester_United_F.C.&quot;&gt;United&lt;/a&gt; fan.&lt;/p&gt;
&lt;p&gt;I took a screenshot of the upcoming games and asked it to convert it to calendar entries.&lt;/p&gt;
&lt;p&gt;Worked like a charm!&lt;/p&gt;
&lt;p&gt;It created three entries for the upcoming games in August. Ideally the ManUtd app should give an option to add the entire schedule to your calendar but then they would remove one option for people to open the app. So, they don’t.&lt;/p&gt;
&lt;p&gt;Anyway.&lt;/p&gt;
</content:encoded><category>til</category><category>ai</category><category>claude</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Forcefully uninstall software from windows</title><link>https://sajalchoudhary.net/til/forcefully-uninstall-software-from-windows/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/forcefully-uninstall-software-from-windows/</guid><pubDate>Tue, 29 Jul 2025 18:40:19 GMT</pubDate><content:encoded>&lt;p&gt;Download tool and run.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d&quot;&gt;Fix problems that block programs from being installed or removed - Microsoft Support&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Update esxi with required version of vmware tools</title><link>https://sajalchoudhary.net/til/update-esxi-with-required-version-of-vmware-tools/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/update-esxi-with-required-version-of-vmware-tools/</guid><pubDate>Mon, 28 Jul 2025 12:37:32 GMT</pubDate><content:encoded>&lt;p&gt;By default each esxi release come bundled with a specific vmware tools release. Automatic upgrade option for VMs checks against this version.&lt;/p&gt;
&lt;p&gt;To find VMware tools version on host:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;esxcli software component get | grep VMware-VM-Tools -B 1 -A 14
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Using baseline method&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Download the VMware tools VIB package.&lt;ol&gt;
&lt;li&gt;Go to VMWare console &amp;gt; Downloads &amp;gt; Log in to the Broadcom Support portal.&lt;/li&gt;
&lt;li&gt;On the left hand side menu, click My Downloads.&lt;/li&gt;
&lt;li&gt;In the search bar in the upper right side of the page enter &quot;VMware vSphere&quot;&lt;/li&gt;
&lt;li&gt;Choose VMware vSphere&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Products&lt;/strong&gt; tab, select VMware VSphere Enterprise and appropriate version.&lt;/li&gt;
&lt;li&gt;Click View Group on the right side of the VMware tools item. &lt;/li&gt;
&lt;li&gt;Use the drop-down in the upper-right to choose the desired version.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Upload VIB package to Lifecycle manager &lt;ol&gt;
&lt;li&gt;Click actions &amp;gt; Import updates&lt;/li&gt;
&lt;li&gt;Select vib zip file&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;After upload is completed, create a new baseline with both esxi host and vmware tools, or,&lt;ol&gt;
&lt;li&gt;Create different packages.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;This does not require reboot&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Other ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a common repository with whatever version you want to maintain&lt;ol&gt;
&lt;li&gt;This requires a common datastore to be accessible to all hosts, which might not be possible&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Using images in VMware Lifecycle management&lt;ol&gt;
&lt;li&gt;Needs all hosts to be the same hardware, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.vmware.com/cloud-foundation/2023/03/07/options-for-updating-vmware-tools-at-scale/#:~:text=Because%20VMware%20Tools%20are%20available,for%20silent%20installation%20as%20well.&quot;&gt;Options for Updating VMware Tools at Scale - VMware Cloud Foundation (VCF) Blog&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>esxi</category><category>vmware-tools</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell set atrributes for AD groups</title><link>https://sajalchoudhary.net/til/powershell-set-atrributes-for-ad-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-set-atrributes-for-ad-groups/</guid><pubDate>Tue, 22 Jul 2025 10:38:02 GMT</pubDate><content:encoded>&lt;p&gt;Use the &lt;code&gt;-Instance&lt;/code&gt; property with &lt;code&gt;set-aduser&lt;/code&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;em&gt;Instance&lt;/em&gt; parameter provides a way to update a group object by applying the changes made to a copy of the object. When you set the &lt;em&gt;Instance&lt;/em&gt; parameter to a copy of an Active Directory group object that has been modified, the &lt;strong&gt;Set-ADGroup&lt;/strong&gt; cmdlet makes the same changes to the original group object. To get a copy of the object to modify, use the &lt;strong&gt;Get-ADGroup&lt;/strong&gt; cmdlet. The &lt;em&gt;Identity&lt;/em&gt; parameter is not allowed when you use the &lt;em&gt;Instance&lt;/em&gt; parameter. For more information about the &lt;em&gt;Instance&lt;/em&gt; parameter, see the &lt;em&gt;Instance&lt;/em&gt; parameter description.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The issue occurs when trying to use -replace with a null value. It fails. In those cases just set the values to an AD object and use the &lt;code&gt;-instance&lt;/code&gt; parameter.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><category>groups</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Google AI leader</title><link>https://sajalchoudhary.net/now/google-ai-leader/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/google-ai-leader/</guid><pubDate>Mon, 21 Jul 2025 08:55:45 GMT</pubDate><content:encoded>&lt;p&gt;This is a certification quest for the summer. The certification being the Google Generative AI leader certification.&lt;/p&gt;
&lt;p&gt;The goal is to learn about GCP AI offerings and how they work in practice.&lt;/p&gt;
&lt;p&gt;I cleared this exam on August 21, 2025.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Mixed format books</title><link>https://sajalchoudhary.net/evergreen/mixed-format-books/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/mixed-format-books/</guid><pubDate>Wed, 16 Jul 2025 21:44:06 GMT</pubDate><content:encoded>&lt;p&gt;I have discovered audiobooks recently. Before this, of course I was not a big fan of audiobooks. I was unsure, I was a bit of a purist. I used to feel that if you want to read a book, you know, read a book. &lt;/p&gt;
&lt;p&gt;Of course I also used to be someone who wrote everything that they wrote on a keyboard. These days I am asking Wispr Flow what to type and it does that. &lt;/p&gt;
&lt;p&gt;Speech is natural and it is fast.&lt;/p&gt;
&lt;p&gt;The second thing is about time. &lt;/p&gt;
&lt;p&gt;I bought a car recently. And what that has meant is the time I used to have sitting in a metro reading a book is just not there anymore. So I can either listen to songs on my way to work (which is a 30-minute approximately drive one way) or listen to podcasts, or the third thing being listen to audiobooks. I have picked the last thing. &lt;/p&gt;
&lt;p&gt;Of course, another factor nudging me in that direction was molly White&apos;s YouTube video where she talked about how she was able to read so much. A secret? Audiobooks and reading 3-4 books at a time. &lt;/p&gt;
&lt;p&gt;This is something that I have realized as well. There are some books, mostly nonfiction, where you want to be reading it because, at least that&apos;s how I think, those books require you to concentrate more and reading a book allows you to concentrate more. What I&apos;ve found in my limited experience is that fictional books are better as audiobooks or books in which you are telling a story. Those could be like literary nonfiction as well. &lt;/p&gt;
&lt;p&gt;Because, with audiobooks, most of the time you are doing something while you are reading the book or listening to it.&lt;/p&gt;
&lt;p&gt;Here&apos;s the thing. I had this thought today while I was in the break area. It&apos;s where I usually have my phone out and I&apos;m reading through my RSS feed on Net News Wire.&lt;/p&gt;
&lt;p&gt;And I had this thought today, &quot;Wouldn&apos;t it be better if I could just continue reading the book I was listening to while I was driving?&quot; &lt;/p&gt;
&lt;p&gt;It&apos;s simple: the idea is that I should be able to pick up where I had left off, and if I want to, start reading the book. &lt;/p&gt;
&lt;p&gt;I don&apos;t think technically it is something that is out of reach for people. Of course, the quality of the voice doing the narration for an audiobook varies. It varies a lot. If you used a simple text-to-speech engine with Whisper and everything else they have gotten good enough, I feel. &lt;/p&gt;
&lt;p&gt;Yesterday, I wrote about a Notebook LM launching a new feature. I feel Notebook LM, as a product, has shown that text-to-speech products are good enough. Kindle could add this feature to their app, wherein you could just ask it to read your book. You don&apos;t need a separate Audible app for that. &lt;/p&gt;
&lt;p&gt;I think it&apos;s a simple enough idea and it&apos;s easily achievable. The problem, I think, is with the fact that the book companies won&apos;t license you the rights. It&apos;s about money at the end of the day. &lt;/p&gt;
&lt;p&gt;But I think in terms of experience, it&apos;s a better thing, a better product that you could consume your book how you want to. &lt;/p&gt;
&lt;p&gt;There are two excellent examples for this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A book I started reading today itself, which is available as a book on the web, as a PDF download, as Mobi, as a podcast, or as a single MP3 file. It&apos;s called &quot;Resilient Web Design&quot;. That is something that made me think about it. &lt;/li&gt;
&lt;li&gt;The second one that I can think of now was Derek Sivers and his idea that once you buy the book, you know just if you want to get a physical book, pay for the print and the other editions come with it. Same for if you just want the digital, you&apos;ll get the PDF, EPUB, whatever, all of those in one go.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The technology I think clearly exists to make it happen. Hopefully someone does make it happen. I would love to be able to pick up a book, read, then listen to it on my way back or something, and then pick it up and start reading it again, having it sync automatically through all the states. &lt;/p&gt;
&lt;p&gt;I think it would be a great experience.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>books</category><category>reading</category><category>audiobooks</category><category>kindle</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to save markdown documents using Apple shortcuts</title><link>https://sajalchoudhary.net/til/how-to-save-markdown-documents-using-apple-shortcuts/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-save-markdown-documents-using-apple-shortcuts/</guid><pubDate>Wed, 16 Jul 2025 08:13:39 GMT</pubDate><content:encoded>&lt;p&gt;The &lt;strong&gt;Save File&lt;/strong&gt; component saves file as .txt even if you specify the complete name with .md.&lt;/p&gt;
&lt;p&gt;The trick is to use the &lt;strong&gt;Rename File&lt;/strong&gt; component just after the &lt;strong&gt;Save File&lt;/strong&gt; component to rename the created .txt file as .md.&lt;/p&gt;
</content:encoded><category>til</category><category>apple</category><category>shortcuts</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>The goal with yoga</title><link>https://sajalchoudhary.net/evergreen/the-goal-with-yoga/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/the-goal-with-yoga/</guid><pubDate>Sun, 13 Jul 2025 09:19:43 GMT</pubDate><content:encoded>&lt;p&gt;I had written sometime back on Mastodon, and I am paraphrasing here, that with yoga it felt like I was trying to get back to how my body was when I was a child.&lt;/p&gt;
&lt;p&gt;I had this realisation after looking at Savya doing all the things I was trying to do effortlessly. Savya was able to bend his back, his feet everything and just sit there like that.&lt;/p&gt;
&lt;p&gt;The goal with yoga, is to be able to do the poses, effortlessly. Most days I am huffing as I go through the surya-namaskar. The goal is to be able to flow, to not feel minimal effort.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>yoga</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Homes can’t be considered both an investment and affordable enough for everyone to own</title><link>https://sajalchoudhary.net/evergreen/homes-cant-be-considered-both-an-investment-and-affordable-enough-for-everyone-to-own/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/homes-cant-be-considered-both-an-investment-and-affordable-enough-for-everyone-to-own/</guid><pubDate>Fri, 11 Jul 2025 10:26:50 GMT</pubDate><content:encoded>&lt;p&gt;Heard about this in &lt;a href=&quot;https://sajalchoudhary.net/bookshelf/abundance-how-we-build-a-better-future/&quot;&gt;Abundance: How We Build a Better Future&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Homes can’t be both investments and affordable enough for everyone to own. &lt;/p&gt;
&lt;p&gt;For a home to be a good investment, its price has to increase. For that to happen:&lt;br /&gt;You have to control how many homes can be built&lt;br /&gt;	1. If supply is low then price increases&lt;br /&gt;	2. With zoning permits and laws you can control which type of homes can be built which would control who can afford those homes&lt;/p&gt;
</content:encoded><category>evergreen</category><category>homeownership</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>About AI browsers</title><link>https://sajalchoudhary.net/evergreen/about-ai-browsers/</link><guid isPermaLink="true">https://sajalchoudhary.net/evergreen/about-ai-browsers/</guid><pubDate>Fri, 11 Jul 2025 08:50:15 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.theverge.com/news/704162/opeani-ai-web-browser-chatgpt&quot;&gt;OpenAI’s next big launch could be an AI web browser&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OpenAI is planning to launch an AI web browser in the “coming weeks,” according to &lt;a href=&quot;https://www.reuters.com/business/media-telecom/openai-release-web-browser-challenge-google-chrome-2025-07-09/&quot;&gt;a report from &lt;em&gt;Reuters&lt;/em&gt;&lt;/a&gt;. Sources tell the outlet that OpenAI could build &lt;a href=&quot;https://www.theverge.com/2025/1/23/24350395/openai-chatgpt-operator-agent-control-computer&quot;&gt;its Operator AI agent&lt;/a&gt; into the browser, allowing it to book reservations, fill out forms, and complete other tasks on a user’s behalf as it moves toward &lt;a href=&quot;https://www.theverge.com/2024/10/10/24266333/ai-agents-assistants-openai-google-deepmind-bots&quot;&gt;an “agentic” future&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Quite a few companies are working on building AI browsers - Perplexity, OpenAI and The Browser Company. I have not tried any by now. &lt;/p&gt;
&lt;p&gt;All these companies seem to have the same vision - they will use the browser for us, book stuff, search stuff, etc. I don’t know how I feel about that, tbh.&lt;/p&gt;
</content:encoded><category>evergreen</category><category>ai</category><category>browsers</category><category>web</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to use Policy Analyzer tool to compare GPO settings</title><link>https://sajalchoudhary.net/til/how-to-use-policy-analyzer-tool-to-compare-gpo-settings/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-use-policy-analyzer-tool-to-compare-gpo-settings/</guid><pubDate>Thu, 10 Jul 2025 12:38:27 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;gpresult and using Get-GPOreport does not work because it can export output in .xml or html but PolicyAnalyzer wants backup format&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Policy Analyzer can ingest four types of GPO files: registry policy files, security templates, audit policy backup files, and backup.xml files that reference Group Policy client side extensions (CSEs) required by settings in the GPO.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are two ways to do this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On the DC you can use this snippet to create backup of all GPOs that apply to a specific OU&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# Specify the OU  
$OU = &quot;&quot;

# Get GPO links for the OU  
$GPOs = Get-GPInheritance -Target $OU | Select-Object -ExpandProperty InheritedGpoLinks

# Loop through the GPOs and generate reports  
foreach ($GPO in $GPOs) {  
  $Name = $GPO.DisplayName
  Backup-GPO -Name $Name -Path &quot;C:\Temp\GPOBackups\&quot;  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;On a member server or local server, use LGPO.exe tool&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;lgpo.exe /b &amp;lt;foldername&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><category>gpo</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to increase event log size on Windows server</title><link>https://sajalchoudhary.net/til/how-to-increase-event-log-size-on-windows-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-increase-event-log-size-on-windows-server/</guid><pubDate>Fri, 27 Jun 2025 10:38:34 GMT</pubDate><content:encoded>&lt;h1&gt;Through GPO&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Computer Configuration\Administrative Templates\Windows Components\Event Log Service\&lt;/code&gt; &lt;ol&gt;
&lt;li&gt;Subordinate folders exist by default, select the appropriate one and set the max log size&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;PowerShell override&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;wevtutil sl Security /ms:3145728
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;How to check log size&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;wevtutil gl Security | findstr /i &quot;maxSize&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd349798(v=ws.10)&quot;&gt;Event Log | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ESXi install fails with run time error - disk device does not support osdata</title><link>https://sajalchoudhary.net/til/esxi-install-fails-with-run-time-error-disk-device-does-not-support-osdata/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/esxi-install-fails-with-run-time-error-disk-device-does-not-support-osdata/</guid><pubDate>Fri, 06 Jun 2025 09:38:41 GMT</pubDate><content:encoded>&lt;p&gt;If the disk is too small, then this issue can come.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://williamlam.com/2020/05/changing-the-default-size-of-the-esx-osdata-volume-in-esxi-7-0.html&quot;&gt;Changing the default size of the ESX-OSData volume in ESXi 7.0&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The biggest change to the partition layout is the consolidation of VMware Tools Locker, Core Dump and Scratch partitions into a new ESX-OSData volume (based on VMFS-L). This new volume can vary in size (up to 138GB) depending on a number of factors including the current ESXi boot media (USB SD-Card, Local Disk) but also the size of the device itself, which is explained in the official documentation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article?legacyId=77009&quot;&gt;New Kernel options available on ESXi 7.0&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>esxi</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Get list of open shares on Windows server</title><link>https://sajalchoudhary.net/til/get-list-of-open-shares-on-windows-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/get-list-of-open-shares-on-windows-server/</guid><pubDate>Fri, 23 May 2025 09:38:46 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-SmbOpenFile | select @{Name=&quot;Timestamp&quot;; Expression={Get-Date}},Path, ClientUserName | Export-CSV -Path C:\SupportFilesWindows\Logs\openfiles.csv -Append -Encoding UTF8 -NoClobber -NoTypeInformation
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to trigger manual replication in DC</title><link>https://sajalchoudhary.net/til/how-to-trigger-manual-replication-in-dc/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-trigger-manual-replication-in-dc/</guid><pubDate>Wed, 14 May 2025 20:38:51 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
repadmin /syncall /AdeP

# - `/A` – All partitions
# - `/d` – Identify servers by distinguished name
# - `/e` – Enterprise (cross-site)
# - `/P` – Push replication
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;GUI&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to AD sites and services.&lt;/li&gt;
&lt;li&gt;Go to site &amp;gt; servers &amp;gt; DC &amp;gt; NTDS settings.&lt;/li&gt;
&lt;li&gt;Under that replication links will be present. Right click and sync now.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>#powershell</category><category>#ad</category><category>#windows</category><category>#repadmin</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install drivers on esxi using vibs</title><link>https://sajalchoudhary.net/til/install-drivers-on-esxi-using-vibs/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-drivers-on-esxi-using-vibs/</guid><pubDate>Thu, 08 May 2025 13:38:51 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Copy vib to the esxi. &lt;/li&gt;
&lt;li&gt;Run the following command.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# The path has to be absolute, absolute path starts from root. so /tmp/

#for install
esxcli software vib install -v /tmp/MEL_bootbank_nmst_4.14.3.3-1OEM.700.1.0.15525992.vib
esxcli software vib install -d {OFFLINE_BUNDLE}

# For update
esxcli software vib update -v {VIBFILE}
esxcli software vib update -d {OFFLINE_BUNDLE}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://community.hpe.com/t5/operating-system-vmware/install-hpe-driver-on-esxi-6-7/td-p/7178022&quot;&gt;Install HPE driver on ESXi 6.7 - Hewlett Packard Enterprise Community&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#vmware</category><category>#hp</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Get ACL for AD object</title><link>https://sajalchoudhary.net/til/get-acl-for-ad-object/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/get-acl-for-ad-object/</guid><pubDate>Mon, 05 May 2025 09:39:14 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Import-Module ActiveDirectory

# Define the distinguished name (DN) of the AD object
$objectDN = &quot;CN=YourObjectName,OU=YourOU,DC=YourDomain,DC=com&quot;

# Get the ACL for the AD object
$acl = Get-ACL -Path &quot;AD:$objectDN&quot;  

# Display the ACL
$acl.Access | Format-Table -Property IdentityReference, ActiveDirectoryRights, AccessControlType, IsInherited, InheritanceFlags, PropagationFlags
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to check replication status on DC</title><link>https://sajalchoudhary.net/til/how-to-check-replication-status-on-dc/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-check-replication-status-on-dc/</guid><pubDate>Wed, 30 Apr 2025 20:39:20 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# For summary
repadmin /replsummary

# For specific DC
repadmin /showrepl &amp;lt;DCName&amp;gt;

# To check replication partners
repadmin /showreps &amp;lt;DCName&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Building scdotnetv3 on Astro</title><link>https://sajalchoudhary.net/now/building-scdotnetv3-on-astro/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/building-scdotnetv3-on-astro/</guid><pubDate>Mon, 21 Apr 2025 17:41:49 GMT</pubDate><content:encoded>&lt;p&gt;I am still building this website on Astro. I think I have an MVP already. The site exists and I have been posting to it continuously. But of course, if you go and look at certain places, and pages, you would know that there is still a lot left to do.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ESXi firmware upgrade baseline fails to apply with incompatible message</title><link>https://sajalchoudhary.net/til/esxi-firmware-upgrade-baseline-fails-to-apply-with-incompatible-message/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/esxi-firmware-upgrade-baseline-fails-to-apply-with-incompatible-message/</guid><pubDate>Fri, 18 Apr 2025 18:39:37 GMT</pubDate><content:encoded>&lt;p&gt;In the message, it will show the list of VIBs that are causing problems. &lt;/p&gt;
&lt;p&gt;For example, on cisco blade, some hpe related firmware is present. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;esxcli software vib list | grep -i hpe
amsd                           701.11.9.0.9-1OEM.701.0.0.16850804    HPE     VMwareAccepted    2023-09-02
amsdv                          701.11.3.0.17-1OEM.701.0.0.16850804   HPE     VMwareAccepted    2023-09-02
fc-enablement                  700.3.9.0.4-1OEM.700.1.0.15843807     HPE     PartnerSupported  2023-09-02
hpe-upgrade                    1.4.1-1OEM.700.1.0.15843807           HPE     PartnerSupported  2023-09-02
ilo                            700.10.8.0.6-1OEM.700.1.0.15843807    HPE     PartnerSupported  2023-09-02
ilorest                        700.4.0.0.0.32-15843807               HPE     PartnerSupported  2023-09-02
sut                            701.4.1.0.8-1OEM.701.0.0.16850804     HPE     VMwareAccepted    2023-09-02
vnic-enablement                700.2.10.10-1OEM.700.1.0.15843807     HPE     PartnerSupported  2023-09-02
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remove these vibs.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; esxcli software vib remove -n amsdv
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After removing problematic vibs, reboot and check compliance again.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><category>esxi</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>dcpromo fails with access denied error</title><link>https://sajalchoudhary.net/til/dcpromo-fails-with-access-denied-error/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/dcpromo-fails-with-access-denied-error/</guid><pubDate>Wed, 16 Apr 2025 17:39:48 GMT</pubDate><content:encoded>&lt;p&gt;This can happen during demotion.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check that the computer object - prevent object from accidental deletion is not ticked on.&lt;/li&gt;
&lt;li&gt;The second thing is to check the GPO &amp;gt; Default domain policy &amp;gt; Windows settings &amp;gt; Security Settings &amp;gt; Local Policies &amp;gt; User Right Assignment &amp;gt; Enable computer and user accounts to be trusted for delegation. Add the Administrator in it . Then run &lt;code&gt;gpupdate&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware change NIC order</title><link>https://sajalchoudhary.net/til/vmware-change-nic-order/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-change-nic-order/</guid><pubDate>Fri, 11 Apr 2025 09:40:00 GMT</pubDate><content:encoded>&lt;p&gt;There is a bug in Cisco Hardware which causes vmnics to get assigned in wrong order after esxi install. As a workaround we can change the vmnic order from esxi level.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;esxcfg-nics -l&lt;/code&gt; --&amp;gt; check the mac addresses, figure out which vmnic should have which mac&lt;/li&gt;
&lt;li&gt;&lt;code&gt;localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --alias vmnic1 --bus-address s00000001:03.01 --bus-type pci&lt;/code&gt; -  update physical alias.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias vmnic1 --bus-address &quot;pci#s00000001:03.01#0&quot;&lt;/code&gt; - update logical address&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[root@FIESOPLPRTESX13:~] localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list
Bus type  Bus address            Alias
--------  ---------------------  --# references:
[How VMware ESXi determines the order in which names are assigned to devices](https://knowledge.broadcom.com/external/article/324534/how-vmware-esxi-determines-the-order-in.html)
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><category>til</category><category>#cisco</category><category>#vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Find paths longer than 260 characters</title><link>https://sajalchoudhary.net/til/find-paths-longer-than-260-characters/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/find-paths-longer-than-260-characters/</guid><pubDate>Tue, 08 Apr 2025 18:40:06 GMT</pubDate><content:encoded>&lt;p&gt;When running Get-ChildItem or Get-Acl, we might come across this issue. &lt;/p&gt;
&lt;p&gt;In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is &lt;strong&gt;MAX_PATH&lt;/strong&gt;, which is defined as 260 characters.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# This gets everything, we can optionally just search for directories as well
Get-ChildItem –Force –Recurse –ErrorAction SilentlyContinue –ErrorVariable AccessDenied

# Then find the paths using this error variable
$AccessDenied |
Where-Object { $_.Exception -match &quot;must be less than 260 characters&quot; } |
ForEach-Object { $_.TargetObject }
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#maxpath&quot;&gt;Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/windows/win32/fileio/maximum-file-path-limitation?tabs=registry&quot;&gt;Maximum Path Length Limitation - Win32 apps | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Hosting shut up &amp; write</title><link>https://sajalchoudhary.net/now/hosting-shut-up-write/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/hosting-shut-up-write/</guid><pubDate>Sun, 30 Mar 2025 17:41:49 GMT</pubDate><content:encoded>&lt;p&gt;One hour uninterrupted sessions in meeting rooms at the libraries.&lt;br /&gt;Started on 6th April, 2025.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to add custom attributes to AD</title><link>https://sajalchoudhary.net/til/how-to-add-custom-attributes-to-ad/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-add-custom-attributes-to-ad/</guid><pubDate>Tue, 25 Mar 2025 11:40:33 GMT</pubDate><content:encoded>&lt;h2&gt;Pre-requisites&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Make sure you have schema admin rights&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Steps&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to mmc &amp;gt; active directory schema.&lt;/li&gt;
&lt;li&gt;&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Active Directory Schema&lt;/strong&gt; administrative tool, do a right-click on &lt;strong&gt;Attributes&lt;/strong&gt; and then select &lt;strong&gt;Create Attribute…&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;ul&gt;
&lt;li&gt;Click on &lt;strong&gt;Continue&lt;/strong&gt; (The warning that is displayed is to inform that the creation of a new Active Directory attribute is not a reversible operation and that it cannot be removed once done)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Configure PDC with authoritative Time source</title><link>https://sajalchoudhary.net/til/configure-pdc-with-authoritative-time-source/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/configure-pdc-with-authoritative-time-source/</guid><pubDate>Tue, 25 Mar 2025 10:40:26 GMT</pubDate><content:encoded>&lt;h3&gt;To configure time synchronization through registry edit on the PDC emulator:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;Registry Editor&lt;/strong&gt; (&lt;strong&gt;regedit.exe&lt;/strong&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the following registry key: &lt;code&gt;HKLM\System\CurrentControlSet\Services\W32Time\Parameters&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To use a specific NTP source, modify the &lt;strong&gt;Type&lt;/strong&gt; value to &lt;strong&gt;NTP&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modify the &lt;strong&gt;NtpServer&lt;/strong&gt; value to contain the NTP server to synchronize time with followed by 0x8, for example &lt;strong&gt;131.107.13.100,0x8&lt;/strong&gt;. Multiple NTP servers must be space-delimited, for example &lt;strong&gt;131.107.13.100,0x8 24.56.178.140,0x8&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open an administrative Command prompt and execute the following command: &lt;code&gt;w32tm /config /update&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/services-hub/unified/health/remediation-steps-ad/configure-the-root-pdc-with-an-authoritative-time-source-and-avoid-widespread-time-skew&quot;&gt;Recommendation - Configure the Root PDC with an Authoritative Time Source and Avoid a Widespread Time Skew | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ad</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Set ACL using CLI</title><link>https://sajalchoudhary.net/til/set-acl-using-cli/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/set-acl-using-cli/</guid><pubDate>Wed, 12 Mar 2025 07:40:41 GMT</pubDate><content:encoded>&lt;p&gt;There are two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;icacls&lt;/li&gt;
&lt;li&gt;PowerShell&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# Path
$Path = &quot;&quot;

# Permissions that need to be set
$identity = &quot;GT-DLPscan-R&quot;
$fileSystemRights = &quot;Read&quot;
$type = &quot;Allow&quot;
$inheritance = &quot;ContainerInherit,ObjectInherit&quot;
$propagation = &quot;None&quot;

# Create rule

$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, $fileSystemRights, $inheritance, $propagation, $type)

## Get ACL
try {
	$Acl = Get-Acl -Path $Folder -ErrorAction Stop
	# Add the new rule to folder rules
	$Acl.SetAccessRule($rule)
	# Set ACL
	$Acl | Set-Acl -Path $Folder -ErrorAction Stop
} catch {
	$Error = &quot;Unable to set acl. Error : $_&quot;
	Write-Host $Error
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Typical file system rights&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;ListDirectory&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Specifies the right to read the contents of a directory.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadData&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy a file or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CreateFiles&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Specifies the right to create a file. This right requires the &lt;code&gt;Synchronize&lt;/code&gt; value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WriteData&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AppendData&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Specifies the right to append data to the end of a file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CreateDirectories&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Specifies the right to create a folder This right requires the &lt;code&gt;Synchronize&lt;/code&gt; value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadExtendedAttributes&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy extended file system attributes from a folder or file. For example, this value specifies the right to view author and content information. This does not include the right to read data, file system attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WriteExtendedAttributes&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ExecuteFile&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;Specifies the right to run an application file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Traverse&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;Specifies the right to list the contents of a folder and to run applications contained within that folder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeleteSubdirectoriesAndFiles&lt;/td&gt;
&lt;td&gt;64&lt;/td&gt;
&lt;td&gt;Specifies the right to delete a folder and any files contained within that folder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadAttributes&lt;/td&gt;
&lt;td&gt;128&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy file system attributes from a folder or file. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WriteAttributes&lt;/td&gt;
&lt;td&gt;256&lt;/td&gt;
&lt;td&gt;Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Write&lt;/td&gt;
&lt;td&gt;278&lt;/td&gt;
&lt;td&gt;Specifies the right to create folders and files, and to add or remove data from files. This right includes the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-writedata&quot;&gt;WriteData&lt;/a&gt; right, &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-appenddata&quot;&gt;AppendData&lt;/a&gt; right, &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-writeextendedattributes&quot;&gt;WriteExtendedAttributes&lt;/a&gt; right, and &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-writeattributes&quot;&gt;WriteAttributes&lt;/a&gt; right.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete&lt;/td&gt;
&lt;td&gt;65536&lt;/td&gt;
&lt;td&gt;Specifies the right to delete a folder or file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadPermissions&lt;/td&gt;
&lt;td&gt;131072&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy access and audit rules from a folder or file. This does not include the right to read data, file system attributes, and extended file system attributes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read&lt;/td&gt;
&lt;td&gt;131209&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy folders or files as read-only. This right includes the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-readdata&quot;&gt;ReadData&lt;/a&gt; right, &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-readextendedattributes&quot;&gt;ReadExtendedAttributes&lt;/a&gt; right, &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-readattributes&quot;&gt;ReadAttributes&lt;/a&gt; right, and &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-readpermissions&quot;&gt;ReadPermissions&lt;/a&gt; right.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadAndExecute&lt;/td&gt;
&lt;td&gt;131241&lt;/td&gt;
&lt;td&gt;Specifies the right to open and copy folders or files as read-only, and to run application files. This right includes the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-read&quot;&gt;Read&lt;/a&gt; right and the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-executefile&quot;&gt;ExecuteFile&lt;/a&gt; right.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modify&lt;/td&gt;
&lt;td&gt;197055&lt;/td&gt;
&lt;td&gt;Specifies the right to read, write, list folder contents, delete folders and files, and run application files. This right includes the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-readandexecute&quot;&gt;ReadAndExecute&lt;/a&gt; right, the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-write&quot;&gt;Write&lt;/a&gt; right, and the &lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0#system-security-accesscontrol-filesystemrights-delete&quot;&gt;Delete&lt;/a&gt; right.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChangePermissions&lt;/td&gt;
&lt;td&gt;262144&lt;/td&gt;
&lt;td&gt;Specifies the right to change the security and audit rules associated with a file or folder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TakeOwnership&lt;/td&gt;
&lt;td&gt;524288&lt;/td&gt;
&lt;td&gt;Specifies the right to change the owner of a folder or file. Note that owners of a resource have full access to that resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Synchronize&lt;/td&gt;
&lt;td&gt;1048576&lt;/td&gt;
&lt;td&gt;Specifies whether the application can wait for a file handle to synchronize with the completion of an I/O operation. This value is automatically set when allowing access and automatically excluded when denying access.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FullControl&lt;/td&gt;
&lt;td&gt;2032127&lt;/td&gt;
&lt;td&gt;Specifies the right to exert full control over a folder or file, and to modify access control and audit rules. This value represents the right to do anything with a file and is the combination of all rights in this enumeration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Useful combined chart&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Desired Outcome&lt;/th&gt;
&lt;th&gt;Inheritance&lt;/th&gt;
&lt;th&gt;Propagate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subfolders and Files only&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ContainerInherit,ObjectInherit&lt;/td&gt;
&lt;td&gt;InheritOnly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;This Folder, Subfolders and Files&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ContainerInherit,ObjectInherit&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;This Folder, Subfolders and Files&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ContainerInherit,ObjectInherit&lt;/td&gt;
&lt;td&gt;NoPropagateInherit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;This folder and subfolders&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ContainerInherit&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Subfolders only&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ContainerInherit&lt;/td&gt;
&lt;td&gt;InheritOnly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;This folder and files&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ObjectInherit&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;This folder and files&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ObjectInherit&lt;/td&gt;
&lt;td&gt;NoPropagateInherit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Inheritance values&lt;/h2&gt;
&lt;p&gt;To provide combined value, need to add numbers, so Container+Object is 3.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;The ACE is not inherited by child objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ContainerInherit&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;The ACE is inherited by child container objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ObjectInherit&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;The ACE is inherited by child leaf objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Propagation inherit values&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Specifies that no inheritance flags are set.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NoPropagateInherit&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Specifies that the ACE is not propagated to child objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;InheritOnly&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Specifies that the ACE is propagated only to child objects. This includes both container and leaf child objects.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.propagationflags?view=windowsdesktop-5.0&quot;&gt;PropagationFlags Enum (System.Security.AccessControl) | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.inheritanceflags?view=windowsdesktop-5.0&quot;&gt;InheritanceFlags Enum (System.Security.AccessControl) | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=windowsdesktop-5.0&quot;&gt;FileSystemRights Enum (System.Security.AccessControl) | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://developers.de/blogs/damir_dobric/archive/2007/06/18/directory-security-and-access-rules.aspx&quot;&gt;Directory Security and Access Rules - Damir Dobric Posts - developers.de&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#powershell</category><category>windows</category><category>acl</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Installing remote desktop on standalone server</title><link>https://sajalchoudhary.net/til/installing-remote-desktop-on-standalone-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/installing-remote-desktop-on-standalone-server/</guid><pubDate>Mon, 10 Mar 2025 11:40:49 GMT</pubDate><content:encoded>&lt;p&gt;Basically install Remote Desktop Session Host role.&lt;br /&gt;Note: Might require 2 reboots: 1 after role install, 1 for licensing to look OK on the server.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/remote/install-rds-host-role-service-without-connection-broker&quot;&gt;Install RDS role service without Connection Broker - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to upgrade Domain Controller</title><link>https://sajalchoudhary.net/til/how-to-upgrade-domain-controller/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-upgrade-domain-controller/</guid><pubDate>Sat, 08 Mar 2025 08:41:01 GMT</pubDate><content:encoded>&lt;p&gt;In-place upgrade is not suggested. The approach to take is deploy a new server, dcpromo the old one out, rename, give the same IP, dcpromo the new one in.&lt;/p&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;h2&gt;Pre-reqs&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Steps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Copy or take screenshots of the DNS server settings on old DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copy or take screenshots of the TCS/IP server settings on old DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check domains and trusts module to see if there are any trusts relationships. There should not be any but just validate.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Export tasks in Task Scheduler from old DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Import tasks into Task Scheulder in the new DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run command netdom query fsmo and ensure that old DC is not running any FSMO roles - &lt;a href=&quot;#&quot;&gt;202412051521 Moving fsmo roles&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;If old DC is running FSMO roles than transfer them to other existing DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Activity&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Steps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;On day of change run Dcpromo and demote old DC server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Once demotion is completed perform AD validations on old other DC server i.e. dcdiag and repadmin/replsummary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check and verify that nslookup for kehi.okobank.net shows only old KEHIDC1 IP addresses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check and see if old KEHIDC3 computer account is still Domain Controller OU or has moved to Computers OU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On old KEHIDC1 you use NTDS util to check and see if KEHIDC1 is still the only DC listed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Once steps 10,11,12 are successful you can shutdown the old KEHIDC3 server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ensure the TCP/IP server settings on the new Server match that of the old server as per the screenshots taken&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reset the KEHIDC3 computer account in AD and change the name and IP address of the new server to KEHIDC3 and the old IP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run Dcpromo on the new server and promote it to install all the Active Directory Roles.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Install the AD directories onto the D drive of the server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Once server installs all the roles and restarts, perform AD validations on both KEHIDC servers i.e. dcdiag and repadmin/replsummary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check and verify that nslookup for kehi.okobank.net shows both KEHIDC IP addresses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Check and see if KEHIDC3 computer account is now in Domain Controller OU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;On old KEHIDC1 you use NTDS util to check and see if both KEHIDC&apos;s show are listed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ensure the DNS server settings match that of the old server as per the screenshots taken&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Once steps 18,19,20 are successful ensure all the required agents and their services are running&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Drop mail to Solarwinds, Backup, AzureCCC team to ensure that their agents on this new DC are working properly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Once all above steps are done ensure the imported tasks are running in task scheduler, than server can be handed over to Kauko&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;Commands&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Find out authentication logs in VMware vCenter</title><link>https://sajalchoudhary.net/til/find-out-authentication-logs-in-vmware-vcenter/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/find-out-authentication-logs-in-vmware-vcenter/</guid><pubDate>Thu, 06 Mar 2025 12:41:09 GMT</pubDate><content:encoded>&lt;p&gt;Related to &lt;a href=&quot;#&quot;&gt;202303211323 VMware logs&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to vCenter appliance.&lt;/li&gt;
&lt;li&gt;Go to /var/log/vmware/applmgmt-audit.&lt;/li&gt;
&lt;li&gt;Check the lgos.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;cat applmgmt-audit.log | grep -i &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/372454/diagnosing-account-permission-issues-in.html&quot;&gt;Diagnosing Account Permission Issues in vCenter Server Using Log Analysis&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AD Database files location</title><link>https://sajalchoudhary.net/til/ad-database-files-location/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ad-database-files-location/</guid><pubDate>Wed, 26 Feb 2025 10:41:26 GMT</pubDate><content:encoded>&lt;p&gt;Check in registry:  &lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
Database log files path  
DSA Database file
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Default: \Windows\NTDS.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.stigviewer.com/stig/microsoft_windows_server_2022/2024-06-14/finding/V-254391&quot;&gt;Windows Server 2022 permissions on the Active Directory data files must only allow System and Administrators access.&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#ad</category><category>#windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Find KDC</title><link>https://sajalchoudhary.net/til/find-kdc/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/find-kdc/</guid><pubDate>Wed, 26 Feb 2025 07:41:36 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;nslookup -type=srv _kerberos._tcp.YOUR-DOMAIN
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Disable TLS 1.0</title><link>https://sajalchoudhary.net/til/disable-tls-10/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/disable-tls-10/</guid><pubDate>Sat, 22 Feb 2025 09:41:15 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
## Get current value. It should be Enabled:0 and DisabledByDefault: 1

Get-ItemProperty &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client\&apos;


Enabled           : 0
DisabledByDefault : 1
PSPath            : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client\
PSParentPath      : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0
PSChildName       : Client
PSDrive           : HKLM
PSProvider        : Microsoft.PowerShell.Core\Registry

## To disable
New-Item &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server&apos; -Force | Out-Null

New-ItemProperty -path &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server&apos; -name &apos;Enabled&apos; -value &apos;0&apos; -PropertyType &apos;DWord&apos; -Force | Out-Null

New-ItemProperty -path &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server&apos; -name &apos;DisabledByDefault&apos; -value 1 -PropertyType &apos;DWord&apos; -Force | Out-Null

New-Item &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client&apos; -Force | Out-Null

New-ItemProperty -path &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client&apos; -name &apos;Enabled&apos; -value &apos;0&apos; -PropertyType &apos;DWord&apos; -Force | Out-Null

New-ItemProperty -path &apos;HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client&apos; -name &apos;DisabledByDefault&apos; -value 1 -PropertyType &apos;DWord&apos; -Force | Out-Null

Write-Host &apos;TLS 1.0 has been disabled.&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/manage-ssl-protocols-in-ad-fs&quot;&gt;Manage SSL/TLS protocols and cipher suites for AD FS | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#windows</category><category>#powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>About system volume information</title><link>https://sajalchoudhary.net/til/about-system-volume-information/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/about-system-volume-information/</guid><pubDate>Tue, 18 Feb 2025 08:41:45 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Take ownership
takeown /f &quot;C:\System Volume information&quot;  

# Grant permission
icacls &quot;C:\System Volume Information&quot; /grant domain\user:F

## Revert
icacls &quot;C:\System Volume Information&quot; /setowner &quot;NT Authority\System&quot;
icacls &quot;C:\System Volume Information&quot; /remove domain\user
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;System Volume Information drives usually contain snapshot.&lt;br /&gt;&lt;a href=&quot;#&quot;&gt;Windows delete shadow copies&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://woshub.com/how-to-clean-up-system-volume-information-folder/&quot;&gt;How to Clean Up System Volume Information Folder on Windows | Windows OS Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#windows</category><category>#powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows how to check firewall logs</title><link>https://sajalchoudhary.net/til/windows-how-to-check-firewall-logs/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-how-to-check-firewall-logs/</guid><pubDate>Fri, 14 Feb 2025 10:41:56 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Run firewall.cpl &amp;gt; Go to advanced settings.&lt;/li&gt;
&lt;li&gt;Under monitoring, under logging settings, paths are present. Click and check for any drops.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>#Firewall</category><category>#windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Update firewall on VMware</title><link>https://sajalchoudhary.net/til/update-firewall-on-vmware/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/update-firewall-on-vmware/</guid><pubDate>Thu, 13 Feb 2025 11:42:15 GMT</pubDate><content:encoded>&lt;p&gt;ipaddress is a string so can not have multiple items in one go. So need to loop for allowed IP addresses as a &lt;a href=&quot;#&quot;&gt;PowerShell Arrays&lt;/a&gt;, if many.&lt;/p&gt;
&lt;p&gt;In case Ip already exists in rule, it gives error: &lt;code&gt;InnerText: Ip address already exist.EsxCLI.CLIFault.summary&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$arguments = $EsxCli.network.firewall.ruleset.allowedip.add.CreateArgs()
$arguments.rulesetid = $Service
$arguments.ipaddress = $IP
$EsxCli.network.firewall.ruleset.allowedip.add.Invoke($arguments)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.stigviewer.com/stig/vmware_vsphere_8.0_esxi/2023-10-11/finding/V-258794&quot;&gt;The ESXi host must configure the firewall to restrict access to services running on the host.&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>#vmware</category><category>#powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware List allowed IPs in firewall</title><link>https://sajalchoudhary.net/til/vmware-list-allowed-ips-in-firewall/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-list-allowed-ips-in-firewall/</guid><pubDate>Thu, 13 Feb 2025 11:42:07 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
Get-VMHost | Get-VMHostFirewallException | Where {$_.Enabled -eq $true} | Select Name,Enabled,@{N=&quot;AllIPEnabled&quot;;E={$_.ExtensionData.AllowedHosts.AllIP}}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>#vmware</category><category>#powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Publish my poetry collection</title><link>https://sajalchoudhary.net/now/publish-my-poetry-collection/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/publish-my-poetry-collection/</guid><pubDate>Sat, 21 Dec 2024 17:41:49 GMT</pubDate><content:encoded>&lt;p&gt;Working on collecting, editing and then publishing a collection of my poems.&lt;br /&gt;A part of this is reading more poems. Currently reading 100 poems that matter.&lt;/p&gt;
&lt;p&gt;Completed on 15th Feb, 2025 - &lt;a href=&quot;https://74c1f43a.scdotnetv3.pages.dev/done/__GHOST_URL__/a-year-of-mornings/&quot;&gt;A year of mornings&lt;/a&gt; is published and available to purchase.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Import GPO</title><link>https://sajalchoudhary.net/til/import-gpo/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/import-gpo/</guid><pubDate>Mon, 02 Dec 2024 09:30:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Take backup if there are any existing GPOs&lt;/li&gt;
&lt;li&gt;Create a new GPO as neeeded.&lt;/li&gt;
&lt;li&gt;In the list of Group Policy Objects, right-click the new GPO and select &lt;strong&gt;Import Settings…&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.cyberark.com/pam-self-hosted/10.5/en/content/security/epv%20importing%20a%20gpo%20file%20to%20an%20active%20directory%20domain.htm&quot;&gt;Importing a GPO file to an Active Directory Domain (In Domain)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Delete everything under a folder powershell</title><link>https://sajalchoudhary.net/til/delete-everything-under-a-folder-powershell/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/delete-everything-under-a-folder-powershell/</guid><pubDate>Mon, 02 Dec 2024 09:10:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-ChildItem -Path C:\Temp -Include *.* -File -Recurse | foreach { $_.Delete()}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://superuser.com/questions/741945/delete-all-files-from-a-folder-and-its-sub-folders&quot;&gt;windows - Delete all files from a folder and its sub folders - Super User&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Manually cleaning DFSR folder</title><link>https://sajalchoudhary.net/til/manually-cleaning-dfsr-folder/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/manually-cleaning-dfsr-folder/</guid><pubDate>Mon, 02 Dec 2024 08:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Quota can be checked in DFS management &amp;gt; Replication &amp;gt; Staging Quota&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# Get folder list
WMIC.EXE /namespace:\\root\microsoftdfs path dfsrreplicatedfolderconfig get replicatedfolderguid,replicatedfoldername

# Clear quota
WMIC.EXE /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo where &quot;replicatedfolderguid=&apos;&amp;lt;RF GUID&amp;gt;&apos;&quot; call cleanupconflictdirectory
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if the above does not work:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stop the DFSR service.&lt;/li&gt;
&lt;li&gt;Delete the contents of the ConflictAndDeleted folder manually (with explorer.exe or DEL).&lt;/li&gt;
&lt;li&gt;Delete the ConflictAndDeletedManifest.xml file.&lt;/li&gt;
&lt;li&gt;Start the DFSR service back up.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/blog/askds/manually-clearing-the-conflictanddeleted-folder-in-dfsr/395711&quot;&gt;Manually Clearing the ConflictAndDeleted Folder in DFSR | Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>dfsr</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Export certificate from certificate store</title><link>https://sajalchoudhary.net/til/export-certificate-from-certificate-store/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/export-certificate-from-certificate-store/</guid><pubDate>Tue, 26 Nov 2024 09:22:00 GMT</pubDate><content:encoded>&lt;p&gt;Export-Certificate command can be used to export certificate in .cer or .p10.&lt;br /&gt;Export-PfxCertificate to export private key&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
$CertToExport = Get-ChildItem -Path cert:\LocalMachine\My | Where-Object { $_.Subject -like &quot;*$Device*&quot; }
Export-Certificate -Cert $CertToExport -FilePath $CertPath -Type CERT


$SecurePass = &apos;123456&apos; | ConvertTo-SecureString -AsPlainText -Force
    $CertToExport = Get-ChildItem -Path cert:\LocalMachine\My | Where-Object { $_.Subject -like &quot;*$Device*&quot; }
    Export-PfxCertificate -Password $SecurePass -FilePath $CertPrivateKeyPath -Cert $CertToExport
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>FSMO roles</title><link>https://sajalchoudhary.net/til/fsmo-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/fsmo-roles/</guid><pubDate>Thu, 17 Oct 2024 12:35:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;ADDS is built upon mult-master DB model&lt;/li&gt;
&lt;li&gt;Any DC can change configuration and it replicates to everyone&lt;/li&gt;
&lt;li&gt;Some activities need to be controlled, so that&apos;s where FSMO comes in&lt;/li&gt;
&lt;li&gt;Flexible Single Master Operation roles&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>DNS delegation</title><link>https://sajalchoudhary.net/til/dns-delegation/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/dns-delegation/</guid><pubDate>Thu, 17 Oct 2024 12:08:00 GMT</pubDate><content:encoded>&lt;p&gt;We can create a delegated zone and allow app/teams to create entries as needed&lt;br /&gt;This was for example, what is requested for storage appliance&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>dns</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of DNS queries</title><link>https://sajalchoudhary.net/til/types-of-dns-queries/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-dns-queries/</guid><pubDate>Thu, 17 Oct 2024 11:58:00 GMT</pubDate><content:encoded>&lt;h1&gt;Iterative&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;DNS server will respond with the best answer it has without querying any additional servers&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Recursive&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;DNS server will work with other DNS servers to find an answer if it can not process by itself&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Conditional Forwarders</title><link>https://sajalchoudhary.net/til/conditional-forwarders/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/conditional-forwarders/</guid><pubDate>Thu, 17 Oct 2024 11:55:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Forward specific DNS queries (for a domain) to external DNS servers, when it can&apos;t be solved internally.&lt;/li&gt;
&lt;li&gt;If forwarders are not responding, it will use root hints&lt;/li&gt;
&lt;li&gt;Uses recursive queries, which make resolution faster when compared to dns forwarders which use iterative query&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of DNS Zones</title><link>https://sajalchoudhary.net/til/types-of-dns-zones/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-dns-zones/</guid><pubDate>Thu, 17 Oct 2024 11:48:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Primary Zone&lt;ol&gt;
&lt;li&gt;R/W container&lt;/li&gt;
&lt;li&gt;Standard and AD-Integrated&lt;/li&gt;
&lt;li&gt;Only zones which can be edited&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Secondary Zone&lt;ol&gt;
&lt;li&gt;Keeps a RO copy of a primary zone&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Stub Zone&lt;ol&gt;
&lt;li&gt;RO copy of master zone but contains only NS and SOA [[202410171442 Types of DNS records|dns records]]&lt;/li&gt;
&lt;li&gt;Not a replacement of secondary zone&lt;/li&gt;
&lt;li&gt;Different from [[202410171455 Conditional Forwarders|conditional forwarders]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Reverse Lookup Zone&lt;ol&gt;
&lt;li&gt;Contains PTR [[202410171442 Types of DNS records|dns records]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of DNS records</title><link>https://sajalchoudhary.net/til/types-of-dns-records/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-dns-records/</guid><pubDate>Thu, 17 Oct 2024 11:42:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;SOA (Start of Authority)&lt;ol&gt;
&lt;li&gt;Created when a zone is created&lt;/li&gt;
&lt;li&gt;Has settings like TTL, Primary server, responsible person, Expires after, etc&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;A and AAAA (Host)&lt;ol&gt;
&lt;li&gt;Map FQDN to IP address&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;NS records&lt;ol&gt;
&lt;li&gt;List all authoritative DNS servers for the zone&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;MX (Mail exchanger)&lt;ol&gt;
&lt;li&gt;Specify MX server (Exchange or o365)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;CNAME (Canonical/Alias)&lt;/li&gt;
&lt;li&gt;PTR (Pointer)&lt;ol&gt;
&lt;li&gt;IP to FQDN&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;SRV &lt;ol&gt;
&lt;li&gt;Specify location of service&lt;/li&gt;
&lt;li&gt;Helps locate the nearest DC for example&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Split brain DNS</title><link>https://sajalchoudhary.net/til/split-brain-dns/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/split-brain-dns/</guid><pubDate>Tue, 15 Oct 2024 13:40:00 GMT</pubDate><content:encoded>&lt;p&gt;Depending on the source IP of the DNS request, DNS server provides different response.&lt;/p&gt;
&lt;p&gt;Used when a server has both public and private records.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Split-horizon_DNS#:~:text=In%20computer%20networking%2C%20split%2Dhorizon,address%20of%20the%20DNS%20request.&quot;&gt;Split-horizon DNS - Wikipedia&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>DNS data</title><link>https://sajalchoudhary.net/til/dns-data/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/dns-data/</guid><pubDate>Tue, 15 Oct 2024 13:14:00 GMT</pubDate><content:encoded>&lt;p&gt;In Windows server, DNS data is kept under &lt;code&gt;C:\Windows\System32\dns&lt;/code&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Get account last lockout time</title><link>https://sajalchoudhary.net/til/get-account-last-lockout-time/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/get-account-last-lockout-time/</guid><pubDate>Mon, 14 Oct 2024 08:54:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-ADUser &apos;accountname&apos; -Properties * | select accountexpirationdate, accountexpires, accountlockouttime, badlogoncount, padpwdcount, lastbadpasswordattempt, lastlogondate, lockedout, passwordexpired, passwordlastset, pwdlastset | format-list
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>sshd issues</title><link>https://sajalchoudhary.net/til/sshd-issues/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/sshd-issues/</guid><pubDate>Fri, 11 Oct 2024 11:43:00 GMT</pubDate><content:encoded>&lt;p&gt;Run the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PS C:\Windows\system32&amp;gt; sshd.exe
__PROGRAMDATA__\\ssh/sshd_config line 72: invalid quotes
__PROGRAMDATA__\\ssh/sshd_config: terminating, 1 bad configuration options



# For troubleshoot
PS C:\Windows\system32&amp;gt; sshd -ddd

# Version

PS C:\Windows\system32&amp;gt; sshd.exe -V
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>ssh</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to use certreq to create a cert request</title><link>https://sajalchoudhary.net/til/how-to-use-certreq-to-create-a-cert-request/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-use-certreq-to-create-a-cert-request/</guid><pubDate>Tue, 24 Sep 2024 10:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Sample inf file&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;[Version] 
Signature=&quot;$Windows NT$&quot;

[NewRequest]
Subject = &quot;CN=devname.fi.tcsecp.com&quot;
Exportable = TRUE
KeyLength = 2048
KeySpec = 1
KeyUsage = 0xf0
RequestType = PKCS10

[Extensions]
2.5.29.17 = &quot;{text}&quot;
_continue_ = &quot;dns=devname.fi.tcsecp.com&quot;

[RequestAttributes]
CertificateTemplate = WebServer
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Commands to submit request&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;
certreq -new request.inf certnew.req

**certreq -submit -config &quot;_&amp;lt;ServerName\CAName&amp;gt;_&quot; &quot;_&amp;lt;CertificateRequest.req&amp;gt;_&quot; &quot;_&amp;lt;CertificateResponse.cer&amp;gt;_&quot;**

certreq.exe -accept $CertPath
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Commands to export private key&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;
## Export private key
## Provide password for secure cert below before running
$SecurePass = &apos;TCSlogon98765&apos; | ConvertTo-SecureString -AsPlainText -Force
$CertToExport = Get-ChildItem -Path cert:\LocalMachine\My | Where-Object { $_.Subject -like &quot;*$Device*&quot; }
Export-PfxCertificate -Password $SecurePass -FilePath $CertPrivateKeyPath -Cert $CertToExport
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff625722(v=ws.10)&quot;&gt;How to Request a Certificate With a Custom SAN | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/add-san-to-secure-ldap-certificate&quot;&gt;Add SAN to secure Lightweight Directory Access Protocol (LDAP) certificate - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware set proxy</title><link>https://sajalchoudhary.net/til/vmware-set-proxy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-set-proxy/</guid><pubDate>Wed, 18 Sep 2024 11:58:00 GMT</pubDate><content:encoded>&lt;p&gt;We can not set &lt;strong&gt;noproxy&lt;/strong&gt; in VAMI UI. It needs to be set in config file located at&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/etc/sysconfig/proxy


# Example: NO_PROXY=&quot;www.me.de, do.main, localhost&quot;
NO_PROXY=&quot;localhost, 127.0.0.1, 10.47.*.*, *.tcsecp.com&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/370265/how-to-configure-proxy-settings-for-vcen.html&quot;&gt;How to configure Proxy Settings for vCenter Server (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Troubleshoot Entra Connect Issues</title><link>https://sajalchoudhary.net/til/troubleshoot-entra-connect-issues/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/troubleshoot-entra-connect-issues/</guid><pubDate>Mon, 16 Sep 2024 12:27:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
Import-Module ADSyncDiagnostics
Invoke-ADSyncDiagnostics -PasswordSync
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Example&lt;/h1&gt;
&lt;p&gt;Issue when password hash synchronization was set as Disabled and Entra connect health was in error state after [[202408271224 Migrate Entra Connect DB|Migrate Entra Connect DB]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PS C:\Program Files\Microsoft Azure Active Directory Connect&amp;gt; Invoke-ADSyncDiagnostics -PasswordSync
Staging mode is enabled. Password Hash Synchronization does not work when staging mode is enabled.
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-connect-password-hash-synchronization#no-passwords-are-synchronized-troubleshoot-by-using-the-diagnostic-cmdlet&quot;&gt;Troubleshoot password hash synchronization with Microsoft Entra Connect Sync - Microsoft Entra ID | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Connect PS Module</title><link>https://sajalchoudhary.net/til/entra-connect-ps-module/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-connect-ps-module/</guid><pubDate>Mon, 16 Sep 2024 12:05:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# ADSYncTOols
Import-module -Name &quot;C:\Program Files\Microsoft Azure Active Directory Connect\Tools\AdSyncTools&quot;

# Health Agent modules

#Under the following path 
# C:\Program Files\Microsoft Azure AD Connect Health Agent\Modules\

Import-Module &apos;C:\Program Files\Microsoft Azure AD Connect Health Agent\Modules\AdHealthConfiguration\AdHealthConfiguration.psd1&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Disable SMBv1 on Windows</title><link>https://sajalchoudhary.net/til/disable-smbv1-on-windows/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/disable-smbv1-on-windows/</guid><pubDate>Mon, 16 Sep 2024 09:36:00 GMT</pubDate><content:encoded>&lt;h1&gt;Remove SMB v1&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# Detect
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

# Disable
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# SMB v1
# Detect 
Get-SmbServerConfiguration | Select EnableSMB1Protocol

# Disable
Set-SmbServerConfiguration -EnableSMB1Protocol $false
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3?tabs=server&quot;&gt;How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware esxi unable to reach DNS</title><link>https://sajalchoudhary.net/til/vmware-esxi-unable-to-reach-dns/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-esxi-unable-to-reach-dns/</guid><pubDate>Wed, 11 Sep 2024 16:20:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Check that DNS configuration is correct.&lt;/li&gt;
&lt;li&gt;In dcui view, test management network, whether dns resolution works or not&lt;/li&gt;
&lt;li&gt;Check the firewall configuration for dns. It needs to be selected in rules, then it will be enabled.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ESXi set syslog</title><link>https://sajalchoudhary.net/til/esxi-set-syslog/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/esxi-set-syslog/</guid><pubDate>Thu, 05 Sep 2024 08:17:00 GMT</pubDate><content:encoded>&lt;p&gt;Syslog.global.logDir --&amp;gt; Location where logs will be set&lt;br /&gt;Syslog.global.logHost --&amp;gt; remote servers where logs are sent using the syslog protocol&lt;br /&gt;slog.global.logDirUnique --&amp;gt; bool/whether unique directory will be created in logDir or not&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/318939/configuring-syslog-on-esxi.html&quot;&gt;Configuring syslog on ESXi (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell measure script execution time</title><link>https://sajalchoudhary.net/til/powershell-measure-script-execution-time/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-measure-script-execution-time/</guid><pubDate>Wed, 04 Sep 2024 11:19:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Use measure=command

Measure-Command {(Get-ChildItem -Recurse).Count}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Delete vCLS VMs from ESXI</title><link>https://sajalchoudhary.net/til/delete-vcls-vms-from-esxi/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/delete-vcls-vms-from-esxi/</guid><pubDate>Wed, 04 Sep 2024 07:33:00 GMT</pubDate><content:encoded>&lt;p&gt;Useful when trying to remove datastore from ESXi and the vCLS VM is running on it. &lt;/p&gt;
&lt;p&gt;Putting esxi in MM just shuts off the VM and not delete it.&lt;/p&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Change vCLS Mode to Retreat mode instead of&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Resource Lock</title><link>https://sajalchoudhary.net/til/azure-resource-lock/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-resource-lock/</guid><pubDate>Mon, 02 Sep 2024 10:26:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Azure Locks can be applied at [[202404061212 Azure Resources|resource]], [[202404051818 Resource Groups|resource group]] or [[202401101441 Azure subscriptions|subscription]] level&lt;ol&gt;
&lt;li&gt;No lock at [[202404051803 Management groups|management group]] level&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;inherited&lt;ol&gt;
&lt;li&gt;all child resources get the same lock&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Types:&lt;ol&gt;
&lt;li&gt;Ready Only - can not delete or update anything / similar to reader [[202404061316 Azure Roles|role]]&lt;/li&gt;
&lt;li&gt;Delete - can read/modify but can not delete a resource&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/azure-resource-manager/management/lock-resources?tabs=json&quot;&gt;Lock resources&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>management</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to assign licenses in Entra</title><link>https://sajalchoudhary.net/til/how-to-assign-licenses-in-entra/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-assign-licenses-in-entra/</guid><pubDate>Wed, 28 Aug 2024 16:30:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202312231437 Entra ID editions|Entra ID Licenses]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202401101139 Entra ID users|Entra ID user]] can be assigned licenses from multiple places&lt;ul&gt;
&lt;li&gt;End result is sum of all licenses&lt;/li&gt;
&lt;li&gt;if same license is applied from multiple places, license is consumed once&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Licenses can be assigned to dynamic [[202312242245 Entra ID Groups|entra groups]]&lt;ul&gt;
&lt;li&gt;however if rule is changed then removed users lose the licenses&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Not possible to delete a [[202312242245 Entra ID Groups|entra group]] which has [[202312231437 Entra ID editions|Entra ID Licenses]] applied to it&lt;/li&gt;
&lt;li&gt;Can delete a user who has [[202312231437 Entra ID editions|Entra ID Licenses]] applied&lt;/li&gt;
&lt;li&gt;Licenses only apply to following&lt;ul&gt;
&lt;li&gt;Security groups&lt;/li&gt;
&lt;li&gt;M365 groups with securityEnabled=TRUE&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Licenses only apply to first level for nested groups. so only direct members in a [[202312242245 Entra ID Groups|entra group]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Go to Entra Admin Center.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Identity&lt;/strong&gt; &amp;gt; &lt;strong&gt;Billing&lt;/strong&gt; &amp;gt; &lt;strong&gt;Licenses&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select License and click Assign.&lt;/li&gt;
&lt;li&gt;Select [[202401101139 Entra ID users|Entra ID user]] or [[202312242245 Entra ID Groups|entra group]] and assign.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/fundamentals/license-users-groups&quot;&gt;How to assign licenses to users&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/fundamentals/concept-group-based-licensing&quot;&gt;Group based licensing&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/users/licensing-group-advanced&quot;&gt;Limitations and issues&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Add custom domain to Entra ID</title><link>https://sajalchoudhary.net/til/add-custom-domain-to-entra-id/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/add-custom-domain-to-entra-id/</guid><pubDate>Wed, 28 Aug 2024 16:22:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Have a custom domain registered with a registrar&lt;/li&gt;
&lt;li&gt;Add a custom domain in [[202404011327 Entra ID|Entra ID]]&lt;/li&gt;
&lt;li&gt;Create a custom record with the registrar &lt;ol&gt;
&lt;li&gt;Entra only supports MX or TXT records&lt;/li&gt;
&lt;li&gt;Also useful for [[202407271215 Create Azure DNS zone and records|Create Azure DNS zone and records]]/[[202404141450 Azure DNS|Azure DNS]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;After the above is done, come back to [[202404011327 Entra ID|Entra ID]] and verify&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/fundamentals/add-custom-domain&quot;&gt;Add custom Domain&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>entra</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID tenant</title><link>https://sajalchoudhary.net/til/entra-id-tenant/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-tenant/</guid><pubDate>Wed, 28 Aug 2024 16:18:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Dedicated and Trusted instance of [[202404011327 Entra ID|Entra ID]]&lt;/li&gt;
&lt;li&gt;Created automatically when org signs up for MSFT digital subscription&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/fundamentals/create-new-tenant&quot;&gt;Create a tenant&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>identity</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Bastion</title><link>https://sajalchoudhary.net/til/azure-bastion/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-bastion/</guid><pubDate>Wed, 28 Aug 2024 13:50:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Allows RDP/SSH connectivity to your virtual machines directly over TLS from portal or from clients on our machines&lt;/li&gt;
&lt;li&gt;Can access [[202404161835 Azure VM Basics|Azure VM]] using their [[202407281228 Azure Private IP Address|Azure Private IP Address]] so no need to assign [[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]]&lt;/li&gt;
&lt;li&gt;No need to manage [[202404141419 Network Security Groups|NSG]] each time we add a VM&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;SKUs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Developer &lt;ul&gt;
&lt;li&gt;No access to peered [[202404121703 Azure VNet|VNets]]&lt;/li&gt;
&lt;li&gt;Connect linux vm with SSH&lt;/li&gt;
&lt;li&gt;connect windows VM with RDP&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Basic&lt;ul&gt;
&lt;li&gt;Connect linux vm with SSH&lt;/li&gt;
&lt;li&gt;connect windows VM with RDP&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Standard &lt;ul&gt;
&lt;li&gt;In addition to above, connect Linux VM with RDP and Windows VM with SSH&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Premium&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Subnet Requirements&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;need to create a subnet in vnet with name ‘AzureBastionSubnet’&lt;/li&gt;
&lt;li&gt;Subnet size must be /26 or larger (/24,/25, etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/bastion/bastion-overview&quot;&gt;Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Connect Password hash synchronization skipped in last 120 minutes</title><link>https://sajalchoudhary.net/til/entra-connect-password-hash-synchronization-skipped-in-last-120-minutes/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-connect-password-hash-synchronization-skipped-in-last-120-minutes/</guid><pubDate>Mon, 26 Aug 2024 08:24:00 GMT</pubDate><content:encoded>&lt;p&gt;Need to restart Microsoft Entra Sync service. &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/entra/identity/hybrid/connect/how-to-connect-health-alert-catalog&quot;&gt;Microsoft Entra Connect Health - Alert Catalog - Microsoft Entra ID | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entraconnect</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create P2S VPN</title><link>https://sajalchoudhary.net/til/how-to-create-p2s-vpn/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-create-p2s-vpn/</guid><pubDate>Sat, 24 Aug 2024 09:55:00 GMT</pubDate><content:encoded>&lt;p&gt;How it differs from [[202408241251 How to create S2S VPN|S2S VPN]] is around authentication.&lt;br /&gt;There are three types basically:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal&quot;&gt;Certificate authentication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-entra-gateway&quot;&gt;Microsoft Entra ID authentication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-how-to-radius-ps&quot;&gt;RADIUS authentication&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Certificate Authentication&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#createvnet&quot;&gt;Create a VNet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#create-a-gateway-subnet&quot;&gt;Create a gateway subnet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#creategw&quot;&gt;Create the VPN gateway&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#generatecert&quot;&gt;Generate certificates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#addresspool&quot;&gt;Add the address pool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#type&quot;&gt;Specify tunnel and authentication type&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#publicip3&quot;&gt;Additional IP address&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#uploadfile&quot;&gt;Upload root certificate public key information&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#profile-files&quot;&gt;Generate VPN client profile configuration files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#clientconfig&quot;&gt;Configure VPN clients and connect to Azure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#verify&quot;&gt;Verify your connection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal#connectVM&quot;&gt;Connect to a virtual machine&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-point-to-site-resource-manager-portal&quot;&gt;MS Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create S2S VPN</title><link>https://sajalchoudhary.net/til/how-to-create-s2s-vpn/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-create-s2s-vpn/</guid><pubDate>Sat, 24 Aug 2024 09:51:00 GMT</pubDate><content:encoded>&lt;p&gt;From [[202408241243 How to create a VPN Gateway|How to create a VPN Gateway]], till VPN Gateway and then the rest.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a [[202404121703 Azure VNet|VNet]].&lt;/li&gt;
&lt;li&gt;Create a [[202407151913 Azure VPN|Azure VPN Gateway]] subnet&lt;/li&gt;
&lt;li&gt;Create a [[202407151913 Azure VPN|Azure VPN Gateway]].&lt;/li&gt;
&lt;li&gt;Create a local network gateway.&lt;/li&gt;
&lt;li&gt;Configure VPN device&lt;/li&gt;
&lt;li&gt;Create a VPN connection.&lt;/li&gt;
&lt;li&gt;Verify the connection.&lt;/li&gt;
&lt;li&gt;Connect to a virtual machine.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal&quot;&gt;Create S2S VPN&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create a VPN Gateway</title><link>https://sajalchoudhary.net/til/how-to-create-a-vpn-gateway/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-create-a-vpn-gateway/</guid><pubDate>Sat, 24 Aug 2024 09:43:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202407151913 Azure VPN|Azure VPN]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;Create a Gateway Subnet&lt;ol&gt;
&lt;li&gt;/27 or larger (/24, /25, etc.)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Create a VPN Gateway&lt;ol&gt;
&lt;li&gt;Search for Virtual Network Gateway&lt;/li&gt;
&lt;li&gt;Fill out details and create&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-create-gateway-portal&quot;&gt;Create VPN Gateway&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to assign licenses to user or group in Azure</title><link>https://sajalchoudhary.net/til/how-to-assign-licenses-to-user-or-group-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-assign-licenses-to-user-or-group-in-azure/</guid><pubDate>Thu, 22 Aug 2024 18:40:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Licenses can be applied to security or M365 [[202312242245 Entra ID Groups|groups]]&lt;ol&gt;
&lt;li&gt;M365 [[202312242245 Entra ID Groups|groups]] must be security enabled&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/fundamentals/license-users-groups?context=azure%2Factive-directory%2Fusers-groups-roles%2Fcontext%2Fugr-context&quot;&gt;MS Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>azcopy</title><link>https://sajalchoudhary.net/til/azcopy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azcopy/</guid><pubDate>Wed, 21 Aug 2024 14:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Auth&lt;/h1&gt;
&lt;p&gt;Files - SAS only&lt;br /&gt;Blob- Azure AD and SAS only &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Window cluster dns registration issue</title><link>https://sajalchoudhary.net/til/window-cluster-dns-registration-issue/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/window-cluster-dns-registration-issue/</guid><pubDate>Mon, 19 Aug 2024 11:42:00 GMT</pubDate><content:encoded>&lt;h1&gt;Error&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;Cluster network name resource ‘Cluster Name’ failed registration of one or more associated DNS name(s) for the following reason: DNS bad key.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Cluster object OK. Cluster role also OK. DNS entry not present.&lt;/p&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;p&gt;Checked the NIC. No issues there.&lt;br /&gt;Unchecked register DNS option.&lt;br /&gt;Close the network config.&lt;br /&gt;Go again and recheck it.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Convert cis pdf to csv</title><link>https://sajalchoudhary.net/til/convert-cis-pdf-to-csv/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/convert-cis-pdf-to-csv/</guid><pubDate>Fri, 16 Aug 2024 13:19:00 GMT</pubDate><content:encoded>&lt;p&gt;The script that work is this: &lt;a href=&quot;https://github.com/serenedeluge/cis-pdf2csv/tree/main&quot;&gt;https://github.com/serenedeluge/cis-pdf2csv/tree/main&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The pdf needs to be title input.txt. Save pdf as text then rename it as input.txt and voila!&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>python</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Restore VM from Azure backup</title><link>https://sajalchoudhary.net/til/restore-vm-from-azure-backup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/restore-vm-from-azure-backup/</guid><pubDate>Tue, 13 Aug 2024 16:29:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202408131927 Azure restore from backup|Restore from backups]]&lt;/p&gt;
&lt;h1&gt;Restore Options&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create a new VM&lt;/li&gt;
&lt;li&gt;Restore disk&lt;ol&gt;
&lt;li&gt;A template is generated where we can specify VM settings.&lt;ol&gt;
&lt;li&gt;Disks are copied to the RG we specify&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Or, attach the disk to existing VM, or create a new VM using powershell and attach the disk to it.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Replace existing disk on existing VM&lt;ol&gt;
&lt;li&gt;After replace original disk is retained and can be deleted manually&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms&quot;&gt;Restore VM&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure restore from backup</title><link>https://sajalchoudhary.net/til/azure-restore-from-backup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-restore-from-backup/</guid><pubDate>Tue, 13 Aug 2024 16:27:00 GMT</pubDate><content:encoded>&lt;p&gt;We can either:&lt;br /&gt;[[202408131919 Restore files from Azure backup|Restore files from Azure backup]]&lt;br /&gt;[[202408131929 Restore VM from Azure backup|Restore VM from Azure backup]]&lt;/p&gt;
&lt;p&gt;![[Screenshot 2024-08-13 at 7.21.49 PM.png]]&lt;/p&gt;
&lt;p&gt;So, for VMs deployed with the [[202404061212 Azure Resources|Azure Resource Manager]] deployment, for un-encrypted disk, we can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Restore an entire VM to original or alternate location&lt;/li&gt;
&lt;li&gt;Restore disks&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/backup/about-azure-vm-restore&quot;&gt;About Azure VM restore&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Restore files from Azure backup</title><link>https://sajalchoudhary.net/til/restore-files-from-azure-backup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/restore-files-from-azure-backup/</guid><pubDate>Tue, 13 Aug 2024 16:19:00 GMT</pubDate><content:encoded>&lt;p&gt;![[Screenshot 2024-08-13 at 7.21.49 PM.png]]&lt;/p&gt;
&lt;h1&gt;Process&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Specify a recovery point and download the script in [[202312231415 Azure Master|Azure]] portal.&lt;/li&gt;
&lt;li&gt;Execute the script.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Requirements for file restore&lt;/h2&gt;
&lt;h3&gt;OS&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;OS must be matching server or client OS for Windows.&lt;/li&gt;
&lt;li&gt;For linux, specific version requirements&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/backup/backup-azure-restore-files-from-vm&quot;&gt;Restore files&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/backup/about-azure-vm-restore&quot;&gt;About Azure VM restore&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Download inventory from Ansible Automation Platform</title><link>https://sajalchoudhary.net/til/download-inventory-from-ansible-automation-platform/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/download-inventory-from-ansible-automation-platform/</guid><pubDate>Tue, 13 Aug 2024 11:48:00 GMT</pubDate><content:encoded>&lt;p&gt;We have to use this api:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/api/v2/inventories/{id}/script/

# Where id is the id of the inventory
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><category>aap</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create powershell offline repo</title><link>https://sajalchoudhary.net/til/create-powershell-offline-repo/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-powershell-offline-repo/</guid><pubDate>Mon, 12 Aug 2024 13:10:00 GMT</pubDate><content:encoded>&lt;p&gt;Fastest way to install modules on disconnected servers is [[202210111009 Powershell install modules offline|Install powershell modules]].&lt;/p&gt;
&lt;p&gt;A better way is to create an offline repo and use it to install the modules.&lt;/p&gt;
&lt;p&gt;There are two types of offline repos:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;nuget based&lt;/li&gt;
&lt;li&gt;fileshare based&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This will details steps for file share based offline repo.&lt;/p&gt;
&lt;h1&gt;Install powershellget&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Save OfflinePowerShellGetDeploy&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# Save OfflinePowerShellGetDeploy to system which has internet access

Save-Module -Name OfflinePowerShellGetDeploy -Path C:\Users\845874\Downloads\PowerShellGet
Import-Module C:\Users\845874\Downloads\PowerShellGet\OfflinePowerShellGetDeploy


Save-PowerShellGetForOffline -LocalFolder &apos;C:\Users\845874\Downloads\PowerShellGet\OfflinePowerShellGet&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy this folder to the disconnected system.&lt;/li&gt;
&lt;li&gt;Install OfflinePowerShellGetDeploy&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Import-Module .\OfflinePowerShellGetDeploy
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# Register a file share on my local machine 

$registerPSRepositorySplat = @{ 
	Name = &apos;LocalPSRepo&apos; 
	SourceLocation = &apos;\\localhost\PSRepoLocal\&apos; 
	ScriptSourceLocation = &apos;\\localhost\PSRepoLocal\&apos; 
	InstallationPolicy = &apos;Trusted&apos; 
}

Register-PSRepository @registerPSRepositorySplat
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/gallery/how-to/working-with-local-psrepositories?view=powershellget-3.x&quot;&gt;Working with local PSRepositories - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Increase memory allocated to VMware services</title><link>https://sajalchoudhary.net/til/increase-memory-allocated-to-vmware-services/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/increase-memory-allocated-to-vmware-services/</guid><pubDate>Mon, 12 Aug 2024 10:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Error&lt;/h1&gt;
&lt;p&gt;PowerShell gives error when running tag related cmdlets&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Get-Tag com.vmware.vapi.std.errors.operation_not_found {&apos;messages&apos;: [com.vmware.vapi.std.localizable_message {&apos;id&apos;: vapi.method.input.invalid.interface, &apos;default_message&apos;: Cannot find service &apos;com.vmware.cis.data.svc.resource_model&apos;., &apos;args&apos;: [com.vmware.cis.data.svc.resource_model]}], &apos;data&apos;:}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# Get the current memory allocation value for the vmware-infraprofile service:
cloudvm-ram-size -l | grep vmware-infraprofile
    
# Increase the memory allocated to the infraprofile service: 
cloudvm-ram-size -C _&amp;lt;newMemValue&amp;gt;_ vmware-infraprofile 
    
# Confirm the new memory allocation value:
cloudvm-ram-size -l | grep vmware-infraprofile
    
# Restart the infraprofile service:
service-control --stop vmware-infraprofile &amp;amp;&amp;amp; service-control --start vmware-infraprofile
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/316636/gettagassignments-and-getspbmstoragepoli.html&quot;&gt;get-tagassignments and get-spbmstoragepolicy powerCLI commands fail with error com.vmware.vapi.std.errors.unauthenticated (broadcom.com)&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cause&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When a client (powercli) makes a call to the vapi-endpoint&apos;s introspection service (the com.vmware.vapi.std.introspection.provider vapi service), the vapi-endpoint on its turn makes calls to the introspection service of all the vapi providers behind, including the &quot;infraprofile&quot; vapi provider. We make that call in this release through the sidecar proxy at localhost:1080/infraprofile.&lt;/li&gt;
&lt;li&gt;The infraprofile service though is not in a healthy state. In fact it is a zombie because it has failed with an Out Of Memory error earlier and does not respond to the requests.&lt;br /&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/320871/manually-increasing-the-heap-memory-on-v.html&quot;&gt;Manually increasing the heap memory on vCenter Server components in vCenter 6.x / 7.x (broadcom.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create activity log alerts in Azure</title><link>https://sajalchoudhary.net/til/create-activity-log-alerts-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-activity-log-alerts-in-azure/</guid><pubDate>Sun, 11 Aug 2024 09:55:00 GMT</pubDate><content:encoded>&lt;p&gt;Alerting can be enabled for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;specific actions (example: vm deleted, adding new rules to users)&lt;/li&gt;
&lt;li&gt;service health events&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/incident-response-with-alerting-on-azure/6-activity-log-alerts&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;activity log alerts have their own attributes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Category&lt;/strong&gt;: Administrative, service health, autoscale, policy, or recommendation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scope&lt;/strong&gt;: Resource level, resource group level, or subscription level&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource group&lt;/strong&gt;: Where the alert rule is saved&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource type&lt;/strong&gt;: Namespace for the target of the alert&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operation name&lt;/strong&gt;: Operation name&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Level&lt;/strong&gt;: Verbose, informational, warning, error, or critical&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Status&lt;/strong&gt;: Started, failed, or succeeded&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event initiated by&lt;/strong&gt;: Email address or Microsoft Entra identifier (known as the &quot;caller&quot;) for the user&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create a log alert in Azure</title><link>https://sajalchoudhary.net/til/create-a-log-alert-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-a-log-alert-in-azure/</guid><pubDate>Sun, 11 Aug 2024 09:49:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;first define a log search rule&lt;/li&gt;
&lt;li&gt;when it evaluates as positive, an alert is triggered&lt;/li&gt;
&lt;li&gt;these are stateless, so everytime threshold is breached it will create an alert regardless of whether alert was created already&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;How to trigger&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Number of logs&lt;ul&gt;
&lt;li&gt;When a certain number of logs are generated, trigger an alert&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Metric measurement (similar to [[202408111240 Create an Azure metric alert|Create an azure metric alert]])&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/incident-response-with-alerting-on-azure/5-log-alerts&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Log alerts behave in a slightly different way than other alert mechanisms. The first part of a log alert defines the log search rule. The rule defines how often it should run, the time period under evaluation, and the query to be run.&lt;br /&gt;When a log search evaluates as positive, it creates an alert record and triggers any associated actions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Log search components:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Log query&lt;/strong&gt;: Query that runs every time the alert rule fires&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Time period&lt;/strong&gt;: Time range for the query&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Frequency&lt;/strong&gt;: How often the query should run&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Threshold&lt;/strong&gt;: Trigger point for an alert to be created&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create an Azure metric alert</title><link>https://sajalchoudhary.net/til/create-an-azure-metric-alert/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-an-azure-metric-alert/</guid><pubDate>Sun, 11 Aug 2024 09:40:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;az monitor metrics alert create -n &quot;Cpu80PercentAlert&quot; --resource-group &quot;learn-d04808ef-bd4c-4ae1-b331-0aef3cb9b52b&quot; --scopes $VMID --condition &quot;max percentage CPU &amp;gt; 80&quot; --description &quot;Virtual machine is running at or greater than 80% CPU utilization&quot; --evaluation-frequency 1m --window-size 1m --severity 3
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-rule-cli-powershell-arm&quot;&gt;MS Docs&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/az.monitor/add-azmetricalertrulev2?view=azps-12.2.0&quot;&gt;MS Docs metric rule&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Create metric rule&lt;br /&gt;Add-AzMetricAlertRuleV2&lt;br /&gt;To disable:&lt;br /&gt;Add-AzMetricAlertRuleV2 -DisableRule&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To create a log search alert rule using PowerShell, use the &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azscheduledqueryrule&quot;&gt;New-AzScheduledQueryRule&lt;/a&gt; cmdlet.&lt;/li&gt;
&lt;li&gt;To create an activity log alert rule using PowerShell, use the &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/az.monitor/new-azactivitylogalert&quot;&gt;New-AzActivityLogAlert&lt;/a&gt; cmdlet.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Monitor Alerts</title><link>https://sajalchoudhary.net/til/azure-monitor-alerts/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-monitor-alerts/</guid><pubDate>Sun, 11 Aug 2024 09:24:00 GMT</pubDate><content:encoded>&lt;p&gt;We can use the [[202408041409 Types of monitoring data in Azure|Types of monitoring data in Azure]] collected in [[202404281601 Azure monitoring old|Azure monitoring]] to create alerts.&lt;/p&gt;
&lt;p&gt;Three types of data can be used for alerts:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Metrics - [[202408111240 Create an Azure metric alert|Create an azure metric alert]]&lt;/li&gt;
&lt;li&gt;Activity logs (When state changes for an [[202404061212 Azure Resources|Azure resource]])&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Alerts are created based on rules.&lt;br /&gt;When an alert is triggered it is in fired state.&lt;br /&gt;When it is fixed, it is in resolved state.&lt;/p&gt;
&lt;p&gt;Action groups define what happens after alert is triggered.&lt;br /&gt;once an action group is created it can be added to multiple alerts.&lt;br /&gt;Use alert processing rules to override common behaviours.&lt;/p&gt;
&lt;h1&gt;Rule components&lt;/h1&gt;
&lt;p&gt;Resource&lt;br /&gt;Condition&lt;br /&gt;Actions&lt;br /&gt;Alert Details (Including severity)&lt;/p&gt;
&lt;h1&gt;Limits&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Not more than 1 call/sms every five minutes&lt;/li&gt;
&lt;li&gt;Not more than 100 emails per hour&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/incident-response-with-alerting-on-azure/2-explore-azure-monitor-alert-types&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/incident-response-with-alerting-on-azure/7-actions-and-alert-processing-rules&quot;&gt;MS Learn - action groups&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell rename cluster resource</title><link>https://sajalchoudhary.net/til/powershell-rename-cluster-resource/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-rename-cluster-resource/</guid><pubDate>Thu, 08 Aug 2024 12:17:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Get all resources
Get-ClusterResource

Name                                      State  OwnerGroup        ResourceType   
----                                      -----  ----------        ------------   
Cluster Disk 1                            Online Available Storage Physical Disk  
Cluster Disk 2                            Online Cluster Group     Physical Disk  
Cluster IP Address                        Online Cluster Group     IP Address     
Cluster Name                              Online Cluster Group     Network Name   
GxClusPlugIn (OCIWPFSRCL02) (Instance001) Online Cluster Group     Generic Service

# Get resource you want to rename
Get-ClusterResource -Name &apos;Cluster Disk 2&apos;

Name           State  OwnerGroup    ResourceType 
----           -----  ----------    ------------ 
Cluster Disk 2 Online Cluster Group Physical Disk


# Rename
(Get-ClusterResource -Name &apos;Cluster Disk 2&apos;).Name=&apos;Quorum Disk&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/failover-clustering/powershell-for-failover-clustering-let-8217-s-rename-a-few/ba-p/371514&quot;&gt;PowerShell for Failover Clustering: Let’s Rename a Few Things - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create scale out file server</title><link>https://sajalchoudhary.net/til/how-to-create-scale-out-file-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-create-scale-out-file-server/</guid><pubDate>Thu, 08 Aug 2024 09:35:00 GMT</pubDate><content:encoded>&lt;p&gt;How to create [[202407161044 Scale out file server|Scale out file server]] on Windows core.&lt;/p&gt;
&lt;p&gt;There are 2 ways to do it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Through admin center, or&lt;/li&gt;
&lt;li&gt;Through powershell&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# On both nodes install file services and failover clustering
Add-WindowsFeature –name File-Services,Failover-Clustering -IncludeManagementTools
Add-WindowsFeature –name File-Services -IncludeManagementTools

# Test
Test-Cluster –Node 5ociwpfsrap02 , 7ociwpfsrap01 

# Create cluster
New-Cluster –Name JUMPUPDCLUSTER –Node 5ociwpfsrap02 , 7ociwpfsrap01 

# Add csv
Add-ClusterSharedVolume &quot;ClusterDiskUPD&quot;

# Add sofs ensure cluster object has create computer object permission on the ou
Add-ClusterScaleOutFileServerRole -Name JUMPUPD -Cluster JUMPUPDCLUSTER

# Create folder inside csv/shares path
New-Item -Name &quot;JUMPUPD2019&quot; -ItemType Directory

# Setup shares
New-SmbShare -Name &quot;JUMPUPD2019&quot; -Path &quot;C:\ClusterStorage\Volume1\Shares\JUMPUPD2019&quot; -FullAccess OP\GT-5ociwpfsrap02-ADM,OP\GT-7ociwpfsrap01-ADM,GT-JUMPUPD-Full
Set-SmbPathAcl –ShareName JUMPUPD2022
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Network Watcher</title><link>https://sajalchoudhary.net/til/azure-network-watcher/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-network-watcher/</guid><pubDate>Thu, 08 Aug 2024 05:00:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;regional service (1 per region per subscription)&lt;/li&gt;
&lt;li&gt;provides tools to do network related troubleshooting&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Network Watcher provides three types of tools&lt;/h1&gt;
&lt;h2&gt;Monitoring&lt;/h2&gt;
&lt;h3&gt;Topology&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;for looking at entire NW config&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Connection Monitor&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;provides end-to-end monitoring between Azure and hybrid endpoints&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To start using Connection monitor for monitoring, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#install-monitoring-agents&quot;&gt;Install monitoring agents&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#enable-network-watcher-on-your-subscription&quot;&gt;Enable Network Watcher on your subscription&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#create-a-connection-monitor&quot;&gt;Create a connection monitor&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#analyze-monitoring-data-and-set-alerts&quot;&gt;Analyze monitoring data and set alerts&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview#diagnose-issues-in-your-network&quot;&gt;Diagnose issues in your network&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Network Diagnostic Tools&lt;/h2&gt;
&lt;h3&gt;IP flow verify&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;detect traffic filtering issues at a virtual machine level.&lt;/li&gt;
&lt;li&gt;tells which [[202404141419 Network Security Groups|NSG]] or rule allowed or denied traffic&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;NSG diagnostics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;detect traffic filtering issues at a [[202404161835 Azure VM Basics|Azure VM]], [[202404181846 Azure VM scale sets|VMSS]], or [[202407271353 Azure Application Gateway|Azure Application Gateway]] level&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Next hop&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;detect routing issues&lt;/li&gt;
&lt;li&gt;what is the next hop (type, ip, route-table ID)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Effective security rules&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;shows [[202404141419 Network Security Groups|NSG]] rules applied at the [[202404121727 Azure VM NIC|VM NIC]]&lt;/li&gt;
&lt;li&gt;shows rules applied at the subnet level&lt;/li&gt;
&lt;li&gt;and aggregate of the two&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Connection troubleshoot&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;test a connection between a virtual machine, a virtual machine scale set, an application gateway, or a Bastion host and a virtual machine, an FQDN, a URI, or an IPv4 address&lt;/li&gt;
&lt;li&gt;similar to connection monitor but this is point in time whereas monitor is over a duration&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Packet capture&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;remotely create packet capture sessions to track traffic to and from a virtual machine (VM) or a virtual machine scale set&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;VPN troubleshoot&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;troubleshoot virtual network gateways and their connections&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Traffic&lt;/h2&gt;
&lt;h3&gt;Flow Logs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;NSG flow logs&lt;ul&gt;
&lt;li&gt;sent to [[202404091847 Azure Storage Overview|Azure storage]] from where it can be exported&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;VNET flow logs&lt;ul&gt;
&lt;li&gt;log traffic flowing through [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;sent to [[202404091847 Azure Storage Overview|Azure storage]] from where it can be exported&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Traffic Analytics&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;provides rich visualizations of flow logs data&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-network-watcher/2-describe-features&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-overview&quot;&gt;MS Docs - Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Log Analytics Workspace</title><link>https://sajalchoudhary.net/til/azure-log-analytics-workspace/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-log-analytics-workspace/</guid><pubDate>Wed, 07 Aug 2024 05:03:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;like a container for logs being collected by [[202408070754 Azure Log Analytics|Azure Log Analytics]]&lt;/li&gt;
&lt;li&gt;can send logs from [[202404061212 Azure Resources|azure resources]] to one or multiple workspaces.&lt;/li&gt;
&lt;li&gt;it does not matter [[202404061212 Azure Resources|resource]] belongs to which region&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Log Analytics</title><link>https://sajalchoudhary.net/til/azure-log-analytics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-log-analytics/</guid><pubDate>Wed, 07 Aug 2024 04:54:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;a tool in [[202408041224 Azure Monitoring|Azure Monitoring]] to run queries on collected logs&lt;/li&gt;
&lt;li&gt;supports KQL&lt;/li&gt;
&lt;li&gt;we can get estimation from [[202312231415 Azure Master|Azure]] regarding how long it would take to patch a server from crowd-sourced data.&lt;/li&gt;
&lt;li&gt;Implicitly it has scopes:&lt;ul&gt;
&lt;li&gt;like on a vm we can go and check under Logs tag&lt;/li&gt;
&lt;li&gt;on a [[202404051818 Resource Groups|resource group]] we can go and check logs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Explicitly we have scope picker in [[202408070803 Azure Log Analytics Workspace|Azure Log Analytics Workspace]] or under Logs tab under a [[202404061212 Azure Resources|resource]]&lt;/li&gt;
&lt;li&gt;We can query across [[202408070803 Azure Log Analytics Workspace|Azure Log Analytics Workspace]]&lt;/li&gt;
&lt;li&gt;pricing is pay-as-you-go&lt;/li&gt;
&lt;li&gt;Log data is organised in tables&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-log-analytics/2-determine-uses&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://azure.microsoft.com/explore/global-infrastructure/products-by-region/&quot;&gt;Regions that support&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Clear recycle bin for all users</title><link>https://sajalchoudhary.net/til/clear-recycle-bin-for-all-users/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/clear-recycle-bin-for-all-users/</guid><pubDate>Mon, 05 Aug 2024 08:32:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Clear-RecycleBin -DriveLetter C
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/clear-recyclebin?view=powershell-7.4&quot;&gt;Clear-RecycleBin (Microsoft.PowerShell.Management) - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of monitoring data in Azure</title><link>https://sajalchoudhary.net/til/types-of-monitoring-data-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-monitoring-data-in-azure/</guid><pubDate>Sun, 04 Aug 2024 11:09:00 GMT</pubDate><content:encoded>&lt;p&gt;Basically two types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Metrics - numeric, point-in-time values&lt;/li&gt;
&lt;li&gt;Logs - different data, events, traces, etc&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Monitoring</title><link>https://sajalchoudhary.net/til/azure-monitoring/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-monitoring/</guid><pubDate>Sun, 04 Aug 2024 09:24:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Monitoring is available for all [[202404061212 Azure Resources|azure resources]]&lt;ul&gt;
&lt;li&gt;usually a tab&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Monitoring starts whenever a resource is created in a subscription&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Components&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	Source --&amp;gt; DataStores --&amp;gt; AzureMonitorInsights
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Source&lt;/h2&gt;
&lt;p&gt;Collection of data across the following tiers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;Guest OS&lt;/li&gt;
&lt;li&gt;[[202404061212 Azure Resources|Azure resource]]&lt;/li&gt;
&lt;li&gt;[[202401101441 Azure subscriptions|Azure subscription]] (Activity log - stored for 90 days)&lt;/li&gt;
&lt;li&gt;Tenant (Services like [[202312231420 Microsoft Entra|Entra]])&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Data Stores&lt;/h2&gt;
&lt;p&gt;Azure Monitor Metrics&lt;br /&gt;Azure Monitor Logs&lt;/p&gt;
&lt;h1&gt;Azure Monitor Insights&lt;/h1&gt;
&lt;p&gt;Insights performs different functions with the collected data:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Insights&lt;/li&gt;
&lt;li&gt;Visualize&lt;/li&gt;
&lt;li&gt;Analyze&lt;/li&gt;
&lt;li&gt;Respond&lt;/li&gt;
&lt;li&gt;Integrate&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-azure-monitor/3-describe-components&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Get insights&lt;/strong&gt;: Access the Azure Application Insights extension to Azure Monitor to use the Application Performance Monitoring (APM) features. You can use APM tools to monitor your application performance and gather trace logging data. Application Insights are available for many Azure services, such as Azure Virtual Machines and Azure Virtual Machine Scale Sets, Azure Container Instances, Azure Cosmos DB, and Azure IoT Edge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visualize&lt;/strong&gt;: Utilize the many options in Azure Monitor for viewing and interpreting your gathered metrics and logs. You can use Power BI with the Azure Workbooks feature of Azure Monitor and access configurable dashboards and views.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analyze&lt;/strong&gt;: Work with Azure Monitor Logs (Log Analytics) in the Azure portal to write log queries for your data. You can interactively analyze your log data by using Azure Monitor Metrics and the powerful analysis engine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Respond&lt;/strong&gt;: Set up log alert rules in Azure Monitor to receive notifications about your application performance. You can configure the service to take automated action when the results of your queries and alerts match certain conditions or results.  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrate&lt;/strong&gt;: Ingest and export log query results from the Azure CLI, Azure PowerShell cmdlets, and various APIs. Set up automated export of your log data to your Azure Storage account or Azure Event Hubs. Build workflows to retrieve your log data and copy to external locations with Azure Logic Apps.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create VNIC in Azure</title><link>https://sajalchoudhary.net/til/create-vnic-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-vnic-in-azure/</guid><pubDate>Sun, 04 Aug 2024 08:16:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;## Create a network interface for the VM. ##
$nic = @{
    Name = &quot;nic2&quot;
    ResourceGroupName = $RGName
    Location = $Region
    Subnet = $vnet.Subnets[0]
}
$nicVM = New-AzNetworkInterface @nic
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create public ip address in Azure</title><link>https://sajalchoudhary.net/til/create-public-ip-address-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-public-ip-address-in-azure/</guid><pubDate>Sun, 04 Aug 2024 08:11:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;$ip = @{
    Name = &apos;sajal-pip-0&apos;
    ResourceGroupName = $RGName
    Location = $Location
    Sku = &apos;Standard&apos;
    AllocationMethod = &apos;Static&apos;
    IpAddressVersion = &apos;IPv4&apos;
}
New-AzPublicIpAddress @ip
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create backup for VMs</title><link>https://sajalchoudhary.net/til/create-backup-for-vms/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-backup-for-vms/</guid><pubDate>Fri, 02 Aug 2024 15:23:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Create Recovery services vault&lt;/li&gt;
&lt;li&gt;Create backup policy&lt;/li&gt;
&lt;li&gt;Apply the backup policy&lt;/li&gt;
&lt;li&gt;Run the backup job&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-virtual-machine-backups/5-backup-virtual-machines&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Backup Access Tiers</title><link>https://sajalchoudhary.net/til/azure-backup-access-tiers/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-backup-access-tiers/</guid><pubDate>Thu, 01 Aug 2024 16:14:00 GMT</pubDate><content:encoded>&lt;p&gt;Access tiers for [[202404071559 Azure Backup|Azure backup]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Snapshot tier&lt;ol&gt;
&lt;li&gt;backups stored in customer tenant and RG&lt;/li&gt;
&lt;li&gt;Faster to restore&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Vault-Standard tier&lt;ol&gt;
&lt;li&gt;backups stored in a MSFT tenant (so more secure)&lt;/li&gt;
&lt;li&gt;Slower to restore&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Archive tier&lt;ol&gt;
&lt;li&gt;for long term archival&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>What resources can we backup using Azure Backup</title><link>https://sajalchoudhary.net/til/what-resources-can-we-backup-using-azure-backup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/what-resources-can-we-backup-using-azure-backup/</guid><pubDate>Thu, 01 Aug 2024 16:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Broadly speaking:&lt;br /&gt;[[202404161835 Azure VM Basics|Azure VM]]/[[202408021823 Create backup for VMs|How to backup azure vm]]&lt;br /&gt;[[202404121254 Azure Managed Disks|Azure Managed Disks]]&lt;br /&gt;[[202406291221 Azure Files|Azure Files]]&lt;br /&gt;[[202404271358 Type of Databases|Azure databases]] (VMs basically not the service)&lt;br /&gt;[[202404201210 Azure Kubernetes Service|AKS]]&lt;br /&gt;[[202404121117 Azure Storage Services#Blob]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/intro-to-azure-backup/1-introduction&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Azure VMs&lt;/li&gt;
&lt;li&gt;Azure Managed Disks&lt;/li&gt;
&lt;li&gt;Azure Files&lt;/li&gt;
&lt;li&gt;SQL Server in Azure VMs&lt;/li&gt;
&lt;li&gt;SAP HANA databases in Azure VMs&lt;/li&gt;
&lt;li&gt;Azure Database for PostgreSQL servers&lt;/li&gt;
&lt;li&gt;Azure Blobs&lt;/li&gt;
&lt;li&gt;Azure Database for PostSQL - Flexible servers&lt;/li&gt;
&lt;li&gt;Azure Database for MySQL - Flexible servers&lt;/li&gt;
&lt;li&gt;Azure Kubernetes cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Manage VM Templates in VMware content libraries</title><link>https://sajalchoudhary.net/til/manage-vm-templates-in-vmware-content-libraries/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/manage-vm-templates-in-vmware-content-libraries/</guid><pubDate>Thu, 01 Aug 2024 12:53:00 GMT</pubDate><content:encoded>&lt;p&gt;After [[202407191233 Create VMware Content Libraries|Create VMware Content Libraries]]&lt;/p&gt;
&lt;h1&gt;Add template to content library&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Right click on VM &amp;gt; Clone &amp;gt; Clone as Template to library&lt;/li&gt;
&lt;li&gt;Fill out details. It will be added to content library&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once VM template is added to content library, versioning tab becomes live. &lt;/p&gt;
&lt;h1&gt;Sync vm templates to subscribed library&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create a subscription for subscribed libraryr&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-CA4478D8-EC1B-47AD-B48E-38CD26B489FF.html#GUID-CA4478D8-EC1B-47AD-B48E-38CD26B489FF&quot;&gt;The VM Template as a Content Library Item (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;f you convert the VM template in the vCenter Server inventory to a virtual machine, the corresponding VM template library item is also deleted.&lt;/li&gt;
&lt;li&gt;If you rename the VM template in the vCenter Server, the corresponding VM template library item is also renamed.&lt;/li&gt;
&lt;li&gt;If you rename the VM template library item the associated VM template in the vCenter Server inventory is also renamed.&lt;/li&gt;
&lt;li&gt;If you delete the VM template in the vCenter Server inventory, the corresponding VM template library item is also deleted.&lt;/li&gt;
&lt;li&gt;If you delete the VM template library item, the associated VM template in the vCenter Server inventory is also deleted.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows cluster failed with duplicate IP address detected error</title><link>https://sajalchoudhary.net/til/windows-cluster-failed-with-duplicate-ip-address-detected-error/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-failed-with-duplicate-ip-address-detected-error/</guid><pubDate>Thu, 01 Aug 2024 12:02:00 GMT</pubDate><content:encoded>&lt;h1&gt;Issue&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Windows cluster server name and IP down. &lt;/li&gt;
&lt;li&gt;When trying to bring it online, it gives duplicate IP detected error.&lt;/li&gt;
&lt;li&gt;Unable to ping or find the duplicate IP from outside&lt;/li&gt;
&lt;li&gt;Cluster validation does not give anything error&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Cause&lt;/h1&gt;
&lt;p&gt;When we check ipconfig we found that &quot;Microsoft Failover Cluster Virtual Adapter&quot; has the cluster IP assigned to it in addition to APIPA on both nodes.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Tunnel adapter Local Area Connection* 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Failover Cluster Virtual Adapter
   Physical Address. . . . . . . . . : 02-74-57-21-0C-CB
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9cf7:8358:14c4:d0cd%2(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.128.100.40(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   IPv4 Address. . . . . . . . . . . : 169.254.1.32(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 50499581
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-25-F3-C7-10-FA-16-3E-18-BB-3C
   NetBIOS over Tcpip. . . . . . . . : Enabled
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;p&gt;Remove the cluster IP from the adapter on both the servers&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# Get IP Address
Get-NetAdapter -IncludeHidden -Name &apos;Local Area Connection* 2&apos; | Get-NetIPAddress -IPAddress &apos;10.128.100.40&apos;

# Remove IP address - need to confirm
Get-NetAdapter -IncludeHidden -Name &apos;Local Area Connection* 2&apos; | Get-NetIPAddress -IPAddress &apos;10.128.100.40&apos; | Remove-NetIPAddress
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After removing the IP, bring the cluster online.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>failover</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create Azure Load Balancer</title><link>https://sajalchoudhary.net/til/create-azure-load-balancer/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-azure-load-balancer/</guid><pubDate>Sun, 28 Jul 2024 11:23:00 GMT</pubDate><content:encoded>&lt;h1&gt;Public [[202407271319 Azure Load Balancer|Azure Load Balancer]]&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# Vars
$RGName = &apos;&apos;

# create public ip address

$Location = $(Get-AzureRmResourceGroup -ResourceGroupName $RGName).Location

$publicIP = New-AzPublicIpAddress -ResourceGroupName $RGName -Location $Location -AllocationMethod &quot;Static&quot; -Name &quot;myPublicIP&quot;

# create frontend ip
$frontendIP = New-AzLoadBalancerFrontendIpConfig -Name &quot;myFrontEnd&quot; -PublicIpAddress $publicIP

# Create backend pool
$backendPool = New-AzLoadBalancerBackendAddressPoolConfig -Name &quot;myBackEndPool&quot;

# Create health probe
$probe = New-AzLoadBalancerProbeConfig -Name &quot;myHealthProbe&quot; -Protocol http -Port 80 -IntervalInSeconds 5 -ProbeCount 2 -RequestPath &quot;/&quot;


# Create LB rule
$lbrule = New-AzLoadBalancerRuleConfig -Name &quot;myLoadBalancerRule&quot; -FrontendIpConfiguration $frontendIP -BackendAddressPool $backendPool -Protocol Tcp -FrontendPort 80 -BackendPort 80 -Probe $probe

# Create LB
$lb = New-AzLoadBalancer -ResourceGroupName $RGName -Name &apos;MyLoadBalancer&apos; -Location $Location -FrontendIpConfiguration $frontendIP -BackendAddressPool $backendPool -Probe $probe -LoadBalancingRule $lbrule

&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Private [[202407271319 Azure Load Balancer|Azure Load Balancer]]&lt;/h1&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Network Virtual Appliance</title><link>https://sajalchoudhary.net/til/network-virtual-appliance/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/network-virtual-appliance/</guid><pubDate>Sun, 28 Jul 2024 11:10:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;An appliance by security vendors (cisco,etc.)&lt;/li&gt;
&lt;li&gt;NVA can also be a windows server with required roles and routes defined in it&lt;/li&gt;
&lt;li&gt;They [[202404141404 Control traffic flows|control traffic flow]]&lt;/li&gt;
&lt;li&gt;Used in conjunction with [[202407281401 User defined routing|Custom routes]]&lt;ul&gt;
&lt;li&gt;so for example, all incoming public traffic goes to a dmz subnet where you have NVA availability set.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create custom route</title><link>https://sajalchoudhary.net/til/create-custom-route/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-custom-route/</guid><pubDate>Sun, 28 Jul 2024 11:08:00 GMT</pubDate><content:encoded>&lt;p&gt;Create a [[202407281401 User defined routing|Custom routes]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Create route table
az network route-table create --name publictable --resource-group &quot;learn-62c51ac7-09ba-4d9e-a8f2-0b6f4660c3c0&quot; --disable-bgp-route-propagation false

# create custom route
az network route-table route create --route-table-name publictable --resource-group &quot;learn-62c51ac7-09ba-4d9e-a8f2-0b6f4660c3c0&quot; --name productionsubnet --address-prefix 10.0.1.0/24 --next-hop-type VirtualAppliance --next-hop-ip-address 10.0.2.4

# associate subnet with route-table
az network vnet subnet update --name publicsubnet --vnet-name vnet --resource-group &quot;learn-62c51ac7-09ba-4d9e-a8f2-0b6f4660c3c0&quot; --route-table publictable
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>User defined routing</title><link>https://sajalchoudhary.net/til/user-defined-routing/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/user-defined-routing/</guid><pubDate>Sun, 28 Jul 2024 11:01:00 GMT</pubDate><content:encoded>&lt;p&gt;A way of [[202404131313 Connecting virtual networks|Connecting virtual networks]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can be used to over-ride system defaults created in [[202312231415 Azure Master|Azure]]&lt;/li&gt;
&lt;li&gt;Next hop can be:&lt;ul&gt;
&lt;li&gt;NVA&lt;/li&gt;
&lt;li&gt;Virtual network gateway&lt;/li&gt;
&lt;li&gt;[[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;Internet&lt;/li&gt;
&lt;li&gt;None (To drop packet)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[[202407281408 Create custom route|Create custom route]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/control-network-traffic-flow-with-routes/2-azure-virtual-network-route&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Private IP Address</title><link>https://sajalchoudhary.net/til/azure-private-ip-address/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-private-ip-address/</guid><pubDate>Sun, 28 Jul 2024 09:28:00 GMT</pubDate><content:encoded>&lt;h1&gt;Ranges&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;10.0.0.0/8&lt;/li&gt;
&lt;li&gt;172.16.0.0/12&lt;/li&gt;
&lt;li&gt;192.168.0.0/16&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Networking Basics</title><link>https://sajalchoudhary.net/til/azure-networking-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-networking-basics/</guid><pubDate>Sun, 28 Jul 2024 09:23:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;When compared to on-prem, on [[202312231415 Azure Master|Azure]] there is no hierarchy to network design.&lt;ul&gt;
&lt;li&gt;There are no physical devices&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Everything is virtual&lt;ul&gt;
&lt;li&gt;We can slice it into chunks per our needs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;There can be no overlap in IP address between on-prem and [[202312231415 Azure Master|Azure]]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/design-ip-addressing-for-azure/2-network-ip-addressing-integration&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In Azure, you&apos;d typically implement a network security group and a firewall. You&apos;d use subnets to isolate front-end services, including web servers and DNS, and back-end services like databases and storage systems. Network security groups filter internal and external traffic at the network layer. A firewall has more extensive capabilities for network-layer filtering and application-layer filtering. By deploying both network security groups and a firewall, you get improved isolation of resources for a secure network architecture.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Application Gateway</title><link>https://sajalchoudhary.net/til/azure-application-gateway/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-application-gateway/</guid><pubDate>Sat, 27 Jul 2024 10:53:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;When compared to [[202407271319 Azure Load Balancer|Azure Load Balancer]] this uses app layer routing as mentioned in [[202404131219 External Access]]&lt;/li&gt;
&lt;li&gt;can add firewall etc&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Routing&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;path based routing : based on url send to different backend servers&lt;/li&gt;
&lt;li&gt;Multi-site routing: different web apps on the same [[202407271353 Azure Application Gateway|Azure Application Gateway]]&lt;ul&gt;
&lt;li&gt;example: contoso.com and sajal.net&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can redirect traffic&lt;ul&gt;
&lt;li&gt;redirect http traffic to https for example&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can rewrite http headers&lt;/li&gt;
&lt;li&gt;create custom error messages&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Components&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;front-end ip &lt;ul&gt;
&lt;li&gt;receives the request &lt;/li&gt;
&lt;li&gt;only 1 public and 1 private ip&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;web application firewall (optional)&lt;ul&gt;
&lt;li&gt;checks for threats based on owasp&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;listener &lt;ul&gt;
&lt;li&gt;accepts traffics and routes to backend pools based on routing rules&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;back-end pools&lt;/li&gt;
&lt;li&gt;health probes&lt;ul&gt;
&lt;li&gt;response between 200 and 399 considered healthy&lt;/li&gt;
&lt;li&gt;default probe waits for 30 sec&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-azure-application-gateway/2-implement&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Load Balancer</title><link>https://sajalchoudhary.net/til/azure-load-balancer/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-load-balancer/</guid><pubDate>Sat, 27 Jul 2024 10:19:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;provides high availability&lt;/li&gt;
&lt;li&gt;uses 5-tuple hash by default to forward traffic (source ip/port, destination ip/port, protocol)&lt;/li&gt;
&lt;li&gt;frontend connects to LB. LB connects to backend based on rules and health checks.&lt;/li&gt;
&lt;li&gt;can be used for inbound or outbound scenarios&lt;/li&gt;
&lt;li&gt;[[202407281423 Create Azure Load Balancer|Create Azure Load Balancer]] / needs:&lt;ul&gt;
&lt;li&gt;frontend ip&lt;/li&gt;
&lt;li&gt;backend pool&lt;/li&gt;
&lt;li&gt;health probe&lt;/li&gt;
&lt;li&gt;LB rules&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;public &lt;/li&gt;
&lt;li&gt;internal&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Distribution methods&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;5 tuple hash&lt;/li&gt;
&lt;li&gt;source ip affinity&lt;ul&gt;
&lt;li&gt;2-tuple hash (source ip, destination ip)&lt;/li&gt;
&lt;li&gt;3-tuple hash (source ip, destination ip, protocol)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;SKUs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;basic&lt;ul&gt;
&lt;li&gt;open by default&lt;/li&gt;
&lt;li&gt;inbound only&lt;/li&gt;
&lt;li&gt;http/tcp probes&lt;/li&gt;
&lt;li&gt;upto 300 backend pools&lt;/li&gt;
&lt;li&gt;vms in a single availability set or [[202404181846 Azure VM scale sets|VMSS]]&lt;/li&gt;
&lt;li&gt;supports basic [[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;standard&lt;ul&gt;
&lt;li&gt;closed by default&lt;/li&gt;
&lt;li&gt;inbound/outbound&lt;/li&gt;
&lt;li&gt;http/https/tcp probes&lt;/li&gt;
&lt;li&gt;upto 1000 backend pools&lt;/li&gt;
&lt;li&gt;vms in a [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;gateway&lt;ul&gt;
&lt;li&gt;high performance&lt;/li&gt;
&lt;li&gt;with NVAs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Backend pools&lt;/h1&gt;
&lt;h1&gt;Health probes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;http probe&lt;ul&gt;
&lt;li&gt;pings every 15 seconds&lt;/li&gt;
&lt;li&gt;http 200 response means healthy within timeout period (default 31 sec)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;tcp probe&lt;ul&gt;
&lt;li&gt;creates a tcp session.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;LB rules&lt;/h1&gt;
&lt;h2&gt;Stickiness&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;By default traffic can go to any VM&lt;/li&gt;
&lt;li&gt;With persistence we can set which requests go to the same vm: &lt;ul&gt;
&lt;li&gt;none&lt;/li&gt;
&lt;li&gt;client ip&lt;/li&gt;
&lt;li&gt;Client IP and protocol&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-azure-load-balancer/2-determine-uses&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;To implement a load balancer, you configure four components:&lt;ul&gt;
&lt;li&gt;Front-end IP configuration&lt;/li&gt;
&lt;li&gt;Back-end pools&lt;/li&gt;
&lt;li&gt;Health probes&lt;/li&gt;
&lt;li&gt;Load-balancing rules&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;To configure a probe, you specify values for the following settings:&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Port&lt;/strong&gt;: Back-end port&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URI&lt;/strong&gt;: URI for requesting the health status from the backend&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interval&lt;/strong&gt;: Amount of time between probe attempts (default is 15 seconds)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unhealthy threshold&lt;/strong&gt;: Number of failures that must occur for the instance to be considered unhealthy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/improve-app-scalability-resiliency-with-load-balancer/3-public-load-balancer&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create Azure DNS zone and records</title><link>https://sajalchoudhary.net/til/create-azure-dns-zone-and-records/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-azure-dns-zone-and-records/</guid><pubDate>Sat, 27 Jul 2024 09:15:00 GMT</pubDate><content:encoded>&lt;p&gt;[[202404141450 Azure DNS|Azure DNS]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Create a public zone
New-AzDNSZone



# Create a private zone
$RGName = &apos;user-hnbymdftfrzr&apos;
$Zone = New-AzPrivateDnsZone -Name &quot;sajalkc.net&quot; -ResourceGroupName $RGName
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/az.dns/new-azdnszone?view=azps-12.1.0&quot;&gt;Command ref&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/dns/dns-getstarted-powershell&quot;&gt;MS Docs - Public Zone&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-powershell&quot;&gt;MS Docs- Private Zone&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Public IP address allows inbound access based on tier in Azure</title><link>https://sajalchoudhary.net/til/public-ip-address-allows-inbound-access-based-on-tier-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/public-ip-address-allows-inbound-access-based-on-tier-in-azure/</guid><pubDate>Sat, 27 Jul 2024 08:43:00 GMT</pubDate><content:encoded>&lt;p&gt;Public IP address in Azure have 2 SKUs: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Standard&lt;/li&gt;
&lt;li&gt;Basic (will be retired in 2025)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Standard SKU is secure by default, does not allow any inbound traffic.&lt;br /&gt;Basic allows traffic by default. [[202404141419 Network Security Groups|NSGs]] can be used to control access.&lt;/p&gt;
&lt;p&gt;If we do not specify SKU, Public IP takes Basic SKU.&lt;/p&gt;
&lt;p&gt;Faced this issue when doing &lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-network-routing-endpoints/7-simulation-routing&quot;&gt;the exercise for network routing&lt;/a&gt;. &lt;/p&gt;
&lt;h1&gt;Bicep&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;Name of a public IP address SKU.&lt;/td&gt;
&lt;td&gt;&apos;Basic&apos;  &lt;br /&gt;&apos;Standard&apos;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tier&lt;/td&gt;
&lt;td&gt;Tier of a public IP address SKU.&lt;/td&gt;
&lt;td&gt;&apos;Global&apos;  &lt;br /&gt;&apos;Regional&apos;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;pre&gt;&lt;code&gt;sku: { name: &apos;string&apos; tier: &apos;string&apos; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[[202408041111 Create public ip address in Azure|Create public ip address in Azure]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-addresses&quot;&gt;MS Docs&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/templates/microsoft.network/publicipaddresses?pivots=deployment-language-bicep#publicipaddresssku&quot;&gt;Bicep docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cluster validation causes alerts</title><link>https://sajalchoudhary.net/til/cluster-validation-causes-alerts/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cluster-validation-causes-alerts/</guid><pubDate>Wed, 24 Jul 2024 10:57:00 GMT</pubDate><content:encoded>&lt;p&gt;Windows creates account clitest2 during cluster validation.&lt;br /&gt;SoC might get alerts about this.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/high-availability/cluster-validation-account-causes-events-messages&quot;&gt;Cluster validation account causes events or messages - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep dependencies</title><link>https://sajalchoudhary.net/til/bicep-dependencies/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-dependencies/</guid><pubDate>Sat, 20 Jul 2024 12:12:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;implicit&lt;/li&gt;
&lt;li&gt;Explicit&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Explicit definition&lt;/h1&gt;
&lt;p&gt;Using &lt;code&gt;dependsOn&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dependsOn: [ dnsZone ]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/resource-dependencies&quot;&gt;MS Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep functions</title><link>https://sajalchoudhary.net/til/bicep-functions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-functions/</guid><pubDate>Sat, 20 Jul 2024 11:33:00 GMT</pubDate><content:encoded>&lt;h1&gt;Get ID of resources&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-resource#resourceid&quot;&gt;ResourceID&lt;/a&gt; to get ID of Resources.&lt;br /&gt;To get subnetid:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;resourceId(&apos;Microsoft.Network/virtualNetworks/subnets/&apos;, virtualNetworkName, subnetName)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions&quot;&gt;MS Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep loops</title><link>https://sajalchoudhary.net/til/bicep-loops/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-loops/</guid><pubDate>Fri, 19 Jul 2024 16:39:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;&lt;code&gt;for&lt;/code&gt; keyword to create a loop&lt;/li&gt;
&lt;li&gt;can loop based on:&lt;ul&gt;
&lt;li&gt;array [[202407191859 Bicep parameters|Bicep parameters]]&lt;/li&gt;
&lt;li&gt;based on number&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;for i in range(1,4)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Access the iteration index&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;name: &apos;sqlserver-${i+1}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Filter items with loops&lt;ul&gt;
&lt;li&gt;using &lt;code&gt;:&lt;/code&gt; and &lt;code&gt;if&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;for sqlServer in sqlServerDetails: if (sqlServer.environmentName == &apos;Production&apos;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Use nested loop, for example for creating subnets in a vnet&lt;/li&gt;
&lt;li&gt;We can create [[202407191900 Bicep variables|Bicep variables]] loops&lt;/li&gt;
&lt;li&gt;can also create output loops&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Example&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;param storageAccountNames array = [
  &apos;saauditus&apos;
  &apos;saauditeurope&apos;
  &apos;saauditapac&apos;
]

resource storageAccountResources &apos;Microsoft.Storage/storageAccounts@2021-09-01&apos; = [for storageAccountName in storageAccountNames: {
  name: storageAccountName
  location: resourceGroup().location
  kind: &apos;StorageV2&apos;
  sku: {
    name: &apos;Standard_LRS&apos;
  }
}]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/build-flexible-bicep-templates-conditions-loops/4-use-loops-deploy-resources&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/loops&quot;&gt;MS Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep conditionals</title><link>https://sajalchoudhary.net/til/bicep-conditionals/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-conditionals/</guid><pubDate>Fri, 19 Jul 2024 16:32:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;&lt;code&gt;if&lt;/code&gt; keyword&lt;ul&gt;
&lt;li&gt;define a &lt;code&gt;bool&lt;/code&gt; param and if needed, then only deploy the resource&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;check using operators&lt;ul&gt;
&lt;li&gt;&lt;code&gt;==&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;better to create a [[202407191900 Bicep variables|Bicep variables]] for the evaluation&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Example&lt;/h1&gt;
&lt;p&gt;[[202404061212 Azure Resources|ARM]] evaluates the property expressions before the conditionals on the resources.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;resource auditingSettings &apos;Microsoft.Sql/servers/auditingSettings@2021-11-01-preview&apos; = if (auditingEnabled) {
  parent: server
  name: &apos;default&apos;
  properties: {
    state: &apos;Enabled&apos;
    storageEndpoint: environmentName == &apos;Production&apos; ? auditStorageAccount.properties.primaryEndpoints.blob : &apos;&apos;
    storageAccountAccessKey: environmentName == &apos;Production&apos; ? listKeys(auditStorageAccount.id, auditStorageAccount.apiVersion).keys[0].value : &apos;&apos;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/build-flexible-bicep-templates-conditions-loops/2-use-conditions-deploy-resources&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Use Azure Key Vault with bicep</title><link>https://sajalchoudhary.net/til/use-azure-key-vault-with-bicep/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/use-azure-key-vault-with-bicep/</guid><pubDate>Fri, 19 Jul 2024 16:25:00 GMT</pubDate><content:encoded>&lt;h1&gt;In [[202407191915 Bicep parameter files|parameter file]]&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#&quot;,
  &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,
  &quot;parameters&quot;: {
    &quot;sqlServerAdministratorLogin&quot;: {
      &quot;reference&quot;: {
        &quot;keyVault&quot;: {
          &quot;id&quot;: &quot;/subscriptions/f0750bbe-ea75-4ae5-b24d-a92ca601da2c/resourceGroups/PlatformResources/providers/Microsoft.KeyVault/vaults/toysecrets&quot;
        },
        &quot;secretName&quot;: &quot;sqlAdminLogin&quot;
      }
    },
    &quot;sqlServerAdministratorPassword&quot;: {
      &quot;reference&quot;: {
        &quot;keyVault&quot;: {
          &quot;id&quot;: &quot;/subscriptions/f0750bbe-ea75-4ae5-b24d-a92ca601da2c/resourceGroups/PlatformResources/providers/Microsoft.KeyVault/vaults/toysecrets&quot;
        },
        &quot;secretName&quot;: &quot;sqlAdminLoginPassword&quot;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;For module&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;resource keyVault &apos;Microsoft.KeyVault/vaults@2022-07-01&apos; existing = {
  name: keyVaultName
}

module applicationModule &apos;application.bicep&apos; = {
  name: &apos;application-module&apos;
  params: {
    apiKey: keyVault.getSecret(&apos;ApiKey&apos;)
  }
}
# existing keyword tells it not to deploy as it exists already
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/build-reusable-bicep-templates-parameters/5-how-secure-parameter&quot;&gt;MS LEarn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Key Vault</title><link>https://sajalchoudhary.net/til/azure-key-vault/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-key-vault/</guid><pubDate>Fri, 19 Jul 2024 16:23:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep parameter files</title><link>https://sajalchoudhary.net/til/bicep-parameter-files/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-parameter-files/</guid><pubDate>Fri, 19 Jul 2024 16:15:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;created in json&lt;/li&gt;
&lt;li&gt;specify all [[202407191859 Bicep parameters|Bicep parameters]] values in one go&lt;/li&gt;
&lt;li&gt;good idea to include the name of the environment in the name of the [[202407191915 Bicep parameter files|parameter file]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;How to use&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;New-AzResourceGroupDeployment -TemplateFile main.bicep -TemplateParameterFile main.parameters.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Example&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;$schema&quot;: &quot;https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#&quot;,
  &quot;contentVersion&quot;: &quot;1.0.0.0&quot;,
  &quot;parameters&quot;: {
    &quot;appServicePlanInstanceCount&quot;: {
      &quot;value&quot;: 3
    },
    &quot;appServicePlanSku&quot;: {
      &quot;value&quot;: {
        &quot;name&quot;: &quot;P1v3&quot;,
        &quot;tier&quot;: &quot;PremiumV3&quot;
      }
    },
    &quot;cosmosDBAccountLocations&quot;: {
      &quot;value&quot;: [
        {
          &quot;locationName&quot;: &quot;australiaeast&quot;
        },
        {
          &quot;locationName&quot;: &quot;southcentralus&quot;
        },
        {
          &quot;locationName&quot;: &quot;westeurope&quot;
        }
      ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/build-reusable-bicep-templates-parameters/4-how-use-parameter-file-with-bicep?pivots=powershell&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep variables</title><link>https://sajalchoudhary.net/til/bicep-variables/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-variables/</guid><pubDate>Fri, 19 Jul 2024 16:00:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;var Identifier =

# Examples
var appServicePlanName = &apos;toy-product-launch-plan&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;variable loops which can then be used later in the template&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;var items = [for i in range(1, 5): &apos;item${i}&apos;]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep parameters</title><link>https://sajalchoudhary.net/til/bicep-parameters/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-parameters/</guid><pubDate>Fri, 19 Jul 2024 15:59:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;auto-complete for resources in vs code&lt;/li&gt;
&lt;li&gt;Parameters can be added with param block&lt;ul&gt;
&lt;li&gt;Decorators can be added with @ (Things like min/max length)&lt;ul&gt;
&lt;li&gt;@allowed&lt;/li&gt;
&lt;li&gt;description can also be added&lt;/li&gt;
&lt;li&gt;@secure - for passwords/secure strings, etc&lt;ul&gt;
&lt;li&gt;Don&apos;t use [[202407191915 Bicep parameter files|Parameter files]] for secrets&lt;/li&gt;
&lt;li&gt;use [[202407191923 Azure Key Vault|Azure key vault]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Implicit dependency between resources by using the id of a resource created earlier, example id of [[202404201400 Azure App service#App service plan]] when defining [[202404201400 Azure App service|app service]] &lt;/li&gt;
&lt;li&gt;output keyword to send output&lt;/li&gt;
&lt;li&gt;param types : string, int, bool, object and array&lt;/li&gt;
&lt;li&gt;3 ways to define parameters (in order of priority least-&amp;gt;most)&lt;ul&gt;
&lt;li&gt;default&lt;/li&gt;
&lt;li&gt;[[202407191915 Bicep parameter files|parameter file]]&lt;/li&gt;
&lt;li&gt;command-line&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;param Identifier Type = DefaultValue

# Examples
param appServiceAppName string
param appServiceAppName string = &apos;toy-product-launch-1&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;@allowed([
  &apos;nonprod&apos;
  &apos;prod&apos;
])
param environmentType string

## Based on the above, create a var which will set sku based on environment
# ? is if else , true then first things, false then after : thing
var storageAccountSkuName = (environmentType == &apos;prod&apos;) ? &apos;Standard_GRS&apos; : &apos;Standard_LRS&apos;
var appServicePlanSkuName = (environmentType == &apos;prod&apos;) ? &apos;P2V3&apos; : &apos;F1&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Expressions&lt;/h1&gt;
&lt;p&gt;When writing templates we don&apos;t want to hard-code anything. So use expressions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Example
param location string = resourceGroup().location

# Another Example
param storageAccountName string = uniqueString(resourceGroup().id)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unique string will give unique string but it will not be so readable. So string extrapolation. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
param storageAccountName string = &apos;toylaunch${uniqueString(resourceGroup().id)}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Objects&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;create an object type &lt;code&gt;param&lt;/code&gt; to specify structured data together&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;param appServicePlanSku object = {
  name: &apos;F1&apos;
  tier: &apos;Free&apos;
  capacity: 1
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;can be used in dot notations&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;resource appServicePlan &apos;Microsoft.Web/serverfarms@2022-03-01&apos; = {
  name: appServicePlanName
  location: location
  sku: {
    name: appServicePlanSku.name
    tier: appServicePlanSku.tier
    capacity: appServicePlanSku.capacity
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Useful for specifying tags&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Array&lt;/h1&gt;
&lt;p&gt;list of things. strings, or objects&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# List of objects
param cosmosDBAccountLocations array = [
  {
    locationName: &apos;australiaeast&apos;
  }
  {
    locationName: &apos;southcentralus&apos;
  }
  {
    locationName: &apos;westeurope&apos;
  }
]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Bicep Modules</title><link>https://sajalchoudhary.net/til/bicep-modules/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/bicep-modules/</guid><pubDate>Fri, 19 Jul 2024 15:32:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Use the &lt;code&gt;module&lt;/code&gt; keyword to reference a module file&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;module Identifier Path = {
	name:
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Specify parameters with &lt;code&gt;param&lt;/code&gt; keyword&lt;/li&gt;
&lt;li&gt;purpose should be clear&lt;/li&gt;
&lt;li&gt;can include different types of resources&lt;/li&gt;
&lt;li&gt;should not output secrets&lt;/li&gt;
&lt;li&gt;use visualizer in VSC to see how it can be broken down into modules&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Storage Spaces</title><link>https://sajalchoudhary.net/til/storage-spaces/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/storage-spaces/</guid><pubDate>Wed, 17 Jul 2024 11:35:00 GMT</pubDate><content:encoded>&lt;h1&gt;Limitations&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;not as boot or system volumes&lt;/li&gt;
&lt;li&gt;all drives in pool must use same [[202407161309 Sector and allocation units|Sector size]]&lt;/li&gt;
&lt;li&gt;FC and iscsi not supported&lt;/li&gt;
&lt;li&gt;Failover clusters limited to SAS&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/training/modules/implement-storage-spaces-storage-spaces-direct/3-list-functionality-benefits-use-cases-storage-spaces&quot;&gt;List the functionalities, benefits, and use cases of Storage Spaces - Training | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Storage layers that abstract the physical disks aren&apos;t compatible with Storage Spaces, including:&lt;ul&gt;
&lt;li&gt;Pass-through disks in a virtual machine (VM).&lt;/li&gt;
&lt;li&gt;Storage subsystems deployed in a separate RAID layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure-stack/hci/concepts/fault-tolerance?toc=%2Fwindows-server%2Fstorage%2Ftoc.json&amp;amp;bc=%2Fwindows-server%2Fbreadcrumbs%2Ftoc.json&quot;&gt;Fault tolerance and storage efficiency on Azure Stack HCI and Windows Server clusters - Azure Stack HCI | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/storage-at-microsoft/deep-dive-the-storage-pool-in-storage-spaces-direct/ba-p/425959&quot;&gt;Deep Dive: The Storage Pool in Storage Spaces Direct - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Storage Spaces Direct automatically creates one storage pool, which grows as your deployment grows. You do not need to modify its settings, add or remove drives from the pool, nor create new pools.&lt;/li&gt;
&lt;li&gt;Storage Spaces does not keep whole copies of volumes – rather, it divides them into tiny &apos;slabs&apos; which are distributed evenly across all drives in all servers. This has some practical consequences. For example, using two-way mirroring with three servers does &lt;em&gt;not&lt;/em&gt; leave one server empty. Likewise, when drives fail, all volumes are affected for the very short time it takes to repair them.&lt;/li&gt;
&lt;li&gt;Leaving some unallocated &apos;reserve&apos; capacity in the pool allows this fast, non-invasive, parallel repair to happen even before you replace the drive.&lt;/li&gt;
&lt;li&gt;The storage pool is &apos;re-balanced&apos; whenever new drives are added, such as on scale-out or after replacement, to equilibrate how much data every drive is storing. This ensures all drives and all servers are always equally &quot;full&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://s2dcalc.blob.core.windows.net/www/index.html&quot;&gt;Storage Spaces Direct Calculator (s2dcalc.blob.core.windows.net)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of operations in Azure</title><link>https://sajalchoudhary.net/til/types-of-operations-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-operations-in-azure/</guid><pubDate>Tue, 16 Jul 2024 18:20:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;These are used elsewhere like in [[202404051739 Governance Overview|azure governance]]&lt;ul&gt;
&lt;li&gt;So in [[202404061249 Azure RBAC|RBAC]] what [[202404061316 Azure Roles|azure roles]] apply to which plane - control or data&lt;/li&gt;
&lt;li&gt;Someone might not have access to manage a VM, but they might have access to login to the OS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Control Plane&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;To manage resource in [[202312231415 Azure Master|Azure]]&lt;/li&gt;
&lt;li&gt;In [[202406151100 How to interact with Azure|How to interact with Azure]], everything goes through [[202404061212 Azure Resources|ARM]]&lt;ul&gt;
&lt;li&gt;All requests go to a resource manager url&lt;/li&gt;
&lt;li&gt;ARM knows what exists and what does not exist and does not create duplicate resources&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Data Plane&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;To access features exposed by the [[202404061212 Azure Resources|resource]]&lt;/li&gt;
&lt;li&gt;Requests go to specific endpoint for the Azure [[202404061212 Azure Resources|resource]]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/introduction-to-infrastructure-as-code-using-bicep/3-what-azure-resource-manager&quot;&gt;Learn - ARM&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Sector and allocation units</title><link>https://sajalchoudhary.net/til/sector-and-allocation-units/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/sector-and-allocation-units/</guid><pubDate>Tue, 16 Jul 2024 10:09:00 GMT</pubDate><content:encoded>&lt;h1&gt;Sector&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Minimum amount of data that can be read or written to HD&lt;/li&gt;
&lt;li&gt;Traditionally 512Bytes, now different options are there&lt;/li&gt;
&lt;li&gt;Optimal sector size should be used&lt;ul&gt;
&lt;li&gt;example if database that writes 8,192-byte records, then sector size should be configured as 8KB, so that complete entries are written in one allocation unit &lt;/li&gt;
&lt;li&gt;If size is 4 KB then record gets split&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows file systems</title><link>https://sajalchoudhary.net/til/windows-file-systems/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-file-systems/</guid><pubDate>Tue, 16 Jul 2024 09:59:00 GMT</pubDate><content:encoded>&lt;h1&gt;FAT&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;FAT not larger than 4GB&lt;/li&gt;
&lt;li&gt;FAT32 not larger than 64GB&lt;/li&gt;
&lt;li&gt;exFAT for removable drives&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;NTFS&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;supports ACL, encryption, etc.&lt;/li&gt;
&lt;li&gt;Formatting:&lt;ul&gt;
&lt;li&gt;MBR (upto 2TB)&lt;/li&gt;
&lt;li&gt;GPT&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;ReFS&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Introduced with Server 2012&lt;/li&gt;
&lt;li&gt;Has enhanced resiliency to data corruption&lt;/li&gt;
&lt;li&gt;Not feature-parity with NTFS&lt;/li&gt;
&lt;li&gt;Not suitable for boot volumes and removable media&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell get ad group details</title><link>https://sajalchoudhary.net/til/powershell-get-ad-group-details/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-get-ad-group-details/</guid><pubDate>Tue, 16 Jul 2024 08:52:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-ADGroup -Filter * -SearchBase &apos;OU=Finland,DC=fi,DC=tcsecp,DC=com&apos; -Properties * | select Name, Description, @{Name=&apos;MemberCount&apos;;Expression={$_.Members.Count}} | Export-Csv -Path &apos;C:\Users\845874.adm.FI\Desktop\test.csv&apos; -NoClobber -NoTypeInformation -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create VNet Peering in Azure</title><link>https://sajalchoudhary.net/til/create-vnet-peering-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-vnet-peering-in-azure/</guid><pubDate>Mon, 15 Jul 2024 16:43:00 GMT</pubDate><content:encoded>&lt;p&gt;After [[202407141408 Create VNet in Azure|Create VNet in Azure]]&lt;/p&gt;
&lt;p&gt;We can create [[202407151908 VNet Peering|VNet Peering]] between the two using [[202207181612 Powershell|Powershell]] : &lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/az.network/add-azvirtualnetworkpeering&quot;&gt;Add-AzVirtualNetworkPeering&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Variables
$VNet1 = &apos;sajalvnet-0&apos;
$VNet2 = &apos;sajalvnet-1&apos;
$VNet3 = &apos;sajalvnet-2&apos;
$RG = &apos;user-kmgvzllojmll&apos;

# Get VNets
$AZVNet1 = Get-AzVirtualNetwork -ResourceGroupName $RG -Name $VNET1
$AZVNet2 = Get-AzVirtualNetwork -ResourceGroupName $RG -Name $VNET2
$AZVNet3 = Get-AzVirtualNetwork -ResourceGroupName $RG -Name $VNET3

# Add peering
Add-AzVirtualNetworkPeering -Name &apos;LocalPeering&apos; -VirtualNetwork $AZVNet1 -RemoteVirtualNetworkId $AZVNet2.id
Add-AzVirtualNetworkPeering -Name &apos;LocalPeering&apos; -VirtualNetwork $AZVNet2 -RemoteVirtualNetworkId $AZVNet1.id


# Add regional
Add-AzVirtualNetworkPeering -Name &apos;VNet1ToVNet3&apos; -VirtualNetwork $AZVNet1 -RemoteVirtualNetworkId $AZVNet3.id
Add-AzVirtualNetworkPeering -Name &apos;VNet3ToVnet1&apos; -VirtualNetwork $AZVNet3 -RemoteVirtualNetworkId $AZVNet1.id
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure VPN</title><link>https://sajalchoudhary.net/til/azure-vpn/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-vpn/</guid><pubDate>Mon, 15 Jul 2024 16:13:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;IP Sec tunnel&lt;/li&gt;
&lt;li&gt;Encrypted&lt;/li&gt;
&lt;li&gt;Not preferred as traffic goes through the internet&lt;/li&gt;
&lt;li&gt;[[202408241243 How to create a VPN Gateway|How to create a VPN Gateway]]&lt;ul&gt;
&lt;li&gt;[[202408241255 How to create P2S VPN|P2S VPN]]&lt;/li&gt;
&lt;li&gt;[[202408241251 How to create S2S VPN|S2S VPN]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If any [[202404121703 Azure VNet|VNet]] changes, for example new [[202407151908 VNet Peering|VNet Peering]] etc, need to reinstall VPN client with new config downloaded from [[202312231415 Azure Master|Azure]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;P2S VPN - Connects a specific device to a virtual network&lt;/li&gt;
&lt;li&gt;﻿﻿S2S VPN - Connects a network to a virtual network&lt;/li&gt;
&lt;li&gt;﻿﻿S2S VPN gateways enable multiple VPN connections to different networks if route not policy based&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;High availability scenarios&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Active/Standby&lt;ol&gt;
&lt;li&gt;Default &lt;/li&gt;
&lt;li&gt;Automatic failover in case of issues or planned maintenance&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Active/Active&lt;ol&gt;
&lt;li&gt;Get 2 [[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]]&lt;/li&gt;
&lt;li&gt;Uses BGP routing&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[[202404141339 Azure ExpressRoute|Express Route]] failover&lt;ol&gt;
&lt;li&gt;Gateway as secure failover for [[202404141339 Azure ExpressRoute|Express Route]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Zone-redundant gateways&lt;ol&gt;
&lt;li&gt;[[202407151913 Azure VPN|Azure VPN]] and [[202404141339 Azure ExpressRoute|Express Route]] as zone-redundant deployments, where supported&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways&quot;&gt;MS Docs&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-about&quot;&gt;P2S VPN&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal&quot;&gt;S2S VPN&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/describe-azure-compute-networking-services/10-virtual-private-networks&quot;&gt;High availability scenarios for VPN&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VNet Peering</title><link>https://sajalchoudhary.net/til/vnet-peering/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vnet-peering/</guid><pubDate>Mon, 15 Jul 2024 16:08:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;One of the options for [[202404131313 Connecting virtual networks|Connecting virtual networks]] / the best option&lt;/li&gt;
&lt;li&gt;Peered traffic goes on Azure Backbone network and is private&lt;/li&gt;
&lt;li&gt;When Networks are peered, we can use [[202407151913 Azure VPN|Azure VPN Gateway]] in the peered network for [[202404131337 Connecting to Onprem|Connecting to Onprem]]&lt;ul&gt;
&lt;li&gt;Gateway transit makes it so, that I don&apos;t have to setup a [[202407151913 Azure VPN|Azure VPN Gateway]] in the peer [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;[[202407151943 Create VNet Peering in Azure|Create VNet Peering in Azure]]&lt;ul&gt;
&lt;li&gt;When creating [[202407151908 VNet Peering|VNet Peering]] with az cli or [[202207181612 Powershell|Powershell]] only one side of peering gets created. We need to create both sides.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Typical topology is hub and spoke&lt;ul&gt;
&lt;li&gt;VNET2 below is hub&lt;/li&gt;
&lt;li&gt;Typically you will put the [[202407151913 Azure VPN|Azure VPN Gateway]] in this hub network and let other networks use it. Same for other things like NVAs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Not transitive i.e. VNET1 can not talk to VNET3 / Need to create peering relationship between them&lt;ul&gt;
&lt;li&gt;Without peering, I could add Azure Firewall or Network virtual appliance in Hub network (VNET2) and tell:&lt;ul&gt;
&lt;li&gt;VNET3 if you want to talk to VNET1, next hop is IP of that forwarder&lt;/li&gt;
&lt;li&gt;VNET1 if you want to talke to VNET3, next hop is IP of that forwarder&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;This above thing is UDR (User defined routing)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If we add a new ip address space to one vnet, we just need to sync peering not re-create peering or anything&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
VNET1 --&amp;gt; |Peer| VNET2 --&amp;gt; |Peer| VNET3
VNET1 --- |NotTransitive|VNET3
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;global ([[202404121703 Azure VNet|VNet]] in different regions)&lt;/li&gt;
&lt;li&gt;regional ([[202404121703 Azure VNet|VNet]] in same region)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/integrate-vnets-with-vnet-peering/2-connect-services-using-vnet-peering&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To enable gateway transit, configure the &lt;strong&gt;Allow gateway transit&lt;/strong&gt; option in the hub virtual network where you deployed the gateway connection to your on-premises network. Also configure the &lt;strong&gt;Use remote gateways&lt;/strong&gt; option in any spoke virtual networks.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Add rules to NSG in Azure</title><link>https://sajalchoudhary.net/til/add-rules-to-nsg-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/add-rules-to-nsg-in-azure/</guid><pubDate>Sun, 14 Jul 2024 11:33:00 GMT</pubDate><content:encoded>&lt;p&gt;In continuation to [[202407141419 Create NSG in Azure|Create NSG in Azure]] about adding rules to [[202404141419 Network Security Groups|NSG]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
# Variables
$RGName = &quot;user-fiahxmxusscf&quot;
$Region = &quot;eastus&quot;
$port=3389 
$rulename=&quot;Allow-RDP&quot; 
$nsgname=&quot;sf-vnet-security&quot;
$NICName = &quot;nic2&quot;

# Get the NSG resource 
$nsg = Get-AzNetworkSecurityGroup -Name $nsgname -ResourceGroupName $RGname 

# Add the inbound security rule. 
$nsg | Add-AzNetworkSecurityRuleConfig -Name $rulename -Description &quot;Allow RDP&quot; -Access Allow ` -Protocol * -Direction Inbound -Priority 3891 -SourceAddressPrefix &quot;*&quot; -SourcePortRange * ` -DestinationAddressPrefix * -DestinationPortRange $port

# Update the NSG. 
$nsg | Set-AzNetworkSecurityGroup
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create NSG in Azure</title><link>https://sajalchoudhary.net/til/create-nsg-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-nsg-in-azure/</guid><pubDate>Sun, 14 Jul 2024 11:19:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# Variables
$RGName = &quot;user-fiahxmxusscf&quot;
$Region = &quot;eastus&quot;
$port=8081 
$rulename=&quot;allowAppPort$port&quot; 
$nsgname=&quot;sf-vnet-security&quot;
$NICName = &quot;nic2&quot;


# Create NSG
New-AzNetworkSecurityGroup -Name $nsgname -ResourceGroupName $RGName  -Location $Region

# Attach NSG to VM NIC
## Get NIC
$VMNIC = Get-AzNetworkInterface -Name $NICName -ResourceGroupName $RGName

## Get NSG
$NSG = Get-AzNetworkSecurityGroup -Name $nsgname -ResourceGroupName $RGName

##Attach NSG
$VMNIC.NetworkSecurityGroup = $NSG

## Set NIC
$VMNIC | Set-AzNetworkInterface


&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create VM in Azure</title><link>https://sajalchoudhary.net/til/create-vm-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-vm-in-azure/</guid><pubDate>Sun, 14 Jul 2024 11:12:00 GMT</pubDate><content:encoded>&lt;h1&gt;Resources&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;A [[202404051818 Resource Groups|resource group]]&lt;/li&gt;
&lt;li&gt;A [[202404121703 Azure VNet|VNet]] in the [[202404051818 Resource Groups|resource group]]&lt;/li&gt;
&lt;li&gt;A [[202404121727 Azure VM NIC|VM NIC]] in the [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;Public IP (Needs to be added in nic resource in bicep)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;VM Config&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;VM Size&lt;/li&gt;
&lt;li&gt;VM Image&lt;/li&gt;
&lt;li&gt;Admin credential&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;az vm create --resource-group &quot;learn-c165c4fd-2e56-45a2-ace8-195a1095e650&quot; --no-wait --name ResearchVM --location westeurope --vnet-name ResearchVNet --subnet Data --image Ubuntu2204 --admin-username azureuser --admin-password &amp;lt;password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# Variabels
$RGName = &quot;user-fiahxmxusscf&quot;
$Region = &quot;eastus&quot;
$VMName = &quot;vm1&quot;

# Set the administrator and password for the VM. ##
$cred = Get-Credential

## Place the virtual network into a variable. ##
$vnet = Get-AzVirtualNetwork -Name &apos;vnet1&apos; -ResourceGroupName $RGName

## Create a network interface for the VM. ##
$nic = @{
    Name = &quot;nic2&quot;
    ResourceGroupName = $RGName
    Location = $Region
    Subnet = $vnet.Subnets[0]
}
$nicVM = New-AzNetworkInterface @nic

## Create a virtual machine configuration. ##
$vmsz = @{
    VMName = $VMName
    VMSize = &apos;Standard_DS1_v2&apos;  
}
$vmos = @{
    ComputerName = $VMName
    Credential = $cred
}
$vmimage = @{
    PublisherName = &apos;MicrosoftWindowsServer&apos;
    Offer = &apos;windowsserver&apos;
    Skus = &apos;2022-datacenter-azure-edition&apos;
    Version = &apos;latest&apos;    
}
$vmConfig = New-AzVMConfig @vmsz | Set-AzVMOperatingSystem @vmos -Windows | Set-AzVMSourceImage @vmimage | Add-AzVMNetworkInterface -Id $nicVM.Id

## Create the VM. ##
$vm = @{
    ResourceGroupName = $RGName
    Location = $Region
    VM = $vmConfig
}
New-AzVM @vm
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create VNet in Azure</title><link>https://sajalchoudhary.net/til/create-vnet-in-azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-vnet-in-azure/</guid><pubDate>Sun, 14 Jul 2024 11:08:00 GMT</pubDate><content:encoded>&lt;p&gt;Create [[202404121703 Azure VNet|VNet]] in [[202312231415 Azure Master|Azure]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Variables
$VNetName = &apos;vnet1&apos;
$VNetRange = &apos;10.0.0.0/24&apos;
$RGName = &apos;user-fiahxmxusscf&apos;
$Location = &apos;eastus&apos;
$SubnetName = &apos;default&apos;
$SubnetRange = &apos;10.1.0.0/22&apos;


# Create vnet
$vnet = @{
    Name = $VNetName
    ResourceGroupName = $RGName
    Location = $Location
    AddressPrefix = $VNetRange
}
$virtualNetwork = New-AzVirtualNetwork @vnet

# Add subnet
$subnet = @{
    Name = $SubNetName
    VirtualNetwork = $virtualNetwork
    AddressPrefix = $SubnetRange
}
$subnetConfig = Add-AzVirtualNetworkSubnetConfig @subnet

# Set vnet
$virtualNetwork | Set-AzVirtualNetwork
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Application Security Groups</title><link>https://sajalchoudhary.net/til/application-security-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/application-security-groups/</guid><pubDate>Sun, 14 Jul 2024 11:03:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;ASGs allow VMs to be grouped together based on application role&lt;/li&gt;
&lt;li&gt;This allows to architect network around app architecture&lt;/li&gt;
&lt;li&gt;[[202407141403 Application Security Groups|ASG]] can be added as source or destination in [[202404141419 Network Security Groups|NSG]]&lt;ul&gt;
&lt;li&gt;[[202407141403 Application Security Groups|ASG]] on its own is nothing, just a grouping it needs to be added via [[202404141419 Network Security Groups|NSG]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Get Azure VM Images</title><link>https://sajalchoudhary.net/til/get-azure-vm-images/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/get-azure-vm-images/</guid><pubDate>Sun, 14 Jul 2024 10:33:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# Get Offers
Get-AzVMImageOffer -Location &quot;East Us&quot; -PublisherName &quot;MicrosoftWindowsServer&quot;

# Get SKus
Get-AzVMImageSku -Location &quot;East Us&quot; -PublisherName &quot;MicrosoftWindowsServer&quot; -Offer &quot;windowsserver&quot;

# Get VM Image
Get-AzVMImage -Location &quot;East Us&quot; -PublisherName &quot;MicrosoftWindowsServer&quot; -Offer &quot;windowsserver&quot; -Skus &quot;2022-datacenter-azure-edition&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure custom script extension</title><link>https://sajalchoudhary.net/til/azure-custom-script-extension/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-custom-script-extension/</guid><pubDate>Fri, 12 Jul 2024 14:45:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;downloads and runs a script on an [[202404161835 Azure VM Basics|Azure VM]]&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware disable warning for esxi ssh service</title><link>https://sajalchoudhary.net/til/vmware-disable-warning-for-esxi-ssh-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-disable-warning-for-esxi-ssh-service/</guid><pubDate>Fri, 12 Jul 2024 11:03:00 GMT</pubDate><content:encoded>&lt;p&gt;UserVars &amp;gt; UserVars.SuppressShellWarning.&lt;br /&gt;Set value from 0 to 1.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/367599/cluster-warning-for-esxi-shell-and-ssh-a.html&quot;&gt;Cluster warning for ESXi Shell and SSH appear on an ESXi 5.x and 6.x host (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware set SSH service</title><link>https://sajalchoudhary.net/til/vmware-set-ssh-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-set-ssh-service/</guid><pubDate>Fri, 12 Jul 2024 10:40:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Start service
get-vmhost hostname | get-vmhostservice | where-object {$_.key -eq &quot;TSM-SSH&quot;} | start-vmhostservice -confirm:$false

# Stop service
get-vmhost hostname | get-vmhostservice | where-object {$_.key -eq &quot;TSM-SSH&quot;} | start-vmhostservice -confirm:$false

# Set startup policy
# Automatic = Start automatically if any ports are open, and stop when all ports are closed
# On = Start and stop with host
# Off = Start and stop manually
get-vmhost hostname | get-vmhostservice | where-object {$_.key -eq &quot;TSM-SSH&quot;} | set-vmhostservice -policy &quot;On&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.cloudyfuture.net/2016/08/02/manage-esxi-ssh-using-powercli/&quot;&gt;Manage ESXi SSH Using PowerCLI - Cloudy Future&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Update</title><link>https://sajalchoudhary.net/til/update/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/update/</guid><pubDate>Wed, 10 Jul 2024 11:42:00 GMT</pubDate><content:encoded>&lt;p&gt;Registry:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Get-Item &apos;HKLM:\Software\Microsoft\Windows Nt\CurrentVersion\Winlogon&apos;

cachedlogonscount            : 4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set the following GPO&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/interactive-logon-number-of-previous-logons-to-cache-in-case-domain-controller-is-not-available&quot;&gt;Interactive logon Number of previous logons to cache (in case domain controller is not available) - Windows 10 | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell get certs on system</title><link>https://sajalchoudhary.net/til/powershell-get-certs-on-system/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-get-certs-on-system/</guid><pubDate>Tue, 09 Jul 2024 13:31:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;PS C:\Users\845874.adm&amp;gt; Get-ChildItem Cert:\ -Recurse | Where-Object { $_.PSIsContainer -eq $false} | Where-Object { $_.Subject -like &quot;*solar*&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://devblogs.microsoft.com/scripting/powertip-get-all-your-local-certificates-by-using-powershell/&quot;&gt;PowerTip: Get all your local certificates by using PowerShell - Scripting Blog [archived] (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Disable autoplay for all devices</title><link>https://sajalchoudhary.net/til/disable-autoplay-for-all-devices/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/disable-autoplay-for-all-devices/</guid><pubDate>Tue, 09 Jul 2024 11:58:00 GMT</pubDate><content:encoded>&lt;h1&gt;Registry&lt;/h1&gt;
&lt;p&gt;Registry Hive: HKEY_LOCAL_MACHINE&lt;br /&gt;Registry Path: \SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\  &lt;/p&gt;
&lt;p&gt;Value Name: NoDriveTypeAutoRun  &lt;/p&gt;
&lt;p&gt;Value Type: REG_DWORD&lt;br /&gt;Value: 0x000000ff (255)&lt;/p&gt;
&lt;h1&gt;GPO&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Computer Configuration &amp;gt;&amp;gt; Administrative Templates &amp;gt;&amp;gt; Windows Components &amp;gt;&amp;gt; AutoPlay Policies &amp;gt;&amp;gt; &quot;Turn off AutoPlay&quot; to &quot;Enabled:All Drives&quot;.
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.stigviewer.com/stig/windows_10/2019-01-04/finding/V-63673&quot;&gt;Autoplay must be disabled for all drives. (stigviewer.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Run powershell command as scheduled task</title><link>https://sajalchoudhary.net/til/run-powershell-command-as-scheduled-task/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/run-powershell-command-as-scheduled-task/</guid><pubDate>Mon, 08 Jul 2024 09:01:00 GMT</pubDate><content:encoded>&lt;p&gt;Define action as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Action as:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

# Arguments as : -Command &amp;amp;{} 
-command &amp;amp;{get-process &amp;gt;&amp;gt; c:\fso\ServiceProcessBios.txt; get-service | where{$_.Status -eq ‘Running’} &amp;gt;&amp;gt; c:\fso\ServiceProcessBios.txt; Get-WmiObject Win32_bios &amp;gt;&amp;gt; c:\fso\ServiceProcessBios.txt}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://devblogs.microsoft.com/scripting/use-scheduled-tasks-to-run-powershell-commands-on-windows/&quot;&gt;Use Scheduled Tasks to Run PowerShell Commands on Windows - Scripting Blog [archived] (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remove child items skipping one</title><link>https://sajalchoudhary.net/til/remove-child-items-skipping-one/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remove-child-items-skipping-one/</guid><pubDate>Mon, 08 Jul 2024 08:59:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
Get-ChildItem -Path &quot;C:\Windows\System32\winevt\Logs\*&quot; -File -Include Archive-Sec* | Sort-Object LastWriteTime -Descending | Select-Object -Skip 1 | Remove-Item -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Set advanced setting vmware</title><link>https://sajalchoudhary.net/til/set-advanced-setting-vmware/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/set-advanced-setting-vmware/</guid><pubDate>Fri, 05 Jul 2024 12:34:00 GMT</pubDate><content:encoded>&lt;p&gt;.Set-AdvancedSetting can be used to set it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Get-AdvancedSetting -Entity (Get-Cluster -Name Cluster) -Name SettingName | Set-AdvancedSetting -Value NewValue

Set-VmHostAdvancedConfiguration
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Obsolete: &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://developer.broadcom.com/powercli/latest/vmware.vimautomation.core/commands/set-advancedsetting?scrollString=Set-AdvancedSetting&quot;&gt;Set-AdvancedSetting Command | Vmware PowerCLI Reference (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Enable or disable lockdown mode on vcenter</title><link>https://sajalchoudhary.net/til/enable-or-disable-lockdown-mode-on-vcenter/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/enable-or-disable-lockdown-mode-on-vcenter/</guid><pubDate>Fri, 05 Jul 2024 07:22:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;#To enable Lockdown mode using PowerCLI, run this command:  
 
(get-vmhost &amp;lt;hostname&amp;gt; | get-view).EnterLockdownMode() | get-vmhost | select Name,@{N=&quot;LockDown&quot;;E={$_.Extensiondata.Config.adminDisabled}} | ft -auto

  
#To disable Lockdown mode, run this command:  
  
(get-vmhost _&amp;lt;hostname&amp;gt;_ | get-view).ExitLockdownMode()  
  
#To batch modify Lockdown mode using PowerCLI, save this text in a *.PS1 file and run with PowerCLI:

$vCenter = &apos;_vCenterServer_Name_or_IP_address_&apos;

Connect-VIServer $vCenter

$Scope = Get-VMHost #This will change the Lockdown Mode on all hosts managed by vCenter

foreach ($ESXhost in $Scope) {

(get-vmhost $ESXhost | get-view).ExitLockdownMode() # To DISABLE Lockdown Mode

#(get-vmhost $ESXhost | get-view).EnterLockdownMode() # To ENABLE Lockdown Mode

}

Disconnect-VIServer -Server $vCenter -Confirm:$false
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/336894/enabling-or-disabling-lockdown-mode-on-a.html&quot;&gt;Enabling or disabling Lockdown mode on an ESXi host (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Replace CNO for cluster</title><link>https://sajalchoudhary.net/til/replace-cno-for-cluster/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/replace-cno-for-cluster/</guid><pubDate>Wed, 03 Jul 2024 13:20:00 GMT</pubDate><content:encoded>&lt;h1&gt;Issue&lt;/h1&gt;
&lt;p&gt;CNO which was created was deleted on AD side, and new computer object was created.&lt;br /&gt;Cluster validation fails with &quot;Unable to find computer object&quot;&lt;/p&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create a new computer node. Ignore if CNO already exists.&lt;/li&gt;
&lt;li&gt;Get objectGUID attribute in hexadecimal. Remove spaces and convert in lower case.&lt;/li&gt;
&lt;li&gt;On the cluster nodes,  use Regedit and view &lt;strong&gt;HKLM\Cluster&lt;/strong&gt; and identify the value of &lt;strong&gt;ClusterNameResource&lt;/strong&gt;. It will be a long ugly number and is the Cluster Name Resource GUID.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;HKLM\Cluster\Resources\ClusterNameResourceGUID\Parameters&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Edit the &lt;strong&gt;ObjectGUID&lt;/strong&gt; key and replace the value with the value you copied in step 3. This tells the cluster to use the new CNO.&lt;/li&gt;
&lt;li&gt;Edit on all nodes. &lt;/li&gt;
&lt;li&gt;Try cluster repair.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://byronwright.blogspot.com/2014/06/replace-missing-cluster-name-object-for.html&quot;&gt;Field Notes of a Computer Geek: Replace Missing Cluster Name Object for DAG (byronwright.blogspot.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Import Export</title><link>https://sajalchoudhary.net/til/azure-import-export/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-import-export/</guid><pubDate>Sat, 29 Jun 2024 11:58:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;To import/export large amount of data to and from Azure using physically shipping drives etc&lt;ul&gt;
&lt;li&gt;Recommendation to use Azure Data Box to import to Azure&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h2&gt;WAImportExport tool prepares drive to write data to&lt;br /&gt;  - formats, checks for errors, encrypts disk&lt;br /&gt;  - creates journal file&lt;br /&gt;  - V1 - for blob&lt;br /&gt;  - V2 - for [[202406291221 Azure Files|Azure Files]]&lt;/h2&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/export-data-with-azure-import-export/2-what-is-azure-import-export&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/import-export/storage-import-export-service&quot;&gt;https://learn.microsoft.com/en-us/azure/import-export/storage-import-export-service&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/import-export/storage-import-export-data-to-files?tabs=azure-portal-preview&quot;&gt;Import data to Azure Files&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Modify the &lt;em&gt;dataset.csv&lt;/em&gt; file in the root folder where the tool is. Depending on whether you want to import a file or folder or both, add entries in the &lt;em&gt;dataset.csv&lt;/em&gt; file&lt;br /&gt;Modify the &lt;em&gt;driveset.csv&lt;/em&gt; file in the root folder where the tool is. Add entries in the &lt;em&gt;driveset.csv&lt;/em&gt; file similar to the following examples. The driveset file has the list of disks and corresponding drive letters so that the tool can correctly pick the list of disks to be prepared.&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Migrating between redundancy types in Azure Storage</title><link>https://sajalchoudhary.net/til/migrating-between-redundancy-types-in-azure-storage/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/migrating-between-redundancy-types-in-azure-storage/</guid><pubDate>Sat, 29 Jun 2024 11:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404091908 Azure Storage Redundancy]]&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Switching From&lt;/th&gt;
&lt;th&gt;...to LRS&lt;/th&gt;
&lt;th&gt;...to GRS/RA-GRS&lt;/th&gt;
&lt;th&gt;...to ZRS&lt;/th&gt;
&lt;th&gt;...to GZRS/RA-GZRS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;LRS&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;Use Azure portal, PowerShell, or CLI to change the replication setting&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Request a live migration&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Switch to GRS/RA-GRS first and then request a live migration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GRS/RA-GRS&lt;/td&gt;
&lt;td&gt;Use Azure portal, PowerShell, or CLI to change the replication setting&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Switch to LRS first and then request a live migration&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Request a live migration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ZRS&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;Use Azure portal, Power Shell, or CLI to change the replication setting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GZRS/RA-GZRS&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;/td&gt;
&lt;td&gt;Perform a manual migration&lt;/td&gt;
&lt;td&gt;Use Azure portal, Power Shell, or CLI to change the replication setting&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Files</title><link>https://sajalchoudhary.net/til/azure-files/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-files/</guid><pubDate>Sat, 29 Jun 2024 09:21:00 GMT</pubDate><content:encoded>&lt;p&gt;Type of [[202404121117 Azure Storage Services|Azure storage service]].&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using NFS/SMB&lt;/li&gt;
&lt;li&gt;Simultaneously mount to cloud or on-prem&lt;/li&gt;
&lt;li&gt;Can be used for storing:&lt;ul&gt;
&lt;li&gt;Config files&lt;/li&gt;
&lt;li&gt;Logs/metrics&lt;/li&gt;
&lt;li&gt;Tools/utilities&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Files are true directory objects&lt;/li&gt;
&lt;li&gt;[[202404121239 Azure File Sync|Azure File Sync]] in case we have on-prem Fileservers and want to cache content on-prem for faster access&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Premium (SMB/REST/NFS)&lt;/li&gt;
&lt;li&gt;Standard (SMB/REST)&lt;br /&gt;Can&apos;t go from premium to standard&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Access Tiers&lt;/h1&gt;
&lt;p&gt;Can switch between the tiers&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Standard&lt;ol&gt;
&lt;li&gt;Transaction Optimized&lt;/li&gt;
&lt;li&gt;Hot&lt;/li&gt;
&lt;li&gt;Cool&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Premium&lt;ol&gt;
&lt;li&gt;Premium&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Snapshots&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;On File Share level&lt;/li&gt;
&lt;li&gt;Incremental&lt;/li&gt;
&lt;li&gt;Need only the latest copy for restore&lt;/li&gt;
&lt;li&gt;If you delete a file share, all snapshots are gone as well&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Soft delete&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Not for NFS&lt;/li&gt;
&lt;li&gt;retention between 1 and 365 days after deletion&lt;/li&gt;
&lt;li&gt;At [[202404091859 Azure Storage Account|Azure storage account]] level&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware not possible to forward only auth logs to splunk</title><link>https://sajalchoudhary.net/til/vmware-not-possible-to-forward-only-auth-logs-to-splunk/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-not-possible-to-forward-only-auth-logs-to-splunk/</guid><pubDate>Thu, 27 Jun 2024 10:02:00 GMT</pubDate><content:encoded>&lt;p&gt;We can either forward all logs to splunk. Or no logs. &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/318939/configuring-syslog-on-esxi.html&quot;&gt;Configuring syslog on ESXi (broadcom.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Convert etl to pcap packet capture</title><link>https://sajalchoudhary.net/til/convert-etl-to-pcap-packet-capture/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/convert-etl-to-pcap-packet-capture/</guid><pubDate>Mon, 24 Jun 2024 10:08:00 GMT</pubDate><content:encoded>&lt;p&gt;Use the ETL2PCAPNG tool. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/microsoft/etl2pcapng/&quot;&gt;Github repo&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Etl2pcapng.exe file.etl newfile.pcapng
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/converting-etl-files-to-pcap-files/ba-p/1133297&quot;&gt;Converting ETL Files to PCAP Files - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create windows firewall with gpo</title><link>https://sajalchoudhary.net/til/create-windows-firewall-with-gpo/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-windows-firewall-with-gpo/</guid><pubDate>Thu, 20 Jun 2024 13:11:00 GMT</pubDate><content:encoded>&lt;h1&gt;Configure firewall service&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Computer Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Policies&lt;/strong&gt; &amp;gt; &lt;strong&gt;Windows Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Security Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;System Services&lt;/strong&gt;. Find &lt;strong&gt;Windows Firewall&lt;/strong&gt; in the list of services and change the startup type to Automatic (Define this policy setting -&amp;gt; Service startup mode Automatic).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Computer Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Policies&lt;/strong&gt; &amp;gt; &lt;strong&gt;Administrative Templates&lt;/strong&gt; &amp;gt; &lt;strong&gt;Network&lt;/strong&gt; &amp;gt; &lt;strong&gt;Network Connections&lt;/strong&gt; &amp;gt; &lt;strong&gt;Windows Defender&lt;/strong&gt; &amp;gt; &lt;strong&gt;Firewall&lt;/strong&gt; &amp;gt; &lt;strong&gt;Domain Profile&lt;/strong&gt; and enable the policy Windows Defender Firewall: Protect all network connections.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Computer Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Windows Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Security Settings&lt;/strong&gt; section. Right-click &lt;strong&gt;Windows Firewall with Advanced Security&lt;/strong&gt; and open the properties. Make sure to enable the &lt;strong&gt;Firewall State&lt;/strong&gt; to On(Recommended) on each of the profiles you will be using (enabling on all is best practice).&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Configure firewall rules&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Computer Configuration&lt;/strong&gt; &amp;gt; &lt;strong&gt;Policies&lt;/strong&gt; &amp;gt; &lt;strong&gt;Windows Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Security Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Windows Firewall with Advanced Security.&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can use custom to specify port and remote address and app as well.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We need the following information:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Remote Address,App,Protocol,Port,Purpose
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;App can be any (basically .exe path needs to be provided)&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.blumira.com/windows-firewall-with-gpos/&quot;&gt;How To Manage Windows Firewall with GPOs | Blumira&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>gpo</category><category>firewall</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Difference between Entra ID and ADDS</title><link>https://sajalchoudhary.net/til/difference-between-entra-id-and-adds/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/difference-between-entra-id-and-adds/</guid><pubDate>Sat, 15 Jun 2024 14:43:00 GMT</pubDate><content:encoded>&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;ADDS&lt;/th&gt;
&lt;th&gt;Entra&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Structure&lt;/td&gt;
&lt;td&gt;hierarchical: OUs, GPOs.&lt;/td&gt;
&lt;td&gt;flat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Computer objects&lt;/td&gt;
&lt;td&gt;Has&lt;/td&gt;
&lt;td&gt;Does not have&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query/Manage&lt;/td&gt;
&lt;td&gt;LDAP&lt;/td&gt;
&lt;td&gt;REST over HTTP/HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Protocol&lt;/td&gt;
&lt;td&gt;Kerberos&lt;/td&gt;
&lt;td&gt;HTTP and HTTPS protocols such as SAML, WS-Federation, and OpenID Connect for authentication, and uses OAuth for authorization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Federation&lt;/td&gt;
&lt;td&gt;Trusts for delegation&lt;/td&gt;
&lt;td&gt;Can be Federated with 3rd parties&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/understand-azure-active-directory/3-compare-azure-active-directory-domain-services&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ARM Bicep</title><link>https://sajalchoudhary.net/til/arm-bicep/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/arm-bicep/</guid><pubDate>Sat, 15 Jun 2024 09:19:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202405011242 ARM template|ARM JSON]] is complex&lt;/li&gt;
&lt;li&gt;Bicep abstracts away this JSON so that it is simpler to define what we want.&lt;/li&gt;
&lt;li&gt;Bicep is domain specific language, so can only be used to create [[202405011242 ARM template|ARM template]]&lt;/li&gt;
&lt;li&gt;There is no state management, [[202404061212 Azure Resources|ARM]] knows what resources are present&lt;/li&gt;
&lt;li&gt;Might not be useful in multi-cloud setups or if we have a different tool already, like [[202407162143 Terraform|Terraform]]&lt;/li&gt;
&lt;li&gt;By default [[202404061212 Azure Resources|resources]] are deployed in parallel&lt;ul&gt;
&lt;li&gt;we can control this by using &lt;code&gt;@batchSize&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# Convert to json
bicep compile

# Convert from json
bicep decompile
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;How to install&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# Add the tap for bicep 
brew tap azure/bicep 

# Install the tool 
brew install bicep
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Also add to VSCode from extensions&lt;/h2&gt;
&lt;h1&gt;How to deploy&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# deploy resource

az deployment group create --template-file main.bicep --resource-group storage-resource-group
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;New-AzResourceGroupDeployment -TemplateFile main.bicep -ResourceGroupName zyz
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Use VS Code extension to simplify development&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[[202407191859 Bicep parameters|Bicep parameters]]&lt;br /&gt;	[[202407191925 Use Azure Key Vault with bicep|Use Azure Key Vault with bicep]]&lt;br /&gt;[[202407191900 Bicep variables|Bicep variables]]&lt;br /&gt;[[202407191832 Bicep Modules|Bicep Modules]]&lt;br /&gt;[[202407191939 Bicep loops|Bicep loops]]&lt;br /&gt;[[202407191932 Bicep conditionals|Bicep conditionals]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/learn-bicep&quot;&gt;MS Learn for Bicep&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/introduction-to-infrastructure-as-code-using-bicep/4-what-bicep&quot;&gt;Learn module&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/build-first-bicep-template/5-add-flexibility-parameters-variables&quot;&gt;MS Learn syntax&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>bicep</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Resource Graph</title><link>https://sajalchoudhary.net/til/azure-resource-graph/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-resource-graph/</guid><pubDate>Sat, 15 Jun 2024 08:33:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Querying [[202404061212 Azure Resources|ARM]] can be slow and expensive. There is a quota. So we use [[202406151133 Azure Resource Graph|Azure Resource Graph]]&lt;ul&gt;
&lt;li&gt;12000 per hour&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Provides a Read only database&lt;ul&gt;
&lt;li&gt;periodically does a full scan and overwrites as needed&lt;/li&gt;
&lt;li&gt;also gets notified in case of changes. allows for change tracking.&lt;/li&gt;
&lt;li&gt;is up-to-date&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Use KQL to find info from [[202406151133 Azure Resource Graph|Azure Resource Graph]]&lt;/li&gt;
&lt;li&gt;Also has quota but it resets very fast&lt;ul&gt;
&lt;li&gt;15, resets every 5 seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware find out when vmotion happened</title><link>https://sajalchoudhary.net/til/vmware-find-out-when-vmotion-happened/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-find-out-when-vmotion-happened/</guid><pubDate>Thu, 13 Jun 2024 11:58:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Go to VM logs. This is where VM folder is created. You can check on vmware console and then find the datastore where vmware.log file is present. Usually there will be older archives also.&lt;/li&gt;
&lt;li&gt;Login to esxi.&lt;/li&gt;
&lt;li&gt;Go to appropriate datastore.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;cd /vmfs/volumes/

# Then go to specific datastore, and vm
# Example

/vmfs/volumes/619f4a5d-3c47f70a-e703-0025b502024e/ctmhecp
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;cat to find instances. Note there might be duplicates so check logs accordingly.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;cat vmware*.log | grep -i MigrateSetInfo
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2019/09/troubleshooting-vmotion.html&quot;&gt;Troubleshooting vMotion - VMware vSphere Blog&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Virtual Machine log file entries&lt;br /&gt;The virtual machine log file resides in the virtual machine home folder that also includes the vmx file and the vmdk files. Using root access on your ESXi host, you can go to appropriate folder. My test VM resides on vSAN, so I would look for the virtual machine home directory using symlink /vmfs/volumes/vsanDatastore. Using the following command shows even more information about the live-migration like the source and destination IP addresses:&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>vmware</category><category>vmotion</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Well Architected Framework</title><link>https://sajalchoudhary.net/til/well-architected-framework/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/well-architected-framework/</guid><pubDate>Sat, 08 Jun 2024 09:05:00 GMT</pubDate><content:encoded>&lt;p&gt;[[202312231415 Azure Master|Azure]] Well Architected Framework provides a set of guidelines  around how to design a workload. This framework concerns itself with architecture and not implementation.&lt;/p&gt;
&lt;p&gt;It consists of: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pillars | [[202406011159 Five pillars of Azure well architected framework|Five pillars of Azure well architected framework]]&lt;ul&gt;
&lt;li&gt;Each pillar has set of design principles&lt;/li&gt;
&lt;li&gt;Next there are checklists.&lt;/li&gt;
&lt;li&gt;Next Tradeoffs&lt;/li&gt;
&lt;li&gt;Next Recommendations (which are just patterns)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Workloads &lt;/li&gt;
&lt;li&gt;Service Guides (Azure specific)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>architecture</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows clear all events</title><link>https://sajalchoudhary.net/til/windows-clear-all-events/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-clear-all-events/</guid><pubDate>Thu, 06 Jun 2024 10:02:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Five pillars of Azure well architected framework</title><link>https://sajalchoudhary.net/til/five-pillars-of-azure-well-architected-framework/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/five-pillars-of-azure-well-architected-framework/</guid><pubDate>Sat, 01 Jun 2024 08:59:00 GMT</pubDate><content:encoded>&lt;h1&gt;Cost effectiveness&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;traditionally, costs associates were upfront, considered capex&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;moving to cloud, it is considered opex&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;so can be cost effective just showing this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pay less for services&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;related to [[202404061425 Azure Cost Management|cost]]&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;how?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;plan and estimate: design and then use cost-estimation to figure out how much you will pay&lt;ul&gt;
&lt;li&gt;get discounts where possible by using reserved instances for example. also for licenses, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;optimization: design with cost optimization at the center. &lt;ul&gt;
&lt;li&gt;PaaS is better than IaaS. choose service levels, etc based on usage requirements.&lt;/li&gt;
&lt;li&gt;optimize consumption based pricing: compare prices for dedicated vs consumption based pricing for apps.&lt;/li&gt;
&lt;li&gt;optimize HA: active-active or active only is better than active-passive&lt;/li&gt;
&lt;li&gt;clean unused apps/services&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;monitoring: related to above. monitor and figure out. and then resize/optimize.&lt;/li&gt;
&lt;li&gt;efficiency: related to above. ensure everything is utilized effectively. reduce waste.&lt;ul&gt;
&lt;li&gt;examples: VM utilization (should not be free). storage utilization (data not required to be read often, not kept in archive) etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Operational excellence&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;full visibility into how your applications is working&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;how?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;devops practices to ensure agility. ci/cd containers. or legacy. does not matter.&lt;/li&gt;
&lt;li&gt;effective monitoring - identify cost wastes and troubleshooting, etc.&lt;/li&gt;
&lt;li&gt;automation - reduce human errors. easier management.&lt;/li&gt;
&lt;li&gt;testing - reduce issues with releases.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Performance Efficiency&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;matching available resources with the demands being put on the app&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;how?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;scaling up and out&lt;ul&gt;
&lt;li&gt;up/vertical - make something larger&lt;/li&gt;
&lt;li&gt;out/horizontal - add similar resources&lt;/li&gt;
&lt;li&gt;ideally, use autoscaling&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;optimize network&lt;ul&gt;
&lt;li&gt;add message layer, so that requests keep flowing&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;optimize storage&lt;ul&gt;
&lt;li&gt;partitioning to access/manage data differently&lt;/li&gt;
&lt;li&gt;caching&lt;ul&gt;
&lt;li&gt;placing static content closer to users, i.e. CDNs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;identify poorly performing code or bottlenecks&lt;ul&gt;
&lt;li&gt;performance monitoring&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Reliability&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;how to handle failures&lt;ul&gt;
&lt;li&gt;hardware failures&lt;/li&gt;
&lt;li&gt;data loss&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;including ha in our design&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;how?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;build ha systems dependent of the sla we are committing&lt;/li&gt;
&lt;li&gt;recoverability/ once the below are defined, we can design accordingly&lt;ul&gt;
&lt;li&gt;related to [[202404071556 Disaster Recovery|Disaster Recovery]]&lt;/li&gt;
&lt;li&gt;[[202404081931 Recovery Point Objective|RPO]]&lt;/li&gt;
&lt;li&gt;[[202404081933 Recovery Time Objective|RTO]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Security&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;protecting data&lt;/li&gt;
&lt;li&gt;[[202404051739 Governance Overview|azure governance]] i.e. shared responsibility model depending on what you&apos;re using&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;how?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;increase security in layers/ so that attacker has to do more work&lt;ul&gt;
&lt;li&gt;data - exposing encryption key or using weak encryption can cause issues&lt;/li&gt;
&lt;li&gt;apps - code injection and execution - eg sql injection and cross site scripting&lt;/li&gt;
&lt;li&gt;vm/compute - malwares&lt;/li&gt;
&lt;li&gt;networking - unnecessarily open ports are a problem&lt;/li&gt;
&lt;li&gt;perimeter - ddos attacks&lt;/li&gt;
&lt;li&gt;policies and access - exposure of creds. limit access. monitoring to see where logins are coming from.&lt;/li&gt;
&lt;li&gt;physical - security badge stealing. door drafting, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/paths/azure-well-architected-framework/&quot;&gt;MS Learn - Well architected Framework&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/well-architected/what-is-well-architected-framework&quot;&gt;MS Learn Docs - WAF&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>architecture</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Delete IPs from existing subnet in Solarwinds IPAM</title><link>https://sajalchoudhary.net/til/delete-ips-from-existing-subnet-in-solarwinds-ipam/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/delete-ips-from-existing-subnet-in-solarwinds-ipam/</guid><pubDate>Thu, 30 May 2024 07:22:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Go to Manage Subnets and IP Address&lt;/li&gt;
&lt;li&gt;Select the subnet&lt;/li&gt;
&lt;li&gt;In the view to the right, there is Select IP range option. Give the starting IP Address and Ending IP Address.&lt;/li&gt;
&lt;li&gt;Then Select + Delete&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://documentation.solarwinds.com/en/success_center/ipam/content/ipam-delete-monitored-ip-addresses-from-a-defined-subnet.htm&quot;&gt;Remove monitored IP addresses from a subnet (solarwinds.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>solarwinds</category><category>ipam</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible VMware module does sysprep by default</title><link>https://sajalchoudhary.net/til/ansible-vmware-module-does-sysprep-by-default/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-vmware-module-does-sysprep-by-default/</guid><pubDate>Tue, 28 May 2024 12:30:00 GMT</pubDate><content:encoded>&lt;p&gt;When using &lt;a href=&quot;https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_module.html&quot;&gt;community.vmware.vmware_guest module – Manages virtual machines in vCenter — Ansible Community Documentation&lt;/a&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It uses syprep by default when it recognises it is a windows image&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is an issue because after running [[202209261330 Windows sysprep reference|Sysprep]] we need to relogin to set things like time zone, etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_module.html&quot;&gt;community.vmware.vmware_guest module – Manages virtual machines in vCenter — Ansible Community Documentation&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Uses SysPrep for Windows VM (depends on ‘guest_id’ parameter match ‘win’) with PyVmomi.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>ansible</category><category>windows</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell Training Overview</title><link>https://sajalchoudhary.net/til/powershell-training-overview/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-training-overview/</guid><pubDate>Wed, 22 May 2024 10:15:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Introduction&lt;ol&gt;
&lt;li&gt;PowerShell - Shell + Scripting and how to run it&lt;/li&gt;
&lt;li&gt;extensible&lt;/li&gt;
&lt;li&gt;Check version&lt;/li&gt;
&lt;li&gt;Running with VS code&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Help System&lt;ol&gt;
&lt;li&gt;-online tag&lt;/li&gt;
&lt;li&gt;about topics&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Running commands - Day1&lt;ol&gt;
&lt;li&gt;execution policy&lt;/li&gt;
&lt;li&gt;Cmdlets / form / convention&lt;/li&gt;
&lt;li&gt;using parameter names &lt;ol&gt;
&lt;li&gt;positional&lt;/li&gt;
&lt;li&gt;required&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;shortcuts&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Providers (How to use files and folders) &lt;ol&gt;
&lt;li&gt;PSProviders - maps things to powershell for use&lt;/li&gt;
&lt;li&gt;Using wildcards&lt;/li&gt;
&lt;li&gt;Registry things&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Pipeline&lt;ol&gt;
&lt;li&gt;Connecting&lt;/li&gt;
&lt;li&gt;Export&lt;/li&gt;
&lt;li&gt;Killing processes&lt;/li&gt;
&lt;li&gt;How powershell passes data down the pipeline | pipeline parameter binding --&amp;gt; Day2&lt;ol&gt;
&lt;li&gt;First ByValue&lt;/li&gt;
&lt;li&gt;Then ByPropertyName&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Select with Name and Expression&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Extensions&lt;ol&gt;
&lt;li&gt;Modules&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Objects&lt;ol&gt;
&lt;li&gt;What and why?&lt;/li&gt;
&lt;li&gt;Get-member&lt;/li&gt;
&lt;li&gt;How to use&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Formatting - Day 3&lt;ol&gt;
&lt;li&gt;ft (with Name and expression)&lt;/li&gt;
&lt;li&gt;fl&lt;/li&gt;
&lt;li&gt;out&lt;/li&gt;
&lt;li&gt;out-gridview&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Filtering and comparison&lt;ol&gt;
&lt;li&gt;Filter left (as close to the first cmdlet as possible)&lt;/li&gt;
&lt;li&gt;Comparison Operators&lt;/li&gt;
&lt;li&gt;Where-Object&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Remote control - Day 4&lt;ol&gt;
&lt;li&gt;WinRMGet&lt;/li&gt;
&lt;li&gt;-ComputerName&lt;/li&gt;
&lt;li&gt;Enter-PSSession/ Exit-PSSession&lt;/li&gt;
&lt;li&gt;Invoke-Command/Invoke-Scriptblock&lt;/li&gt;
&lt;li&gt;Diff between remote and local commands&lt;ol&gt;
&lt;li&gt;lack methods (readonly copy)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;New-PSsession / Remove-PSSession&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Variables - Day 5&lt;ol&gt;
&lt;li&gt;Types&lt;/li&gt;
&lt;li&gt;Quotes&lt;/li&gt;
&lt;li&gt;Arrays&lt;ol&gt;
&lt;li&gt;how to access object&lt;/li&gt;
&lt;li&gt;how to access one property for multiple objects&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;$() - subexpression&lt;/li&gt;
&lt;li&gt;specify type using []&lt;/li&gt;
&lt;li&gt;Best practices&lt;ol&gt;
&lt;li&gt;No space&lt;/li&gt;
&lt;li&gt;Name properly with description&lt;/li&gt;
&lt;li&gt;define type&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Input/Output&lt;ol&gt;
&lt;li&gt;Read-Host&lt;/li&gt;
&lt;li&gt;Write-Host&lt;/li&gt;
&lt;li&gt;Write-Output&lt;/li&gt;
&lt;li&gt;Otherways&lt;/li&gt;
&lt;li&gt;-verbose&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Scripting - Day 6&lt;ol&gt;
&lt;li&gt;Parameterization (help about_functions_advanced_parameters)&lt;ol&gt;
&lt;li&gt;[CmdletBinding()]&lt;/li&gt;
&lt;li&gt;Mandatory&lt;/li&gt;
&lt;li&gt;aliases&lt;/li&gt;
&lt;li&gt;validate&lt;/li&gt;
&lt;li&gt;Setting default parameter values&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Comments and stuff&lt;/li&gt;
&lt;li&gt;Scopes&lt;/li&gt;
&lt;li&gt;Functions&lt;ol&gt;
&lt;li&gt;begin&lt;/li&gt;
&lt;li&gt;process&lt;/li&gt;
&lt;li&gt;end&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Logic and loops - Day 7&lt;ol&gt;
&lt;li&gt;foreach &lt;/li&gt;
&lt;li&gt;foreach-object - pipeline&lt;ol&gt;
&lt;li&gt;alias %&lt;/li&gt;
&lt;li&gt;-parallel&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;While&lt;/li&gt;
&lt;li&gt;do while&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Error handling - Day 8&lt;ol&gt;
&lt;li&gt;Error variables&lt;/li&gt;
&lt;li&gt;Error action&lt;/li&gt;
&lt;li&gt;Error action preference (when -erroraction is not available)&lt;/li&gt;
&lt;li&gt;try catch finally blocks&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Debugging&lt;/li&gt;
&lt;li&gt;Random&lt;ol&gt;
&lt;li&gt;different versions of powershell&lt;/li&gt;
&lt;li&gt;Operators : -in, -contains, -join and -split, -replace, -as and -is&lt;/li&gt;
&lt;li&gt;Handling text&lt;/li&gt;
&lt;li&gt;Handling date&lt;ol&gt;
&lt;li&gt;WMI dates - ConvertDateTime and ConvertToDateTime&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Script blocks&lt;ol&gt;
&lt;li&gt;&amp;amp; operator - to run commands&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;WMI and cim&lt;/li&gt;
&lt;li&gt;$null/empty strings/zero&lt;ol&gt;
&lt;li&gt;how to compare&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Linux schedule a task to run at specific time</title><link>https://sajalchoudhary.net/til/linux-schedule-a-task-to-run-at-specific-time/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/linux-schedule-a-task-to-run-at-specific-time/</guid><pubDate>Wed, 22 May 2024 07:30:00 GMT</pubDate><content:encoded>&lt;p&gt;Use the at command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;at 02:30
&amp;gt; sosreport --batch

## Ctrl+D to get out of it
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>linux</category><category>bash</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows cluster packet loss causing failover</title><link>https://sajalchoudhary.net/til/windows-cluster-packet-loss-causing-failover/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-packet-loss-causing-failover/</guid><pubDate>Fri, 03 May 2024 08:58:00 GMT</pubDate><content:encoded>&lt;p&gt;Windows Failover Diagnostic logs might have error 2051.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[RES] SQL Server &amp;lt;SQL Server (OPSQL19C1VS1)&amp;gt;: [sqsrvres] Failure detected, diagnostics heartbeat is lost
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To check use perfmon to add counter for &quot;Network Interface\Packets Received Discarded&quot;&lt;br /&gt;If it has non-zero value, then we have an issue.&lt;/p&gt;
&lt;p&gt;To fix, we can increase:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Small Rx Buffers&lt;/strong&gt; and increase the value (The maximum value is 8192).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Rx Ring #1 Size&lt;/strong&gt; and increase the value (The maximum value is 4096)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The settings ensure that packets which are not getting used, can get stored in buffer and processed when they can be. There can be a small performance impact.&lt;/p&gt;
&lt;p&gt;These settings do not require reboot but may have small drop. So should be done during maintenance hours.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/archive/blogs/askcore/nodes-being-removed-from-failover-cluster-membership-on-vmware-esx&quot;&gt;Nodes being removed from Failover Cluster membership on VMWare ESX? | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2039495&quot;&gt;Large packet loss in the guest OS using VMXNET3 in ESXi (2039495) (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://serverfault.com/questions/711693/vmxnet3-receive-buffer-sizing-and-memory-usage&quot;&gt;windows - VMXNET3 receive buffer sizing and memory usage - Server Fault&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>failover</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Alerting</title><link>https://sajalchoudhary.net/til/azure-alerting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-alerting/</guid><pubDate>Thu, 02 May 2024 15:49:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;From all the logs captured in [[202404281601 Azure monitoring old]] we could create a dashboard&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Self Service Password Reset</title><link>https://sajalchoudhary.net/til/entra-self-service-password-reset/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-self-service-password-reset/</guid><pubDate>Thu, 02 May 2024 15:35:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;If user is logged in, they can reset their passwords&lt;/li&gt;
&lt;li&gt;If user is not logged in, or they forgot their password, with [[202405021835 Entra Self Service Password Reset|SSPR]] they can reset their passwords.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;How it works&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Portal checks users location and renders [[202405021835 Entra Self Service Password Reset|SSPR]] in appropriate language&lt;/li&gt;
&lt;li&gt;User enters username and captcha --&amp;gt; to ensure its not a bot&lt;/li&gt;
&lt;li&gt;User answers security questions | Authentication step&lt;/li&gt;
&lt;li&gt;Password reset&lt;/li&gt;
&lt;li&gt;Notification&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Authentication options&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Mobile app auth&lt;/li&gt;
&lt;li&gt;Mobile app code &lt;/li&gt;
&lt;li&gt;Email a code&lt;/li&gt;
&lt;li&gt;Mobile phone --&amp;gt; SMS or call&lt;/li&gt;
&lt;li&gt;Office phone&lt;/li&gt;
&lt;li&gt;Security questions&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In free and trial Microsoft Entra organizations, phone call options aren&apos;t supported.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We can specify how many auth methods:  1 or 2&lt;ul&gt;
&lt;li&gt;Recommended 2: Mobile app primary, also email or office phone&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Mobile phone not recommended as SMS can be spoofed&lt;/li&gt;
&lt;li&gt;Security questions least recommended&lt;/li&gt;
&lt;li&gt;For admins: &lt;ul&gt;
&lt;li&gt;Always 2 methods&lt;/li&gt;
&lt;li&gt;security questions disabled&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;License&lt;/h1&gt;
&lt;p&gt;P1/P2 or Microsoft 365 Apps for business or Microsoft 365.&lt;br /&gt;For hybrid deployments, password write-back option to be enabled P1/P2 license or Microsoft 365 Apps for business.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ARM template</title><link>https://sajalchoudhary.net/til/arm-template/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/arm-template/</guid><pubDate>Wed, 01 May 2024 09:42:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404061212 Azure Resources|azure resources]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ARM template is a JSON file that specifies what resources to deploy. Kind of like an IaC. This allows one to redeploy similar things with consistency and speed.&lt;/li&gt;
&lt;li&gt;Resources are deployed in parallel&lt;/li&gt;
&lt;li&gt;Preview with whatif options in [[202207181612 Powershell|Powershell]] or CLI&lt;/li&gt;
&lt;li&gt;Testing/validation with [[202406151219 ARM Bicep|Bicep]] linter&lt;/li&gt;
&lt;li&gt;Breakup into smaller files and link later&lt;/li&gt;
&lt;li&gt;Extension: run powershell/bash from inside the template&lt;/li&gt;
&lt;li&gt;deployment mode&lt;ul&gt;
&lt;li&gt;incremental&lt;ul&gt;
&lt;li&gt;default&lt;/li&gt;
&lt;li&gt;does not destroy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;complete - exactly match whatever is there in template&lt;ul&gt;
&lt;li&gt;so it can destroy existing resources if they are not in the template&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/&quot;&gt;Arm templates docs&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The template has the following sections:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/parameters&quot;&gt;Parameters&lt;/a&gt; - Provide values during deployment that allow the same template to be used with different environments. &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/variables&quot;&gt;Variables&lt;/a&gt; - Define values that are reused in your templates. They can be constructed from parameter values.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/user-defined-functions&quot;&gt;User-defined functions&lt;/a&gt; - Create customized functions that simplify your template.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/resource-declaration&quot;&gt;Resources&lt;/a&gt; - Specify the resources to deploy.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/outputs&quot;&gt;Outputs&lt;/a&gt; - Return values from the deployed resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/introduction-to-infrastructure-as-code-using-bicep/3-what-azure-resource-manager&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure monitoring old</title><link>https://sajalchoudhary.net/til/azure-monitoring-old/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-monitoring-old/</guid><pubDate>Sun, 28 Apr 2024 13:01:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202312231415 Azure Master|Azure]] is shared responsibility model&lt;/li&gt;
&lt;li&gt;As we go from IaaS to PaaS to SaaS, we are responsible for less stuff&lt;/li&gt;
&lt;li&gt;I might not be responsible ([[202404281600 RACI matrix|RACI]]) for something, but I might be accountable for it. Might be a regulatory requirement. &lt;ul&gt;
&lt;li&gt;[[202404281601 Azure monitoring old|Azure monitoring]] allows for us to do that.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Monitoring is available for all resources, usually a tab under the resource&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Monitoring [[202404011327 Entra ID|&quot;Entra ID&quot;]] - 7/30 days retention&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Sign-in logs&lt;/li&gt;
&lt;li&gt;Audit logs&lt;/li&gt;
&lt;li&gt;Provisioning logs&lt;/li&gt;
&lt;li&gt;30 days for premium license&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Monitoring subscription - 90 days retention&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Activity log (Control plane logs for everything under the subscription)&lt;/li&gt;
&lt;li&gt;Service health&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Monitoring [[202404061212 Azure Resources|resources]] (ARM) - 93 days&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Metrics (Numerical value with Time)&lt;ul&gt;
&lt;li&gt;Like CPU utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Logs (Need to be configured)&lt;ul&gt;
&lt;li&gt;Different for different resources&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Host logs - OS, IIS, etc&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Azure Monitor agent - needs to be deployed to capture these logs&lt;/li&gt;
&lt;li&gt;You configure Data Collection Rules&lt;ul&gt;
&lt;li&gt;what needs to be captured&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;k8s logs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;AMA --&amp;gt; Log Analytics Workspace &lt;/li&gt;
&lt;li&gt;Prometheus metrics --&amp;gt; Azure Monitor Workspace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Applications&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Metrics and Logs&lt;/li&gt;
&lt;li&gt;App Insight&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Rest API&lt;/h2&gt;
&lt;h1&gt;Diagnostic Settings&lt;/h1&gt;
&lt;p&gt;Where do the logs go to? And what log is captured?&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Where?&lt;/th&gt;
&lt;th&gt;Why?&lt;/th&gt;
&lt;th&gt;Pay For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;Cheap, long-term storage&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Event Hub&lt;/td&gt;
&lt;td&gt;External SIEM&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log Analytics Workspace (Logs)&lt;/td&gt;
&lt;td&gt;Storage + Analyze&lt;/td&gt;
&lt;td&gt;ingestion + retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Azure Monitor Workspace&lt;/td&gt;
&lt;td&gt;Storage + Analyze / for k8s&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;Log Analytics Workspace (Logs)&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;has 2 years max retention&lt;/li&gt;
&lt;li&gt;configurable retention&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Types of Logs&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;i could search and restore to analytics logs to perform richer searches, etc. from [[#Basic Logs]] or [[#Archive Logs]]&lt;/li&gt;
&lt;li&gt;Export table to storage or event hub periodically&lt;ul&gt;
&lt;li&gt;for custom filters need to create app/serverless&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Analytics Logs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;searchable, etc.&lt;/li&gt;
&lt;li&gt;costliest&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Basic Logs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;8 days retention (fixed)&lt;/li&gt;
&lt;li&gt;limited queries&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Archive Logs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;upto 7 years&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-azure-monitor/2-describe-key-capabilities&quot;&gt;MS Learn - monitoring&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>monitoring</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of analysis</title><link>https://sajalchoudhary.net/til/types-of-analysis/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-analysis/</guid><pubDate>Sat, 27 Apr 2024 12:18:00 GMT</pubDate><content:encoded>&lt;h1&gt;Descriptive&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;What happened?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Diagnostics&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Why?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Predictive&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Will something happen?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Prescriptive&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;WHAT TO DO?&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;COGNITIVE&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Conclusions&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>data</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Extract Transform Load</title><link>https://sajalchoudhary.net/til/extract-transform-load/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/extract-transform-load/</guid><pubDate>Sat, 27 Apr 2024 12:03:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404261946 Data flow|How data flows]] in the context of enterprise apps.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>wip</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of data related roles</title><link>https://sajalchoudhary.net/til/types-of-data-related-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-data-related-roles/</guid><pubDate>Sat, 27 Apr 2024 11:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Database Admin&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Design, implement and manage DB&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tools they use - #todo&lt;/h2&gt;
&lt;h1&gt;Data Engineer&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Understand data flow/lifecycle&lt;/li&gt;
&lt;li&gt;Designs data pipeline&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tools they use - #TODO&lt;/h2&gt;
&lt;h1&gt;Data Analyst&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Explore data, find relationships&lt;/li&gt;
&lt;li&gt;Create models that are then used by business&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Tools they use - #TODO&lt;/h2&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>wip</category><category>evergreen</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ACID</title><link>https://sajalchoudhary.net/til/acid/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/acid/</guid><pubDate>Sat, 27 Apr 2024 11:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Atomic&lt;/h1&gt;
&lt;h1&gt;&lt;/h1&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>database</category><category>wip</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Type of Databases</title><link>https://sajalchoudhary.net/til/type-of-databases/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/type-of-databases/</guid><pubDate>Sat, 27 Apr 2024 10:58:00 GMT</pubDate><content:encoded>&lt;h1&gt;OLTP&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Transactional processing&lt;/li&gt;
&lt;li&gt;Need to update what is happening&lt;/li&gt;
&lt;li&gt;High volume of small transactions&lt;/li&gt;
&lt;li&gt;Fast access&lt;/li&gt;
&lt;li&gt;Normalised DB &lt;ul&gt;
&lt;li&gt;De-duplication&lt;/li&gt;
&lt;li&gt;Other things, basically things need to fit in a table&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;[[202404271400 ACID|ACID]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;OLAP&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Analytical Processing&lt;/li&gt;
&lt;li&gt;Large data volume&lt;/li&gt;
&lt;li&gt;Historical data&lt;/li&gt;
&lt;li&gt;Mainly read only&lt;/li&gt;
&lt;li&gt;[[202404261931 Azure Data warehouse and analytics]]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>database</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Data flow</title><link>https://sajalchoudhary.net/til/data-flow/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/data-flow/</guid><pubDate>Fri, 26 Apr 2024 16:46:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Data flows in [[202404271503 Extract Transform Load|ETL]] or [[202404271503 Extract Transform Load|ELT]] form.&lt;/li&gt;
&lt;li&gt;Azure Data factory is a solution to give this control&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
Source --&amp;gt; Extract --&amp;gt; Transform --&amp;gt; Load 
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
Source --&amp;gt; Extract --&amp;gt; Load --&amp;gt; Transform --&amp;gt; Load2
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Data source&lt;/h1&gt;
&lt;p&gt;Data source is either in:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Batch&lt;ol&gt;
&lt;li&gt;Data is gathered somewhere and then processed in one go.&lt;/li&gt;
&lt;li&gt;Interval processing&lt;/li&gt;
&lt;li&gt;Large volume of data&lt;/li&gt;
&lt;li&gt;Some latency will be there&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Serial&lt;ol&gt;
&lt;li&gt;Data keeps coming. We process it as it arrives&lt;/li&gt;
&lt;li&gt;We will usually have some hub which collects it and then passes it along. like IoT hub, etc.&lt;/li&gt;
&lt;li&gt;Low latency&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;ETL&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Extract Transform Load&lt;/li&gt;
&lt;li&gt;ETL used to be in earlier days when storage was costlier&lt;/li&gt;
&lt;li&gt;So we would transform the data and then go to load stage&lt;/li&gt;
&lt;li&gt;Transform is either &lt;ul&gt;
&lt;li&gt;Mapping&lt;/li&gt;
&lt;li&gt;Wrangling&lt;/li&gt;
&lt;li&gt;Complex (HD insights, etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Load is stored in DB, or [[202404261931 Azure Data warehouse and analytics]] &lt;/li&gt;
&lt;li&gt;And then finally analyze phase&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;ELT&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Storage is cheap now.&lt;/li&gt;
&lt;li&gt;So we store it in something like [[202404121149 Azure Data Lake]] &lt;/li&gt;
&lt;li&gt;The benefit is that in future we may want to transform it in some new way&lt;ul&gt;
&lt;li&gt;But if we transform like in ETL then that data is lost and we can&apos;t do anything&lt;/li&gt;
&lt;li&gt;Now we have loaded it in [[202404121149 Azure Data Lake]] so we can use it later as needed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>data</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Data warehouse and analytics</title><link>https://sajalchoudhary.net/til/azure-data-warehouse-and-analytics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-data-warehouse-and-analytics/</guid><pubDate>Fri, 26 Apr 2024 16:31:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;large amount of data. &lt;/li&gt;
&lt;li&gt;mostly at the end of some pipeline/historical data // storage + analytics&lt;/li&gt;
&lt;li&gt;read access.&lt;/li&gt;
&lt;li&gt;mostly an analytics thing where you want to draw patterns out of this massive corpus of data&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>data</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Cosmos DB</title><link>https://sajalchoudhary.net/til/azure-cosmos-db/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-cosmos-db/</guid><pubDate>Fri, 26 Apr 2024 16:04:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;This was built for the cloud / designed for global distribution / multi-write [[#Variable consistencies]]&lt;/li&gt;
&lt;li&gt;All types of NoSQL data can be stored in it&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Variable consistencies&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Because distance is large, there will always be drawbacks&lt;/li&gt;
&lt;li&gt;A tension between performance and consistency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;STRONG | BOUNDED STALENESS | SESSION | CONSISTENT PREFIX | EVENTUAL&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Strong means everyone will see the same read.
Session means everyone in the same session will see the same thing. (Most common)
Eventual means eventually everyone will see the same thing.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What we choose depends on the type of app we are building.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>database</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Search ADAccount Timespan for AccountInactive</title><link>https://sajalchoudhary.net/til/search-adaccount-timespan-for-accountinactive/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/search-adaccount-timespan-for-accountinactive/</guid><pubDate>Thu, 25 Apr 2024 13:12:00 GMT</pubDate><content:encoded>&lt;p&gt;Search-ADAccount uses LastlogonTimeStamp for -TimeSpan when used with -AccountInactive&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/activedirectory/search-adaccount?view=windowsserver2022-ps&quot;&gt;Search-ADAccount (ActiveDirectory) | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>When doing chassis replacement decommission chassis first</title><link>https://sajalchoudhary.net/til/when-doing-chassis-replacement-decommission-chassis-first/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/when-doing-chassis-replacement-decommission-chassis-first/</guid><pubDate>Wed, 24 Apr 2024 16:08:00 GMT</pubDate><content:encoded>&lt;p&gt;When doing chassis replacement decommission chassis first&lt;br /&gt;Otherwise old chassis remains.&lt;/p&gt;
&lt;p&gt;New chassis comes as chassis +1&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Open source DB</title><link>https://sajalchoudhary.net/til/azure-open-source-db/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-open-source-db/</guid><pubDate>Wed, 24 Apr 2024 14:15:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Supports many different options&lt;/li&gt;
&lt;li&gt;fully managed&lt;/li&gt;
&lt;li&gt;Based on community editions&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;DB for&lt;/h1&gt;
&lt;h2&gt;postgres (great for oracle)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;all [[#Modes]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;mysql&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;mode : single and flexible&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;mariadb&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;mode: single only&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Modes&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;single (legacy)&lt;/li&gt;
&lt;li&gt;flexible (the one which is better going forward)&lt;/li&gt;
&lt;li&gt;hyperscale&lt;ul&gt;
&lt;li&gt;basic (1 node) / can upgrade at any time&lt;/li&gt;
&lt;li&gt;standard (1 controller + 2 workers)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>database</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure SQL</title><link>https://sajalchoudhary.net/til/azure-sql/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-sql/</guid><pubDate>Tue, 23 Apr 2024 16:33:00 GMT</pubDate><content:encoded>&lt;h1&gt;SQL VM&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;IaaS option - SQL server running on a VM in the cloud.&lt;/li&gt;
&lt;li&gt;You manage patching, etc.&lt;/li&gt;
&lt;li&gt;Agent extension to move it closer to Paas/Can be upgraded to full later on&lt;ul&gt;
&lt;li&gt;Lightweight mode (Inventory/Change SKUs)&lt;/li&gt;
&lt;li&gt;Full mode&lt;ul&gt;
&lt;li&gt;Auto patch&lt;/li&gt;
&lt;li&gt;storage&lt;/li&gt;
&lt;li&gt;azure backup&lt;/li&gt;
&lt;li&gt;key vault for secret management&lt;/li&gt;
&lt;li&gt;HA&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;SQL Managed Instance&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;PaaS offering&lt;/li&gt;
&lt;li&gt;In your [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;Multiple DBs per instance&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;SQL DB&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Full PaaS - serverless&lt;/li&gt;
&lt;li&gt;Deployment Modes&lt;ul&gt;
&lt;li&gt;Single DB&lt;/li&gt;
&lt;li&gt;Elastic Pool&lt;ul&gt;
&lt;li&gt;collection of single DBs with shared resources like CPU, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Purchasing models&lt;ul&gt;
&lt;li&gt;vCore based&lt;ul&gt;
&lt;li&gt;Tiers:&lt;ul&gt;
&lt;li&gt;General purpose&lt;/li&gt;
&lt;li&gt;Enterprise&lt;/li&gt;
&lt;li&gt;Hyperscale&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;DTU based (older style)&lt;ul&gt;
&lt;li&gt;Tiers:&lt;ul&gt;
&lt;li&gt;Basic&lt;/li&gt;
&lt;li&gt;Standard&lt;/li&gt;
&lt;li&gt;Premium&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Service tiers&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;For both managed and azure sql db&lt;/li&gt;
&lt;li&gt;For both we can specify zone-&lt;/li&gt;
&lt;li&gt;Lives under a logical DB server&lt;ul&gt;
&lt;li&gt;We can specify network, auditing, etc. in there&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Standard&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;primary (data is stored separately)&lt;/li&gt;
&lt;li&gt;if primary goes down, secondary is brought online connects to the data source and starts working&lt;/li&gt;
&lt;li&gt;expected to be a bit of downtime&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Premium/Business critical&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;primary (data and logs are stored with it)&lt;/li&gt;
&lt;li&gt;primary replicates to a set of secondaries&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-sql/?view=azuresql&quot;&gt;Azure SQL overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-on-azure-vm-iaas-what-is-overview?view=azuresql&quot;&gt;SQL VM&lt;/a&gt; and &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-iaas-agent-extension-automate-management?view=azuresql&amp;amp;tabs=azure-portal&quot;&gt;Agent extension&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison?view=azuresql&quot;&gt;Feature comparison&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>database</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Download host metrics report from Ansible Automation Platform</title><link>https://sajalchoudhary.net/til/download-host-metrics-report-from-ansible-automation-platform/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/download-host-metrics-report-from-ansible-automation-platform/</guid><pubDate>Tue, 23 Apr 2024 08:54:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# To get output in csv
awx-manage host_metric --csv

# To download a tarball
awx-manage host_metric --tarball

&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;API&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://taapservice.op-palvelut.fi/api/v2/host_metrics/?format=api&amp;amp;page_size=200&quot;&gt;https://taapservice.op-palvelut.fi/api/v2/host_metrics/?format=api&amp;amp;page_size=200&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.4/html-single/automation_controller_user_guide/index#controller-keep-subscription-in-compliance&quot;&gt;Automation Controller User Guide Red Hat Ansible Automation Platform 2.4 | Red Hat Customer Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to decommission an ESXi</title><link>https://sajalchoudhary.net/til/how-to-decommission-an-esxi/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-decommission-an-esxi/</guid><pubDate>Mon, 22 Apr 2024 10:46:00 GMT</pubDate><content:encoded>&lt;p&gt;General steps are these:&lt;/p&gt;
&lt;p&gt;1.       Put the ESXi host in maintenance mode - Compute&lt;br /&gt;2.       Remove host from vDS switch - Compute&lt;br /&gt;3.       Unmount and detach data LUNs / &lt;strong&gt;DO NOT DELETE DATA LUNS&lt;/strong&gt; - Compute&lt;br /&gt;4.       Remove host from the cluster (Remove from inventory) - Compute&lt;br /&gt;5.       Delete boot LUN for the host, and remove host from the cluster – Storage&lt;br /&gt;6.       Delete the service profile from UCS end - Compute&lt;br /&gt;7.       Remove host from monitoring – SolarWinds&lt;br /&gt;8.       Cleanup IPAM reservation, AD object and DNS reservation – Compute Windows&lt;br /&gt;9.       Mark ESXi as decommissioned in CMDB – SNOW team&lt;/p&gt;
&lt;p&gt;There might be some changes based on whether full cluster needs to be decommissioned.&lt;br /&gt;In this case, the data luns can be deleted.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.stephenwagner.com/2024/01/11/how-to-properly-decommission-vmware-esxi-host/&quot;&gt;How to properly decommission a VMware ESXi Host - The Tech Journal (stephenwagner.com)&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Process in Short:&lt;br /&gt;Enter Maintenance Mode&lt;br /&gt;Remove Host from vDS Switches&lt;br /&gt;Unmount and Detach iSCSI LUNs&lt;br /&gt;Move host from cluster to datacenter as standalone host&lt;br /&gt;Remove Host from Inventory&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>vmware</category><category>evergreen</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Static Web App</title><link>https://sajalchoudhary.net/til/azure-static-web-app/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-static-web-app/</guid><pubDate>Sat, 20 Apr 2024 11:40:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;globally distributed content for static websites/pre-rendered content&lt;/li&gt;
&lt;li&gt;Types: Free or standard&lt;/li&gt;
&lt;li&gt;can integrate with managed [[202404201427 Azure Functions|Azure Functions]]&lt;ul&gt;
&lt;li&gt;for some server side stuff if needed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can integrate with gitops&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Logic Apps</title><link>https://sajalchoudhary.net/til/azure-logic-apps/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-logic-apps/</guid><pubDate>Sat, 20 Apr 2024 11:38:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Runs on top of [[202404201427 Azure Functions|Azure Functions]]&lt;/li&gt;
&lt;li&gt;no code or low code&lt;ul&gt;
&lt;li&gt;gives gui to design things&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Functions</title><link>https://sajalchoudhary.net/til/azure-functions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-functions/</guid><pubDate>Sat, 20 Apr 2024 11:27:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;serverless (can run with [[202404201400 Azure App service#App service plan]])&lt;ul&gt;
&lt;li&gt;I just write the code&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;many languages supported&lt;/li&gt;
&lt;li&gt;Event driven such as HTTP, schedule, event grid, blob creation&lt;/li&gt;
&lt;li&gt;Binds to additional inputs and outputs&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Serverless&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
Event -.-&amp;gt; |Trigger| Work
Work &amp;lt;--&amp;gt; |BindingOrConnection| Services
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Point of serverless is there is some work you want to do&lt;/li&gt;
&lt;li&gt;Which is triggered by some event (schedule, message, api, etc)&lt;ul&gt;
&lt;li&gt;Can be many event sources (blob,app,etc) &lt;/li&gt;
&lt;li&gt;Which can be difficult to poll, etc.&lt;/li&gt;
&lt;li&gt;So what we get is Event grid&lt;ul&gt;
&lt;li&gt;which talks to all these sources and pushes the event to the event handler&lt;/li&gt;
&lt;li&gt;Event handlers for example [[202404201427 Azure Functions|Azure Functions]], webhooks, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;That work is integrated with services&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure App service</title><link>https://sajalchoudhary.net/til/azure-app-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-app-service/</guid><pubDate>Sat, 20 Apr 2024 11:00:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;original paas&lt;/li&gt;
&lt;li&gt;hosts web applications (http/gRPC)&lt;/li&gt;
&lt;li&gt;can scale up or out&lt;/li&gt;
&lt;li&gt;provides different [[202404121703 Azure VNet|VNet]] integration options&lt;ul&gt;
&lt;li&gt;private endpoint for inbound requests&lt;/li&gt;
&lt;li&gt;delegated subnet in our [[202404121703 Azure VNet|VNet]] for outbound requests to other Azure resources&lt;/li&gt;
&lt;li&gt;compared to [[202404201400 Azure App service#App service environments]] which are integrated to [[202404121703 Azure VNet|VNet]] and don&apos;t require these things&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can use App service for authentication and authorization&lt;/li&gt;
&lt;li&gt;Can backup&lt;ul&gt;
&lt;li&gt;requires a [[202404091847 Azure Storage Overview|Azure storage]] container in the same sub&lt;/li&gt;
&lt;li&gt;requires premium/standard&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can monitor using Azure insights&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Which OS supports what&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;az webapp list-runtimes --os linux
dotnetcore
node
python
php
java
jbosseap
tomcat

az webapp list-runtimes --os windows
dotnet
aspnet
node
java
tomcat
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;App service plan&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;You pick an App service plan. Based on the plan you get access to certain resources (certain number of nodes).&lt;/li&gt;
&lt;li&gt;On app service plan your apps run. So 2 apps in same service plan for example.&lt;/li&gt;
&lt;li&gt;You can move apps from one app service plan to other, but it has to be in same webspace (region+os+RG)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Deployment slots&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;For new deployment, it can be put in staging&lt;/li&gt;
&lt;li&gt;When ready, with a VIP swap, staging can be made production&lt;/li&gt;
&lt;li&gt;If any issues, with VIP swap we can put it back.&lt;/li&gt;
&lt;li&gt;Avoid cold start during deployment slots&lt;/li&gt;
&lt;li&gt;You can clone settings to new slot but not content&lt;/li&gt;
&lt;li&gt;Swap with preview breaks the process in two halves:&lt;ul&gt;
&lt;li&gt;slot specific settings are copied in phase 1&lt;ul&gt;
&lt;li&gt;we can check if for example db connection string breaks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;in phase 2, it would remove temporary changes and proceed with swap&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;App service environments&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;v3 used with v2 Isolated plans&lt;/li&gt;
&lt;li&gt;provides isolation &lt;ul&gt;
&lt;li&gt;this is deployed in your [[202404121703 Azure VNet|VNet]] when compared to App service which is shared&lt;/li&gt;
&lt;li&gt;control plane is separate Azure subnet&lt;/li&gt;
&lt;li&gt;Data plane is in our vnet&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;apps are deployed in app service plans&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Scaling&lt;/h1&gt;
&lt;p&gt;Scale out has two options&lt;br /&gt;	- Azure app service autoscaling (based on rules we define)&lt;br /&gt;		- Metric (on all the nodes a certain threshold should be reached)&lt;br /&gt;		- Scheduled&lt;br /&gt;	- Azure App Service automatic scaling&lt;br /&gt;		- avoid cold start issues&lt;/p&gt;
&lt;h2&gt;Best practices&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Enough margin between scale out and scale in values&lt;/li&gt;
&lt;li&gt;Use proper metric&lt;/li&gt;
&lt;li&gt;Different thresholds for scale out and in&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How does it work&lt;/h2&gt;
&lt;p&gt;Suppose:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;scale up when cpu &amp;gt;=80&lt;/li&gt;
&lt;li&gt;scale down by 1 when cpu &amp;lt;=60&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;you have 2 nodes. utilization in both goes above 80. so it scales up to 3 nodes.&lt;br /&gt;now assume utilization comes down to 60. it calculates after scale what will happen.&lt;br /&gt;current 60x3 = 180.&lt;br /&gt;after scale : 180/2 = 90. so it will not scale as 90 &amp;gt; 80&lt;br /&gt;later, utilization comes down to 50.&lt;br /&gt;current 50x3=150.&lt;br /&gt;after scale: 150/2 = 75. which is less than 80.&lt;br /&gt;so now it will scale down.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/app-service/overview&quot;&gt;App service overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-azure-app-services/6-add-deployment-slots&quot;&gt;Settings which get copied during app clone&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Swapped settings&lt;/th&gt;
&lt;th&gt;Slot-specific settings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;General settings, such as framework version, 32/64-bit, web sockets   &lt;br /&gt;App settings *****  &lt;br /&gt;Connection strings *****  &lt;br /&gt;Handler mappings   &lt;br /&gt;Public certificates   &lt;br /&gt;WebJobs content   &lt;br /&gt;Hybrid connections ******  &lt;br /&gt;Service endpoints ******  &lt;br /&gt;Azure Content Delivery Network ******  &lt;br /&gt;Path mapping&lt;/td&gt;
&lt;td&gt;Custom domain names   &lt;br /&gt;Nonpublic certificates and TLS/SSL settings   &lt;br /&gt;Scale settings   &lt;br /&gt;Always On   &lt;br /&gt;IP restrictions   &lt;br /&gt;WebJobs schedulers   &lt;br /&gt;Diagnostic settings   &lt;br /&gt;Cross-origin resource sharing (CORS)   &lt;br /&gt;Virtual network integration   &lt;br /&gt;Managed identities   &lt;br /&gt;Settings that end with the suffix _EXTENSION_VERSION&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-app-service-plans/3-determine-plan-pricing&quot;&gt;App service plans&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://azure.microsoft.com/en-in/pricing/details/app-service/linux/&quot;&gt;App service pricing&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Free&lt;/th&gt;
&lt;th&gt;Shared&lt;/th&gt;
&lt;th&gt;Basic&lt;/th&gt;
&lt;th&gt;Standard&lt;/th&gt;
&lt;th&gt;Premium&lt;/th&gt;
&lt;th&gt;Isolated&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Usage&lt;/td&gt;
&lt;td&gt;Development, Testing&lt;/td&gt;
&lt;td&gt;Development, Testing&lt;/td&gt;
&lt;td&gt;Dedicated development, Testing&lt;/td&gt;
&lt;td&gt;Production workloads&lt;/td&gt;
&lt;td&gt;Enhanced scale, performance&lt;/td&gt;
&lt;td&gt;High performance, security, isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web, mobile, or API applications&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disk space&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;10 GB&lt;/td&gt;
&lt;td&gt;50 GB&lt;/td&gt;
&lt;td&gt;250 GB&lt;/td&gt;
&lt;td&gt;1 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto scale&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment slots&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max instances&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;n/a&lt;/td&gt;
&lt;td&gt;Up to 3&lt;/td&gt;
&lt;td&gt;Up to 10&lt;/td&gt;
&lt;td&gt;Up to 30&lt;/td&gt;
&lt;td&gt;Up to 100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/scale-apps-app-service/3-app-service-autoscale-conditions-rules&quot;&gt;Azure app scaling&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Spring Apps</title><link>https://sajalchoudhary.net/til/azure-spring-apps/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-spring-apps/</guid><pubDate>Sat, 20 Apr 2024 10:57:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Runs on top of [[202404201210 Azure Kubernetes Service|AKS]], for java applications&lt;/li&gt;
&lt;li&gt;Deploys a spring cloud &lt;ul&gt;
&lt;li&gt;Open source&lt;/li&gt;
&lt;li&gt;VMware Tanzu (separate VMware license)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Three tiers&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Container Apps</title><link>https://sajalchoudhary.net/til/azure-container-apps/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-container-apps/</guid><pubDate>Sat, 20 Apr 2024 10:48:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Built on top of [[202404201210 Azure Kubernetes Service|AKS]], abstracts away the AKS layer. We focus on the application&lt;/li&gt;
&lt;li&gt;Brings envoy, dapr, keda&lt;ul&gt;
&lt;li&gt;Dapr - Distributed Application Runtime&lt;ul&gt;
&lt;li&gt;Event drivent runtime&lt;/li&gt;
&lt;li&gt;Runs a sidecar container&lt;/li&gt;
&lt;li&gt;basically an api that can be used by our app to call any dapper component&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;KEDA - Kubernetes Event Driven Autoscale&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Built-in AuthN and AuthZ&lt;ul&gt;
&lt;li&gt;Restrict Access setting to control&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Versioning using revisions&lt;ul&gt;
&lt;li&gt;which is immutable snapshot of container app version&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You can set environment variables and secrets&lt;ul&gt;
&lt;li&gt;Secrets once defined at app level are available in containers as environment variables&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Container Apps Environment&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;individual apps deployed to app environment which acts as security boundary&lt;/li&gt;
&lt;li&gt;Apps deployed in the same environment are deployed to same [[202404121703 Azure VNet|VNet]]  and write logs to the same log analytics workspace.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.dapr.io/concepts/overview/&quot;&gt;Dapr overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/container-apps/ingress-overview?tabs=bash&quot;&gt;https://learn.microsoft.com/en-us/azure/container-apps/ingress-overview?tabs=bash&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/container-apps/overview&quot;&gt;https://learn.microsoft.com/en-us/azure/container-apps/overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/implement-azure-container-apps/2-explore-azure-container-apps&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><category>container</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Kubernetes Service</title><link>https://sajalchoudhary.net/til/azure-kubernetes-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-kubernetes-service/</guid><pubDate>Sat, 20 Apr 2024 09:10:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202404201203 Azure Container Instance|Azure Container Instace]] is OK. But mostly we need more than one container. &lt;/li&gt;
&lt;li&gt;[[202404211433 Kubernetes|Kuberenetes]] is the orchestrator of choice. &lt;/li&gt;
&lt;li&gt;Two types: free and standard &lt;ul&gt;
&lt;li&gt;Standard has SLA / that is what we would use for production&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;We pay for the VMs (or nodes) which can auto-scale&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Features&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Can use [[202404201203 Azure Container Instance|ACI]] for cheap via virtual kubelet // need to specify in our manifest file&lt;/li&gt;
&lt;li&gt;Stop/start aks cluster&lt;/li&gt;
&lt;li&gt;Automatic healing&lt;/li&gt;
&lt;li&gt;Automatic upgrade&lt;ul&gt;
&lt;li&gt;Not to be used in prod as it might break things&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Gitops &lt;ul&gt;
&lt;li&gt;Make changes to your repo, that gets deployed to AKS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Managed ID use&lt;ul&gt;
&lt;li&gt;Create a user [[202312231441 Entra ID Managed Identities|MI]]&lt;/li&gt;
&lt;li&gt;Tag that to a service account created in AKS&lt;/li&gt;
&lt;li&gt;Then stuff happens and we can use IDs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;User node pools can use spot instances&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Structure&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;When we run commands (kubectl) it talks to API server. Other [[Kubernetes Components]] like etcd (DB), scheduler, etc talk to API server. All this is control plane.&lt;/li&gt;
&lt;li&gt;Then we have node pools, where basically the worker nodes run.&lt;ul&gt;
&lt;li&gt;There is type system which basically has things that [[Kubernetes]] needs to run.&lt;/li&gt;
&lt;li&gt;In node pools we have nodes. &lt;ul&gt;
&lt;li&gt;On each node we have [[Kubernetes Components]] like kubelet (which talks to api server for management), kubeproxy (for network stuff) and container runtime.&lt;/li&gt;
&lt;li&gt;Additionally, then we have our pods. Which are you know our services.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Namespaces allow for isolation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Autoscaling&lt;/h1&gt;
&lt;h2&gt;For pod scaling&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Horizontal pod auto-scaling&lt;ol&gt;
&lt;li&gt;If it sees it needs more pods it will autoscale.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Kubernetes Event driven autoscaling (KEDA)&lt;ol&gt;
&lt;li&gt;It will look at advanced metrics (queue, etc) to see if it needs more pods and then autoscale&lt;br /&gt;But, if after seeing that it needs more pods, and it is not able to scale then it goes for&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Cluster scaling&lt;/h2&gt;
&lt;p&gt;Basically, if pod is in waiting state, it will autoscale to add a node.&lt;/p&gt;
&lt;h1&gt;Networking&lt;/h1&gt;
&lt;p&gt;Max pods can be set as high as 250 at deployment time, otherwise you get defaults per below.&lt;/p&gt;
&lt;h2&gt;kubenet (default) (basic) Not for production&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Nodes get IP from subnet&lt;/li&gt;
&lt;li&gt;internal IP space for pods (NAT so that they can reach external resources/vice-versa)&lt;/li&gt;
&lt;li&gt;Max 110 pods per node (default)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Azure CNI (advanced)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;pods get ips from the same subnet&lt;/li&gt;
&lt;li&gt;needs to be planned in advance&lt;/li&gt;
&lt;li&gt;30 (default)/ 110 from portal (default)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Dynamic CNI&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Pod IPs from a different subnet&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;CNI overlay&lt;/h2&gt;
&lt;p&gt;Like kubenet, gets IPs from a different private subnet (which can be reused in a different cluster)&lt;/p&gt;
&lt;h1&gt;Storage&lt;/h1&gt;
&lt;p&gt;Containers can be created/re-created whenever.&lt;br /&gt;But there is a need for persistent storage.&lt;br /&gt;So pod makes a persistent volume claim (pvc) which goes to a persisten volume (pv) which can be on blob, disk, files, netapp, etc.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
pod --&amp;gt; pvc --&amp;gt; pv --&amp;gt; azureFiles &amp;amp; Blob &amp;amp; Disk &amp;amp; Netapp
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/aks/concepts-clusters-workloads&quot;&gt;Core concepts&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/aks/concepts-network&quot;&gt;Network concepts&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>container</category><category>appservices</category><category>k8s</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Container Instance</title><link>https://sajalchoudhary.net/til/azure-container-instance/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-container-instance/</guid><pubDate>Sat, 20 Apr 2024 09:03:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Basic container as service&lt;/li&gt;
&lt;li&gt;Can be windows or linux &lt;ul&gt;
&lt;li&gt;But some features are linux specific&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can be useful for one-off things/burst&lt;/li&gt;
&lt;li&gt;Multi-container groups on same host&lt;ul&gt;
&lt;li&gt;only for linux based containers&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can be deployed in vNet&lt;/li&gt;
&lt;li&gt;can mount additional storage&lt;ul&gt;
&lt;li&gt;azure file share&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Container group&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;top level resource&lt;/li&gt;
&lt;li&gt;deployed on one VM&lt;/li&gt;
&lt;li&gt;containers in a group share same resources&lt;/li&gt;
&lt;li&gt;similar to pod in kubernetes&lt;/li&gt;
&lt;li&gt;Environment variables can be set with --environment-variables&lt;ul&gt;
&lt;li&gt;passwords etc with secureValue&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;when deploying multi-container groups&lt;ul&gt;
&lt;li&gt;yaml for only containers&lt;/li&gt;
&lt;li&gt;arm templates in case volumes need to be attached as well&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;az container create
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
New-AzContainerGroup

&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/create-run-container-images-azure-container-instances/2-azure-container-instances-overview&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>appservices</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS The password encryption key has not been set</title><link>https://sajalchoudhary.net/til/ucs-the-password-encryption-key-has-not-been-set/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-the-password-encryption-key-has-not-been-set/</guid><pubDate>Fri, 19 Apr 2024 10:13:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;In the Navigation pane, click Admin.&lt;/li&gt;
&lt;li&gt;Expand All &amp;gt; User Management &amp;gt; User Services &amp;gt; Locally Authenticated Users&lt;/li&gt;
&lt;li&gt;Fill out the &lt;strong&gt;Password Encryption Key&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;After filling it and saving, &lt;strong&gt;Password Encryption Key Set&lt;/strong&gt; will become Yes.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/Admin-Management/4-2/b_Cisco_UCS_Admin_Mgmt_Guide_4-2/m_password_management.html#:~:text=Password%20Encryption%20Key%2C%20by%20default,from%20a%20backup%20configuration%20file&quot;&gt;Cisco UCS Manager Administration Management Guide 4.2 - Password Management [Cisco UCS Manager] - Cisco&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure VM scale sets</title><link>https://sajalchoudhary.net/til/azure-vm-scale-sets/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-vm-scale-sets/</guid><pubDate>Thu, 18 Apr 2024 15:46:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;VMSS allows you to scale VMs in and out based on certain rules (utilization or queue) / helps with [[202404071304 Resiliency Overview|resiliency]]&lt;ul&gt;
&lt;li&gt;For example: if cpu utilization goes above 70% add 2 more VMs&lt;/li&gt;
&lt;li&gt;max: 1000&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;These are just [[202404161835 Azure VM Basics|Azure VM]]s so nothing special in that way. You can interact with them whichever way you want.&lt;ul&gt;
&lt;li&gt;These are not special. Or should not be special. So if one has any issue, it should be able to get deleted and recreated.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;this scale set is kept behind a LB.&lt;/li&gt;
&lt;li&gt;There are two modes: flex and uniform. But use flex. Uniform is legacy.&lt;ul&gt;
&lt;li&gt;Uniform means all vms of same size &lt;ul&gt;
&lt;li&gt;for large scale stateless&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Flex can include different sizes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You can get termination notification&lt;/li&gt;
&lt;li&gt;You can look at the logs to see what has happened in the past&lt;/li&gt;
&lt;li&gt;When creating an [[202404161835 Azure VM Basics|Azure VM]] you can specify if you want to add it to an existing scale set.&lt;/li&gt;
&lt;li&gt;use [[202404171828 Azure Spot can help reduce prices for Azure VMs|Azure Spot can help reduce prices for Azure VMs]]&lt;ul&gt;
&lt;li&gt;but vm can be removed at any time, so architect accordingly&lt;/li&gt;
&lt;li&gt;policies: &lt;ul&gt;
&lt;li&gt;deallocate - remove compute, but disks are saved&lt;/li&gt;
&lt;li&gt;delete - delete everything&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;upgrade policy&lt;ul&gt;
&lt;li&gt;automatic&lt;/li&gt;
&lt;li&gt;rolling - so any changes to image or profile is not done for the whole scale set in one go.&lt;/li&gt;
&lt;li&gt;manual&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types of scaling&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;scheduled&lt;/li&gt;
&lt;li&gt;automatic - based on metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq&quot;&gt;some faqs&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# create
az vmss create --resource-group myResourceGroup --name webServerScaleSet --image Ubuntu2204 --upgrade-policy-mode automatic --custom-data cloud-init.yaml --admin-username azureuser --generate-ssh-keys

# Scale
az vmss scale --name webServerScaleSet --resource-group MyResourceGroup --new-capacity 6
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-GB/azure/virtual-machine-scale-sets/overview&quot;&gt;VMSS Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Use Azure VMware solution if an org wants to move to cloud quickly</title><link>https://sajalchoudhary.net/til/use-azure-vmware-solution-if-an-org-wants-to-move-to-cloud-quickly/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/use-azure-vmware-solution-if-an-org-wants-to-move-to-cloud-quickly/</guid><pubDate>Thu, 18 Apr 2024 15:44:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;If an organization needs to leave their DC quickly, i.e. don&apos;t have time to retool they can use the Azure VMware offering.&lt;/li&gt;
&lt;li&gt;Use existing skills&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Compute Gallery</title><link>https://sajalchoudhary.net/til/azure-compute-gallery/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-compute-gallery/</guid><pubDate>Thu, 18 Apr 2024 15:29:00 GMT</pubDate><content:encoded>&lt;p&gt;Azure Compute Gallery allows to store images and VM apps. &lt;/p&gt;
&lt;p&gt;It allows for &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Replication (to other regions, subscriptions, etc.)&lt;/li&gt;
&lt;li&gt;Versioning (specify a source,)&lt;ol&gt;
&lt;li&gt;Some services in Azure see that a new version is available and they auto-update.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Images and VM apps both have &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a definition which tells it what source to use.&lt;/li&gt;
&lt;li&gt;a version which is what is used when running install/creating a vm&lt;br /&gt;In case of images source can be a shutoff VM, an image from marketplace, etc.&lt;br /&gt;In case of VM app, it is packages kept on a blob somewhere + commands to install and uninstall, update, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=OykMc6wKMJY&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=22&quot;&gt;John&apos;s VM course&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/azure/virtual-machines/shared-image-galleries?tabs=vmsource%2Cazure-cli&quot;&gt;Compute Gallery Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Curl gives a handshake failure when trying to use ntlm to talk to Windows server</title><link>https://sajalchoudhary.net/til/curl-gives-a-handshake-failure-when-trying-to-use-ntlm-to-talk-to-windows-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/curl-gives-a-handshake-failure-when-trying-to-use-ntlm-to-talk-to-windows-server/</guid><pubDate>Thu, 18 Apr 2024 13:41:00 GMT</pubDate><content:encoded>&lt;p&gt;This can happen if NTLM v1 is disabled on the target Windows environment.&lt;/p&gt;
&lt;h1&gt;Issue&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Using curl to access a resource on Windows IIS (sharepoint, for example) gives &quot;NTLM handshake rejected&quot; error&lt;/li&gt;
&lt;li&gt;NTLM v1 can be disabled either via GPO or directly in the registry (details below)&lt;/li&gt;
&lt;li&gt;The default install of curl on RHEL does not support NTLMv2&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;GPO&lt;/h2&gt;
&lt;p&gt;Network security &amp;gt; LAN manager authentication settings (among other settings)&lt;/p&gt;
&lt;h2&gt;Registry:&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Under 
HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\LSA\MSV1_0

Value Name: NtlmMinClientSec  
Data Type: REG_WORD  
Value: one of the values below:

- 0x00000010- Message integrity
- 0x00000020- Message confidentiality
- 0x00080000- NTLM 2 session security
- 0x20000000- 128-bit encryption
- 0x80000000- 56-bit encryption
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Resolution&lt;/h1&gt;
&lt;p&gt;Upgrade curl on RHEL to enable the &lt;code&gt;httpd24-curl&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# yum install httpd24-curl

# scl enable httpd24 bash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Curl versions will be different before and after.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Before:
# curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets

After:
# curl -V
curl 7.47.1 (x86_64-redhat-linux-gnu) libcurl/7.47.1 NSS/3.28.4 zlib/1.2.7 libidn/1.28 libssh2/1.4.3 nghttp2/1.7.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-US/troubleshoot/windows-client/windows-security/enable-ntlm-2-authentication&quot;&gt;Enable NTLM 2 authentication - Windows Client | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>linux</category><category>curl</category><category>windows</category><category>ntlm</category><category>evergreen</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows gives Continue dialog box even if we have existing permissions</title><link>https://sajalchoudhary.net/til/windows-gives-continue-dialog-box-even-if-we-have-existing-permissions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-gives-continue-dialog-box-even-if-we-have-existing-permissions/</guid><pubDate>Thu, 18 Apr 2024 13:35:00 GMT</pubDate><content:encoded>&lt;p&gt;This is a known issue.&lt;/p&gt;
&lt;h1&gt;Issue description&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;You have permission to the share/folder as admin&lt;/li&gt;
&lt;li&gt;However when you go and try to access the folder in explorer, it gives a dialog to click continue to permanently get access&lt;/li&gt;
&lt;li&gt;This modifies NTFS permissions and adds your individual ID to the permissions.&lt;/li&gt;
&lt;li&gt;This can overwrite NTFS permissions so not a good thing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Workaround:&lt;/h1&gt;
&lt;p&gt;Using PowerShell for example it is possible to get acl or delete any files or directories without adding your ID.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/dont-have-permission-access-folder#known-issues&quot;&gt;Continue dialog box for folder access in Windows Explorer when user only has access with elevated token - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>ntfs</category><category>evergreen</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Instance Metadata service</title><link>https://sajalchoudhary.net/til/instance-metadata-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/instance-metadata-service/</guid><pubDate>Wed, 17 Apr 2024 16:36:00 GMT</pubDate><content:encoded>&lt;p&gt;Special IP: 169.254.169.254&lt;/p&gt;
&lt;p&gt;From inside the [[202404161835 Azure VM Basics|Azure VM]], one can reach out to this and get info from ARM.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create entries in reverse lookup zone through PowerShell</title><link>https://sajalchoudhary.net/til/create-entries-in-reverse-lookup-zone-through-powershell/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-entries-in-reverse-lookup-zone-through-powershell/</guid><pubDate>Wed, 17 Apr 2024 13:50:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Add-DNSServerResourceRecordPTR -ZoneName $ZoneName -Name $ipAddress -PTRDomainName $hostname -ComputerName $dnsServer
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the command. Name Needs to be in reverse order. so for example, for 10.45.32.23. Name will be 23.32 for zone &quot;45.10.in-addr.arpa&quot;.&lt;/p&gt;
&lt;p&gt;This can be done in excel. Split by &quot;.&quot; and then concat.&lt;br /&gt;Or it can be done in PowerShell as well. Maybe a TODO for future.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>powershell</category><category>evergreen</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure VM Basics</title><link>https://sajalchoudhary.net/til/azure-vm-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-vm-basics/</guid><pubDate>Tue, 16 Apr 2024 15:35:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;IaaS service&lt;ol&gt;
&lt;li&gt;Everything inside the VM is our responsibility and under our control&lt;ol&gt;
&lt;li&gt;Things like patching, AV, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Building block of lots of azure services&lt;/li&gt;
&lt;li&gt;Different SKUs (based on ratio of CPU vs Memory)&lt;ol&gt;
&lt;li&gt;In a SKU different sizes (how much cpu and memory)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;As physical hardware improves, different versions of virtual machines might come forward&lt;ol&gt;
&lt;li&gt;Different versions so that we have consistency, we can choose what we want to do.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;VM needs to be Stopped (deallocated) for no charge. Shutting from guest does not de-provision it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[[202404161906 How do we think about VM sizes or types on Azure|How do we think about VM sizes on Azure]]&lt;/p&gt;
&lt;h1&gt;Commands&lt;/h1&gt;
&lt;p&gt;[[202407141333 Get Azure VM Images|Get Azure VM Images]]&lt;br /&gt;[[202407141412 Create VM in Azure|Create VM in Azure]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=OykMc6wKMJY&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=21&quot;&gt;John&apos;s YT&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>compute</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure DNS</title><link>https://sajalchoudhary.net/til/azure-dns/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-dns/</guid><pubDate>Sun, 14 Apr 2024 11:50:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202404121703 Azure VNet|VNet]] can use Azure DNS or custom/private DNS&lt;/li&gt;
&lt;li&gt;Azure DNS - 168.63.129.16&lt;/li&gt;
&lt;li&gt;From a [[202404121703 Azure VNet|VNet]] auto-register to one private DNS zone (check-box in [[202404141442 Azure Private Link|Private Link]])&lt;ul&gt;
&lt;li&gt;Can resolve to upto a 1000 DNS zones&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Each private DNS zone can link to a 1000 [[202404121703 Azure VNet|VNet]]s&lt;/li&gt;
&lt;li&gt;Types:&lt;ul&gt;
&lt;li&gt;Private&lt;ul&gt;
&lt;li&gt;Create a [[202404141442 Azure Private Link|Private Link]] to [[202404121703 Azure VNet|VNet]] which needs DNS resolution&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Public&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;NS record for delegating a sub-domain&lt;/li&gt;
&lt;li&gt;[[202407271215 Create Azure DNS zone and records|Create Azure DNS zone and records]]&lt;/li&gt;
&lt;li&gt;For [[202404011327 Entra ID|&quot;Entra ID&quot;]] only TXT or MX records&lt;/li&gt;
&lt;li&gt;For [[202404201400 Azure App service|app service]] to register dns TXT or CNAME record&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Private DNS Resolver service&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Inbound (just an IP) and Outbound endpoint&lt;/li&gt;
&lt;li&gt;My on prem DNS can forward to inbound endpoint (which is just an IP)&lt;/li&gt;
&lt;li&gt;Forwarding rule sets can be created to resolve in [[202312231415 Azure Master|Azure]] my onprem DNS&lt;ul&gt;
&lt;li&gt;Can be linked to different [[202404121703 Azure VNet|VNet]]s&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Dangling DNS&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Create an alias to a resource&lt;/li&gt;
&lt;li&gt;After time resource is deleted&lt;/li&gt;
&lt;li&gt;But alias still points to it&lt;/li&gt;
&lt;li&gt;Bad actor can create a service with the same record name&lt;/li&gt;
&lt;li&gt;So now my alias points to bad actor&apos;s service&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;split horizon scenario&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;[[202404161835 Azure VM Basics|Azure VM]] has [[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]] and [[202407281228 Azure Private IP Address|Azure Private IP Address]]&lt;/li&gt;
&lt;li&gt;We create 2 zones - public and private &lt;/li&gt;
&lt;li&gt;Configure the associated [[202404121703 Azure VNet|VNet]] to register to dns automatically &lt;/li&gt;
&lt;li&gt;Then private dns zone will have A record with private ip&lt;/li&gt;
&lt;li&gt;Public dns zone will have public ip&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/host-domain-azure-dns/2-what-is-azure-dns&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt; is the host record, and is the most common type of DNS record. It maps the domain or host name to the IP address.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CNAME&lt;/strong&gt; is a Canonical Name record that&apos;s used to create an alias from one domain name to another domain name. If you had different domain names that all accessed the same website, you&apos;d use CNAME.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MX&lt;/strong&gt; is the mail exchange record. It maps mail requests to your mail server, whether hosted on-premises or in the cloud.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TXT&lt;/strong&gt; is the text record. It&apos;s used to associate text strings with a domain name. Azure and Microsoft 365 use TXT records to verify domain ownership.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Additionally, there are the following record types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wildcards&lt;/li&gt;
&lt;li&gt;CAA (certificate authority)&lt;/li&gt;
&lt;li&gt;NS (name server)&lt;/li&gt;
&lt;li&gt;SOA (start of authority)&lt;/li&gt;
&lt;li&gt;SPF (sender policy framework)&lt;/li&gt;
&lt;li&gt;SRV (server locations)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/dns/private-dns-autoregistration&quot;&gt;Enable Auto-registration&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Private Link</title><link>https://sajalchoudhary.net/til/azure-private-link/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-private-link/</guid><pubDate>Sun, 14 Apr 2024 11:42:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;When an externally facing [[202312231415 Azure Master|Azure]] PaaS service is accessed from a resource in a  [[202404121703 Azure VNet|VNet]] the traffic stays on the Azure network&lt;/li&gt;
&lt;li&gt;﻿﻿The PaaS service still has an external facing endpoint that some companies do not want even with firewall/authentication lockdown&lt;/li&gt;
&lt;li&gt;﻿﻿[[202404141442 Azure Private Link|Private Link]] enables PaaS services to have a private endpoint for a service instance created in a virtual network that is an avatar for that specific service instance&lt;/li&gt;
&lt;li&gt;﻿﻿Can also project custom services that are behind a standard load balancer using a Private Link Service&lt;/li&gt;
&lt;li&gt;﻿﻿Resources in the [[202404121703 Azure VNet|VNet]] can interact via the private endpoint directly to the service using the most efficient path&lt;/li&gt;
&lt;li&gt;Because it is instance specific helps stop data exfiltration&lt;/li&gt;
&lt;li&gt;﻿﻿Removes the need to peer [[VNET]]s which can be important where [[202404121703 Azure VNet|VNet]]s may have overlapping IP ranges&lt;/li&gt;
&lt;li&gt;Mostly used in place of [[202404141435 Azure Service Endpoints and Service Endpoint Policies|Service Endpoints]]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-network-routing-endpoints/6-identify-private-link-uses&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><category>security</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Service Endpoints and Service Endpoint Policies</title><link>https://sajalchoudhary.net/til/azure-service-endpoints-and-service-endpoint-policies/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-service-endpoints-and-service-endpoint-policies/</guid><pubDate>Sun, 14 Apr 2024 11:35:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202404141419 Network Security Groups|NSGs]] are focused on traffic into and out of the virtual network&lt;/li&gt;
&lt;li&gt;﻿﻿Many Azure PaaS offerings have their own firewall capabilities to lock down access&lt;/li&gt;
&lt;li&gt;﻿﻿It is often required to restrict a service to only specific subnets of specific virtual networks&lt;/li&gt;
&lt;li&gt;﻿﻿[[202404141435 Azure Service Endpoints and Service Endpoint Policies|Service Endpoints]] make a specific subnet known to a specific Azure service and add optimal path to service&lt;/li&gt;
&lt;li&gt;﻿﻿The virtual firewall on the service can then be configured to allow only that specific subnet&lt;/li&gt;
&lt;li&gt;﻿﻿Service Endpoint Policies allow specific instances of services to be allowed from a virtual network which is not possible with NSG service tags&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Benefits&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Improved security (point 3 above/restrict Internet access and allow access only from specific subnet)&lt;/li&gt;
&lt;li&gt;Optimal routing for services&lt;ul&gt;
&lt;li&gt;NVA force every internet going thing through the same route&lt;/li&gt;
&lt;li&gt;With [[202404141435 Azure Service Endpoints and Service Endpoint Policies|Service Endpoint]], Azure traffic goes through different route&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Direct traffic to MSFT&lt;ul&gt;
&lt;li&gt;Use Azure backbone network&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Low maintenance/easy config&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-network-routing-endpoints/4-determine-service-endpoint-uses&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><category>security</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Virtual WAN</title><link>https://sajalchoudhary.net/til/azure-virtual-wan/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-virtual-wan/</guid><pubDate>Sun, 14 Apr 2024 11:31:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Provides a managed hub&lt;/li&gt;
&lt;li&gt;hub and spoke architecture&lt;ul&gt;
&lt;li&gt;﻿﻿Each region within the WAN instance gets a hub&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Two SKUs - Basic and Standard&lt;ul&gt;
&lt;li&gt;﻿﻿Basic - S2S VPN only&lt;/li&gt;
&lt;li&gt;﻿﻿Standard - S25 VPN, P2S VPN, ExpressRoute, inter-hub, VNet transitive and more&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-wan/virtual-wan-about&quot;&gt;Virtual WAN Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Network Security Groups</title><link>https://sajalchoudhary.net/til/network-security-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/network-security-groups/</guid><pubDate>Sun, 14 Apr 2024 11:19:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Can be used to [[202404141404 Control traffic flows|control traffic flow]]&lt;/li&gt;
&lt;li&gt;﻿﻿[[202404141419 Network Security Groups|NSGs]] can be applied at the subnet or NIC level but are always enforced at the NIC&lt;ul&gt;
&lt;li&gt;so apply at subnet level, easier to manage&lt;/li&gt;
&lt;li&gt;each subnet can have max 1 [[202404141419 Network Security Groups|NSG]] assigned to it&lt;/li&gt;
&lt;li&gt;each NIC can have 0 or max 1 [[202404141419 Network Security Groups|NSG]] associated with it&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Security Rules consist of:&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Source&lt;/li&gt;
&lt;li&gt;Destination&lt;/li&gt;
&lt;li&gt;Protocol&lt;/li&gt;
&lt;li&gt;Port&lt;/li&gt;
&lt;li&gt;Action&lt;/li&gt;
&lt;li&gt;Priority&lt;ol&gt;
&lt;li&gt;Lower priority number has higher priority&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Source and destination&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;can be CIDR&lt;/li&gt;
&lt;li&gt;can be service tags&lt;/li&gt;
&lt;li&gt;[[202407141403 Application Security Groups|ASG]] (Application Security Group) (Tags basically)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Default rules&lt;/h2&gt;
&lt;p&gt;VNet, Internet, etc are service tags.&lt;/p&gt;
&lt;h3&gt;Inbound&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;AllowVNetInBound&lt;/li&gt;
&lt;li&gt;AllowAzureLoadBalancerInBound&lt;/li&gt;
&lt;li&gt;DenyAllInbound&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Outbound&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;AllowVnetOutBound&lt;/li&gt;
&lt;li&gt;AllowInternetOutBound&lt;/li&gt;
&lt;li&gt;DenyAllOutBound&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;How it works if both vnet and subnet have nsg&lt;/h1&gt;
&lt;p&gt;In terms of precedence. Whichever is the first thing traffic encounters. So,&lt;/p&gt;
&lt;h2&gt;Incoming&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Subnet wins&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Outgoing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;VM NIC NSG wins&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[[202407141419 Create NSG in Azure|Create NSG in Azure]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview&quot;&gt;NSG&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-network/network-security-group-how-it-works&quot;&gt;MS Docs processing of NSG&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Firewall</title><link>https://sajalchoudhary.net/til/azure-firewall/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-firewall/</guid><pubDate>Sun, 14 Apr 2024 11:13:00 GMT</pubDate><content:encoded>&lt;p&gt;Can be used to [[202404141404 Control traffic flows|control traffic flow]]&lt;/p&gt;
&lt;p&gt;Can do a bunch of things.&lt;br /&gt;It has &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Rules&lt;ol&gt;
&lt;li&gt;Application L7&lt;/li&gt;
&lt;li&gt;Network L4&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Intrusion detection&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Tiers&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Standard&lt;/li&gt;
&lt;li&gt;Premium&lt;/li&gt;
&lt;li&gt;Basic&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/firewall/overview&quot;&gt;Azure Firewall Overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Control traffic flows</title><link>https://sajalchoudhary.net/til/control-traffic-flows/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/control-traffic-flows/</guid><pubDate>Sun, 14 Apr 2024 11:04:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;By default traffic can freely flow within a virtual network and to any connected network&lt;/li&gt;
&lt;li&gt;﻿﻿To segment and control traffic within a [[202404121703 Azure VNet|VNet]], between networks and/or external a number of approaches can be utilised&lt;ul&gt;
&lt;li&gt;[[202404141413 Azure Firewall|Azure Firewall]] or [[202407281410 Network Virtual Appliance|NVA]]&lt;/li&gt;
&lt;li&gt;[[202404141419 Network Security Groups|Network Security Groups]], [[202407141403 Application Security Groups|Application Security Groups]] and Service Tags&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿[[202404141419 Network Security Groups|NSGs]] can be applied at the subnet or NIC level but are always enforced at the NIC&lt;ul&gt;
&lt;li&gt;so apply at subnet level, easier to manage&lt;/li&gt;
&lt;li&gt;each subnet can have max 1 [[202404141419 Network Security Groups|NSG]] assigned to it&lt;/li&gt;
&lt;li&gt;each NIC can have 0 or max 1 [[202404141419 Network Security Groups|NSG]] associated with it&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿[[202404141419 Network Security Groups|NSGs]] are made up of rules based on IP ranges/tags, ports and actions&lt;/li&gt;
&lt;li&gt;﻿﻿[[202407141403 Application Security Groups|ASGs]] are tags applied to NICs which can be used instead of IP ranges in rules which may be easier to utilize.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure ExpressRoute</title><link>https://sajalchoudhary.net/til/azure-expressroute/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-expressroute/</guid><pubDate>Sun, 14 Apr 2024 10:39:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;ExpressRoute lets you extend your on-premises networks into the Microsoft cloud over a private connection with the help of a connectivity provider.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
CustomerNetwork --&amp;gt; PartnerNetwork --&amp;gt; ExpressRouteCircuit --&amp;gt; MSFTEdge
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Private but not encrypted&lt;/li&gt;
&lt;li&gt;Has redundant connections i.e. [[202404071304 Resiliency Overview|resiliency]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;ExpressRoute Peering Locations or MeetMe&lt;/h1&gt;
&lt;h1&gt;ExpressRoute fast path&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;A key component for private peering at the gateways that run in the net which have numerous functions&lt;ul&gt;
&lt;li&gt;﻿﻿BGP&lt;/li&gt;
&lt;li&gt;Part of the data path from the MSEE at the peering location to the target resource&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿Fastpath removes the gateways as part of the data path enabling higher throughput&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/expressroute/expressroute-introduction&quot;&gt;ExpressRoute overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/expressroute/expressroute-locations-providers&quot;&gt;Peering Locations&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Connecting to Onprem</title><link>https://sajalchoudhary.net/til/connecting-to-onprem/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/connecting-to-onprem/</guid><pubDate>Sat, 13 Apr 2024 10:37:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Many Azure services have external, Internet facing endpoints however often private connectivity is required&lt;/li&gt;
&lt;li&gt;﻿﻿There are a number of options to connect to virtual networks&lt;ul&gt;
&lt;li&gt;﻿﻿P2S VPN - Connects a specific device to a virtual network&lt;/li&gt;
&lt;li&gt;﻿﻿S2S VPN - Connects a network to a virtual network&lt;/li&gt;
&lt;li&gt;﻿﻿S2S VPN gateways enable multiple VPN connections to different networks if route not policy based&lt;/li&gt;
&lt;li&gt;﻿﻿ExpressRoute Private Peering - Connects a network to a virtual network via peering location and ExpressRoute Gateway (or at least mostly)&lt;/li&gt;
&lt;li&gt;﻿﻿ExpressRoute circuits enable multiple virtual networks to be connected to a single circuit but net to vnet better via peering where practical&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿Most enterprises will leverage ExpressRoute which has the benefit of not going over the Internet, consistent latency and can also provides optional Microsoft peering via route filter&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;[[202407151913 Azure VPN|Azure VPN]]&lt;/h1&gt;
&lt;h1&gt;[[202404141339 Azure ExpressRoute|Express Route]]&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Private but not encrypted&lt;/li&gt;
&lt;li&gt;MSFT don&apos;t provide connection from meet me to your dc/location&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/expressroute/expressroute-locations&quot;&gt;ExpressRoute Locations&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/expressroute/expressroute-introduction&quot;&gt;ExpressRoute overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Connecting virtual networks</title><link>https://sajalchoudhary.net/til/connecting-virtual-networks/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/connecting-virtual-networks/</guid><pubDate>Sat, 13 Apr 2024 10:13:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;If you wish to have multiple subscriptions and/or use multiple regions you will have multiple virtual networks&lt;/li&gt;
&lt;li&gt;﻿﻿In the past we could connect virtual networks using S25 VPN or by connecting to the same ExpressRoute circuit but both approaches have problems&lt;/li&gt;
&lt;li&gt;﻿﻿[[202407151908 VNet Peering|VNet Peering]] enables [[202404121703 Azure VNet|VNets]] to be connected via the Microsoft backbone in the same or different regions (global peering)&lt;/li&gt;
&lt;li&gt;﻿﻿There is a small ingress and egress charge for traffic via network peering&lt;/li&gt;
&lt;li&gt;IP address spaces CANNOT overlap&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;[[202407151908 VNet Peering|VNet Peering]]&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Best option&lt;/li&gt;
&lt;li&gt;Can span subscriptions and tenants&lt;/li&gt;
&lt;li&gt;Not transitive i.e. VNET1 can not talk to VNET3 / Need to create peering relationship between them&lt;ul&gt;
&lt;li&gt;Without peering, I could add Azure Firewall or Network virtual appliance in Hub network (VNET2) and tell:&lt;ul&gt;
&lt;li&gt;VNET3 if you want to talk to VNET1, next hop is IP of that forwarder&lt;/li&gt;
&lt;li&gt;VNET1 if you want to talke to VNET3, next hop is IP of that forwarder&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;This above thing is [[202407281401 User defined routing|UDR]]&lt;/li&gt;
&lt;li&gt;There is also border gateway protocol&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
VNET1 --&amp;gt; |Peer| VNET2 --&amp;gt; |Peer| VNET3
VNET1 --- |NotTransitive|VNET3
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;[[202404131337 Connecting to Onprem|Express Route]]&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Bad idea because of latency&lt;/li&gt;
&lt;li&gt;Traffic goes from VNET1 to express route MeetME and then from there to VNET2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	VNET1 --&amp;gt; ExpressRoute --&amp;gt; VNET2	
	ExpressRoute --&amp;gt; MeetME --&amp;gt; ExpressRoute
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;[[202408241251 How to create S2S VPN|S2S VPN]]&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;VPN is basically encrypting traffic&lt;/li&gt;
&lt;li&gt;Bad idea because of bad throughput and bandwidth&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
VNET1 &amp;lt;--&amp;gt; |S2SVPN| VNET2
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Priority&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;More specific subnet chosen&lt;ul&gt;
&lt;li&gt;Between, 10.0.0.0/16 and 10.0.0.0/24, /24 route will be chosen&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Between different route types for the same prefix:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;User-defined routes&lt;/li&gt;
&lt;li&gt;BGP routes&lt;/li&gt;
&lt;li&gt;System routes&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/expressroute/expressroute-locations&quot;&gt;ExpressRoute Locations&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/control-network-traffic-flow-with-routes/2-azure-virtual-network-route&quot;&gt;MS Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>External Access</title><link>https://sajalchoudhary.net/til/external-access/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/external-access/</guid><pubDate>Sat, 13 Apr 2024 09:19:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;There is no special &quot;DMZ&quot; subnet where resources get a public IP&lt;/li&gt;
&lt;li&gt;﻿﻿By default Azure provides outbound SNAT/PAT enabling resources to access the Internet and receive responses&lt;/li&gt;
&lt;li&gt;﻿﻿To provide services to the Internet either&lt;ul&gt;
&lt;li&gt;﻿﻿Give the IP configuration an instance level public IP (not a good idea)&lt;/li&gt;
&lt;li&gt;﻿﻿Place the instances behind an [[202407271319 Azure Load Balancer|Azure Load Balancer]], [[202407271353 Azure Application Gateway|Azure Application Gateway]] or [[202407281410 Network Virtual Appliance|NVA]] which has a [[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]] in the front-end configuration&lt;/li&gt;
&lt;li&gt;﻿﻿Use a network virtual appliance with a public IP&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿Care should be taken to only expose the ports required, e.g. 443&lt;/li&gt;
&lt;li&gt;DO NOT enable SSH/RDP to internet&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;SNAT // Outbound&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Source Network Address Translation&lt;/li&gt;
&lt;li&gt;Internal IPs can not be used to talk to Internet&lt;/li&gt;
&lt;li&gt;So, we basically have a public IP for resources and a range of ports (max 1024 ports)&lt;/li&gt;
&lt;li&gt;SNAT can say for this port using the public IP resource 1 talk to internet&lt;/li&gt;
&lt;li&gt;For this other port using the same public IP resource 2 talk to internet and so on&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart BT
	resources --&amp;gt; |PublicIP| Internet
	subgraph VNET
		resources
	end
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Connectivity Methods&lt;/h2&gt;
&lt;h3&gt;Implicit&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;When a VM is created it gets a public IP for default internet access&lt;/li&gt;
&lt;li&gt;IP not fixed&lt;/li&gt;
&lt;li&gt;Not recommended/not so secure&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Explicit&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Type of port allocation&lt;/th&gt;
&lt;th&gt;Production-grade?&lt;/th&gt;
&lt;th&gt;Rating&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Use the frontend IP address(es) of a load balancer for outbound via outbound rules&lt;/td&gt;
&lt;td&gt;Static, explicit&lt;/td&gt;
&lt;td&gt;Yes, but not at scale&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Associate a NAT gateway to the subnet&lt;/td&gt;
&lt;td&gt;Dynamic, explicit&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Best&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Assign a public IP to the virtual machine (Don&apos;t want to use this)&lt;/td&gt;
&lt;td&gt;Static, explicit&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;NAT // Inbound&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;used to forward traffic from a load balancer frontend to one or more instances in the backend pool.&lt;/li&gt;
&lt;li&gt;Don&apos;t use direct public IP to instance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Regional&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;L4 - [[202407271319 Azure Load Balancer|Azure Load Balancer]] (TCP/UDP)&lt;/li&gt;
&lt;li&gt;L7 - [[202407271353 Azure Application Gateway|Azure Application Gateway]] (HTTP/HTTPS/HTTPS2)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Global&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;L7 - Front Door&lt;/li&gt;
&lt;li&gt;L4 - Global LB, Traffic Manager - DNS based&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections&quot;&gt;https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access&quot;&gt;Default Outbound access in azure&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/load-balancer/inbound-nat-rules&quot;&gt;Inbound NAT rules&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure VM NIC</title><link>https://sajalchoudhary.net/til/azure-vm-nic/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-vm-nic/</guid><pubDate>Fri, 12 Apr 2024 14:27:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;IP always comes via fabric (OS using DHCP)&lt;/li&gt;
&lt;li&gt;﻿﻿IP can be reserved in ARM&lt;/li&gt;
&lt;li&gt;﻿﻿VMs can be configured with multiple NICs&lt;/li&gt;
&lt;li&gt;﻿﻿Each NIC can be in same or different virtual subnet but always in same [[202404121703 Azure VNet|VNet]]&lt;/li&gt;
&lt;li&gt;﻿﻿Many VM types support accelerated networking&lt;ul&gt;
&lt;li&gt;Reduce latency, jitters, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿Multiple IP configurations per NIC&lt;ul&gt;
&lt;li&gt;more than one IP on 1 NIC&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;IPv6&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Dual stack : IPv4 and IPv6&lt;/li&gt;
&lt;li&gt;can not only be IPv6&lt;/li&gt;
&lt;li&gt;Can enable IPv6 for existing [[202404061212 Azure Resources|resources]]&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure VNet</title><link>https://sajalchoudhary.net/til/azure-vnet/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-vnet/</guid><pubDate>Fri, 12 Apr 2024 14:03:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;A virtual network exists&lt;ul&gt;
&lt;li&gt;﻿﻿Within a specific subscription&lt;/li&gt;
&lt;li&gt;﻿﻿Within a specific region&lt;ul&gt;
&lt;li&gt;spans multiple [[202404081830 Azure Availability Zones|AZs]] in that region&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿It cannot span subscriptions nor regions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿A virtual network consists of one or more IP ranges&lt;ul&gt;
&lt;li&gt;IP address type:&lt;ul&gt;
&lt;li&gt;[[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]]&lt;/li&gt;
&lt;li&gt;[[202407281228 Azure Private IP Address|Azure Private IP Address]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Allocation can be static or dynamic&lt;/li&gt;
&lt;li&gt;Typically from RFC 1918 but not exclusively&lt;/li&gt;
&lt;li&gt;﻿﻿The address space is broken up into subnets with the smallest subnet possible being a /29 which will give 3 usable IP addresses&lt;/li&gt;
&lt;li&gt;From every subnet we lose 5 IPs&lt;ul&gt;
&lt;li&gt;.0 - NW&lt;/li&gt;
&lt;li&gt;.1 - GW&lt;/li&gt;
&lt;li&gt;.2-.3 - DNS&lt;/li&gt;
&lt;li&gt;.255 - broadcast&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Can be ipv6 as well/ but not only ipv6&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Subnets are regional and span Availability Zones&lt;ul&gt;
&lt;li&gt;All subnets within a [[202404121703 Azure VNet|VNet]] can talk to each other by default&lt;/li&gt;
&lt;li&gt;we can use [[202404141419 Network Security Groups|NSG]] to deny traffic as needed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Ingress is free, Egress costs money&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Supported types of traffic&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Standard IP-based protocols supported including:&lt;ul&gt;
&lt;li&gt;﻿﻿TCP&lt;/li&gt;
&lt;li&gt;﻿﻿UDP&lt;/li&gt;
&lt;li&gt;﻿﻿ICMP (Ping)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Multicast, broadcast, IP-in-IP encapsulated packets and Generic Routing Encapsulation (GRE) blocked&lt;ul&gt;
&lt;li&gt;Can not deploy DHCP server&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You cannot ping the Azure gateway or use tools such as tracert&lt;/li&gt;
&lt;li&gt;Traditional Layer 2 VLANs are not supported&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Commands&lt;/h1&gt;
&lt;p&gt;[[202407141408 Create VNet in Azure]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;az network vnet create --name vnet-1 --resource-group test-rg --address-prefix 10.0.0.0/16 --subnet-name subnet-1 --subnet-prefixes 10.0.0.0/24
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>network</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Managed Disks</title><link>https://sajalchoudhary.net/til/azure-managed-disks/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-managed-disks/</guid><pubDate>Fri, 12 Apr 2024 09:54:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;As the name suggests provides a managed disk experience by abstracting the storage account&lt;/li&gt;
&lt;li&gt;﻿﻿Disks are created with no visibility of storage account removing worries around IOPS per storage account&lt;/li&gt;
&lt;li&gt;﻿﻿Disks and snapshots become ARM resources&lt;/li&gt;
&lt;li&gt;Price based on provisioned capacity&lt;/li&gt;
&lt;li&gt;Can be dynamically expanded for data disks (not Ultra/Premium v2)&lt;ul&gt;
&lt;li&gt;never shrink&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;No [[202404091908 Azure Storage Redundancy#Geo-redundant storage (GRS)]] option&lt;ul&gt;
&lt;li&gt;ZRS for Std/Premium SSDv1&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;SSD and Ultra disk have maxShares property&lt;/li&gt;
&lt;li&gt;Can have CMK (Customer Managed Key)&lt;ul&gt;
&lt;li&gt;configure disk encryption set&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;﻿﻿Standard HDD&lt;/li&gt;
&lt;li&gt;Standard SSD&lt;/li&gt;
&lt;li&gt;Premium SSD (v1 and v2)&lt;/li&gt;
&lt;li&gt;Ultra&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Premium SSD v2 and Ultra we can pick IOPS and Throughput separately. And pay accordingly.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Netapp Files</title><link>https://sajalchoudhary.net/til/azure-netapp-files/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-netapp-files/</guid><pubDate>Fri, 12 Apr 2024 09:46:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;First-party offering using NetApp hardware in&lt;br /&gt;  Azure datacenters&lt;/li&gt;
&lt;li&gt;﻿﻿Provides different performance tiers&lt;/li&gt;
&lt;li&gt;﻿﻿SMB and NFS support (also dual for single volume)&lt;/li&gt;
&lt;li&gt;Uses delegated subnet of VNet&lt;/li&gt;
&lt;li&gt;Cross-region replication&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure File Sync</title><link>https://sajalchoudhary.net/til/azure-file-sync/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-file-sync/</guid><pubDate>Fri, 12 Apr 2024 09:39:00 GMT</pubDate><content:encoded>&lt;p&gt;You might have [[202406291221 Azure Files|Azure Files]]&lt;br /&gt;But the on-prem file server might still be there.&lt;/p&gt;
&lt;p&gt;It enables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;﻿﻿Single cloud endpoint per sync group&lt;ul&gt;
&lt;li&gt;A change detection job is initiated for a cloud endpoint only once every 24 hours&lt;/li&gt;
&lt;li&gt;On windows server sync is automatic when file is changed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can not have more than one server endpoint from the same server in the same sync group&lt;/li&gt;
&lt;li&gt;﻿﻿Up to 100 servers per sync group&lt;/li&gt;
&lt;li&gt;﻿﻿Replicates between via the cloud endpoint&lt;/li&gt;
&lt;li&gt;﻿﻿Enables cloud tiering of data off local storage to cloud endpoint to optimize local capacity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You create a sync group in [[202312231415 Azure Master|Azure]] which. allows sync between on-prem and [[202406291221 Azure Files|Azure Files]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TB
AzureFileShare &amp;lt;--&amp;gt; OnPremFS1 &amp;amp; OnPremFS2
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Does not overwrite any files&lt;/li&gt;
&lt;li&gt;Appends conflict number and keeps both files. &lt;ul&gt;
&lt;li&gt;The latest file keeps the original name&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Upto 100 conflicts per file&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Deploy&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Prepare Windows server&lt;ol&gt;
&lt;li&gt;Disable internet enhanced security protection&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Deploy Storage sync service&lt;/li&gt;
&lt;li&gt;Deploy Azure File Sync Agent to on-prem server&lt;/li&gt;
&lt;li&gt;Register on-prem server with storage sync service&lt;/li&gt;
&lt;li&gt;Create a sync group and a cloud endpoint&lt;/li&gt;
&lt;li&gt;Create a server endpoint&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/configure-azure-files-file-sync/7-deploy-azure-file-sync&quot;&gt;MS Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/file-sync/file-sync-deployment-guide?tabs=azure-portal%2Cproactive-portal&quot;&gt;MS Docs&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/file-sync/file-sync-planning&quot;&gt;Planning for an Azure File Sync deployment&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/storage/files/storage-files-faq?toc=%2Fazure%2Fstorage%2Ffilesync%2Ftoc.json#afs-change-detection&quot;&gt;File sync FAQ&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To immediately sync files that are changed in the Azure file share, the &lt;strong&gt;Invoke-AzStorageSyncChangeDetection&lt;/strong&gt; PowerShell cmdlet&lt;/p&gt;
&lt;/blockquote&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Data Lake</title><link>https://sajalchoudhary.net/til/azure-data-lake/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-data-lake/</guid><pubDate>Fri, 12 Apr 2024 08:49:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;ADLSGen2 builds on [[202404121117 Azure Storage Services#Blob]]&lt;/li&gt;
&lt;li&gt;﻿﻿Provides a data lake which is common as raw store for pipelines&lt;/li&gt;
&lt;li&gt;﻿﻿Regular blob is flat with any structure being virtual&lt;/li&gt;
&lt;li&gt;﻿﻿ADLSGen2 has true directory structure&lt;/li&gt;
&lt;li&gt;﻿﻿POSIX and AAD data plane RBAC&lt;/li&gt;
&lt;li&gt;If goal is analytics, use data lake&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Storage Services</title><link>https://sajalchoudhary.net/til/azure-storage-services/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-storage-services/</guid><pubDate>Fri, 12 Apr 2024 08:17:00 GMT</pubDate><content:encoded>&lt;p&gt;Extension of [[202404091847 Azure Storage Overview]]&lt;br /&gt;Related to [[202404091859 Azure Storage Account]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Blob&lt;/li&gt;
&lt;li&gt;FileShares&lt;/li&gt;
&lt;li&gt;Queues&lt;/li&gt;
&lt;li&gt;Table&lt;/li&gt;
&lt;li&gt;Disks&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Blob&lt;/h1&gt;
&lt;p&gt;We have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Blob Indexes for [[202404051739 Governance Overview|azure governance]]&lt;/li&gt;
&lt;li&gt;Blob inventory &lt;ul&gt;
&lt;li&gt;Go over what all you have&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart RL
block &amp;amp; page &amp;amp; append --&amp;gt; container --&amp;gt; blob 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Uses 3 things to store stuff:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Storage account&lt;/li&gt;
&lt;li&gt;Containers in storage account\&lt;/li&gt;
&lt;li&gt;Blobs&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
account --&amp;gt; container --&amp;gt; blob
XYZ --&amp;gt; pictures &amp;amp; movies 
pictures --&amp;gt; abc.png &amp;amp; abc2.ping &amp;amp; abc3.png
movies --&amp;gt; xyz.png
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;﻿﻿Block (ADLSGen2 (hierarchical namespace)(NFS/SFTP))&lt;ul&gt;
&lt;li&gt;By default these are flat (might show folders etc, but are not actually folders)/ but we can enable hierarchical namespace&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;﻿﻿Page (Random - For OS/VM data disks,etc.)&lt;/li&gt;
&lt;li&gt;﻿﻿Append (for logs)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Table&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart RL
Entities-Key:Value --&amp;gt; Table
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Queue&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart RL
Messages --&amp;gt; Queue
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Used for some event driven things.&lt;br /&gt;  Like: App writes to blob. It also puts a message in queue. A function reads the message in queue, then reads from the blob and does whatever&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
App ---&amp;gt; |Image| Blob 
App ---&amp;gt; |Message|Queue --&amp;gt; |Event| Function 
Blob -.-&amp;gt; |ReadBlob|Function
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Not guaranteed fifo&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Files&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart RL
FoldersAndFiles --&amp;gt; Share-SMBorNFS --&amp;gt; Files
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remote Desktop Master</title><link>https://sajalchoudhary.net/til/remote-desktop-master/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remote-desktop-master/</guid><pubDate>Wed, 10 Apr 2024 11:29:00 GMT</pubDate><content:encoded>&lt;h1&gt;Logs&lt;/h1&gt;
&lt;p&gt;Logs are under Applications and Services Logs -&amp;gt; Windows&lt;/p&gt;
&lt;h1&gt;Port requirements&lt;/h1&gt;
&lt;h2&gt;RDSH to Licensing server&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;TCP 135 - RPC  for License Server communication and RDSH
TCP 49152 - 65535 (randomly allocated) -  This is the range in Windows Server 2012,  Windows Server 2008 R2, Windows Server 2008
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;TCP on port number 135&lt;/strong&gt;. This is the main port where communication occurs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TCP on 49152–65535&lt;/strong&gt; i.e. &lt;strong&gt;RPC dynamic address range&lt;/strong&gt;. A dynamic port is assigned from this range for validation-related communication.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/archive/technet-wiki/16164.rds-2012-which-ports-are-used-during-deployment#Remote_Desktop_Licensing_Server&quot;&gt;RDS 2012: Which ports are used during deployment? | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://harvestingclouds.com/post/connectivity-requirements-for-rdp-licensing-server-connectivity-and-firewall-rules/&quot;&gt;Connectivity Requirements for RDP Licensing Server Connectivity and Firewall Rules :: Harvesting Clouds&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>remotedesktop</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Storage Redundancy</title><link>https://sajalchoudhary.net/til/azure-storage-redundancy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-storage-redundancy/</guid><pubDate>Tue, 09 Apr 2024 16:08:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404091859 Azure Storage Account]] and [[202404071304 Resiliency Overview|resiliency]]&lt;/p&gt;
&lt;p&gt;Talks about redundancy for [[202404091859 Azure Storage Account|Azure storage account]]&lt;/p&gt;
&lt;h1&gt;Primary Region&lt;/h1&gt;
&lt;h2&gt;Locally redundant storage (LRS)&lt;/h2&gt;
&lt;p&gt;3 copies in the same stamp/[[202404081830 Azure Availability Zones|AZ]]&lt;/p&gt;
&lt;h2&gt;Zone-redundant storage (ZRS)&lt;/h2&gt;
&lt;p&gt;3 copies in different [[202404081830 Azure Availability Zones|AZs]]&lt;/p&gt;
&lt;h1&gt;Secondary Region&lt;/h1&gt;
&lt;h2&gt;Geo-redundant storage (GRS)&lt;/h2&gt;
&lt;p&gt;3 copies in a single location/[[202404081830 Azure Availability Zones|AZ]]&lt;br /&gt;and then 1 async copy in a different location in secondary region&lt;br /&gt;In secondary region, using LRS 3 copies.&lt;br /&gt;Also Read Access (RA-GRS)&lt;/p&gt;
&lt;h2&gt;Geo-zone-redundant storage (GZRS)&lt;/h2&gt;
&lt;p&gt;3 copies in 3 [[202404081830 Azure Availability Zones|AZs]] and 1 async copy to different location in secondary region/In secondary region, using LRS 3 copies.&lt;br /&gt;Also RA-GZRS&lt;/p&gt;
&lt;h1&gt;Block blob only object level replication&lt;/h1&gt;
&lt;p&gt;You can specify a different region to replicate to. Not just the secondary region.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/storage/common/storage-redundancy&quot;&gt;https://learn.microsoft.com/en-in/azure/storage/common/storage-redundancy&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Storage Account</title><link>https://sajalchoudhary.net/til/azure-storage-account/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-storage-account/</guid><pubDate>Tue, 09 Apr 2024 15:59:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Account name has to be globally unique&lt;/li&gt;
&lt;li&gt;Exists in a region&lt;/li&gt;
&lt;li&gt;Can have different types of [[202404071304 Resiliency Overview|resiliency]].&lt;ol&gt;
&lt;li&gt;Can impact intractability (SLA for storage accounts)&lt;/li&gt;
&lt;li&gt;Can impact durability ( [[202404091908 Azure Storage Redundancy]])&lt;ol&gt;
&lt;li&gt;LRS 11 9s&lt;/li&gt;
&lt;li&gt;ZRS 12 9s&lt;/li&gt;
&lt;li&gt;GRS 16 9s&lt;/li&gt;
&lt;li&gt;GZRS 16 9s&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Has API access&lt;/li&gt;
&lt;li&gt;Have 2 all powerful access keys (Protect them or disable them)&lt;ol&gt;
&lt;li&gt;Can be rotated if key is compromised&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Performance varies based on tier&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Types of storage Accounts&lt;/h1&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type of storage account&lt;/th&gt;
&lt;th&gt;Supported storage services&lt;/th&gt;
&lt;th&gt;Redundancy options&lt;/th&gt;
&lt;th&gt;Usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Standard general-purpose v2&lt;/td&gt;
&lt;td&gt;Blob Storage (including Data Lake Storage1), Queue Storage, Table Storage, and Azure Files&lt;/td&gt;
&lt;td&gt;LRS, GRS, RA-GRS&lt;br /&gt;  &lt;br /&gt;GRS,GZRS,RA-GZRS&lt;/td&gt;
&lt;td&gt;Standard storage account type for blobs, file shares, queues, and tables. Recommended for most scenarios using Azure Storage. If you want support for network file system (NFS) in Azure Files, use the premium file shares account type.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Premium block blobs&lt;/td&gt;
&lt;td&gt;Blob Storage (including Data Lake Storage1)&lt;/td&gt;
&lt;td&gt;LRS  &lt;br /&gt;ZRS&lt;/td&gt;
&lt;td&gt;Premium storage account type for block blobs and append blobs. Recommended for scenarios with high transaction rates or that use smaller objects or require consistently low storage latency. &lt;a href=&quot;https://learn.microsoft.com/en-in/azure/storage/blobs/storage-blob-block-blob-premium&quot;&gt;Learn more about example workloads.&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Premium file shares&lt;/td&gt;
&lt;td&gt;Azure Files&lt;/td&gt;
&lt;td&gt;LRS  &lt;br /&gt;ZRS&lt;/td&gt;
&lt;td&gt;Premium storage account type for file shares only. Recommended for enterprise or high-performance scale applications. Use this account type if you want a storage account that supports both Server Message Block (SMB) and NFS file shares.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Premium page blobs&lt;/td&gt;
&lt;td&gt;Page blobs only&lt;/td&gt;
&lt;td&gt;LRS  &lt;br /&gt;ZRS&lt;/td&gt;
&lt;td&gt;Premium storage account type for page blobs only. &lt;a href=&quot;https://learn.microsoft.com/en-in/azure/storage/blobs/storage-blob-pageblob-overview&quot;&gt;Learn more about page blobs and sample use cases.&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;Types based on performance tier&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Standard - good for most scenarios&lt;/li&gt;
&lt;li&gt;Premium - required for low latency&lt;ol&gt;
&lt;li&gt;Block blobs&lt;/li&gt;
&lt;li&gt;File shares&lt;/li&gt;
&lt;li&gt;Page blobs&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Types based on access tier&lt;/h1&gt;
&lt;p&gt;Premium is just premium.&lt;br /&gt;For General purpose v2 :&lt;br /&gt;For blobs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hot (Pay more to store/Pay less to retrieve)&lt;/li&gt;
&lt;li&gt;Cool (Pay less to store/Pay more to retrieve)&lt;/li&gt;
&lt;li&gt;Archive (Offline)&lt;br /&gt;For files:&lt;/li&gt;
&lt;li&gt;Transaction optimized&lt;/li&gt;
&lt;li&gt;Hot&lt;/li&gt;
&lt;li&gt;Cool&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[[202404121117 Azure Storage Services]]&lt;/p&gt;
&lt;h1&gt;Money&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;For standard cost is consumption-based&lt;/li&gt;
&lt;li&gt;For premium cost is provision-based&lt;/li&gt;
&lt;li&gt;[[202404121254 Azure Managed Disks|Managed Disks]] are always provision-based&lt;/li&gt;
&lt;li&gt;Operations and data transfer cost money too&lt;ol&gt;
&lt;li&gt;GRS etc will cost money too&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Access&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Use [[202404011327 Entra ID|AAD]] (Preferred approach)&lt;ol&gt;
&lt;li&gt;Dataplane [[202404061249 Azure RBAC|RBAC]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Access keys (Do not use)&lt;/li&gt;
&lt;li&gt;Shared Access Signatures &lt;ol&gt;
&lt;li&gt;Types: Account and Service&lt;/li&gt;
&lt;li&gt;Can create adhoc&lt;/li&gt;
&lt;li&gt;Policy can be created by service&lt;/li&gt;
&lt;li&gt;Signed by Access Keys&lt;ol&gt;
&lt;li&gt;If access key disabled, then this does not work&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Can do time limit, ip limit, operations restrictions.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Encryption&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Encrypted at rest&lt;/li&gt;
&lt;li&gt;You can use your own key&lt;/li&gt;
&lt;li&gt;Cross-tenant CMK supported (if you are a SaaS service and customer wants to own the key)&lt;/li&gt;
&lt;li&gt;﻿﻿Encryption scopes enable container/blob level&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Lifecycle management&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Based on [[202404091859 Azure Storage Account#Types based on performance tier]] &lt;ol&gt;
&lt;li&gt;you can decide to remove stuff after 90days for example&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Create rules and let it automatically remove stuff as needed based on when it was last modified, etc.&lt;ol&gt;
&lt;li&gt;Maybe regulatory requirement&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Native Protection&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Snapshot&lt;/li&gt;
&lt;li&gt;Versioning for block blobs&lt;/li&gt;
&lt;li&gt;Change feed&lt;/li&gt;
&lt;li&gt;Soft delete&lt;/li&gt;
&lt;li&gt;Point-in-time-restore {Replacement for snapshots} &lt;ol&gt;
&lt;li&gt;Above 3 combine to form this&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/storage/common/storage-redundancy&quot;&gt;Storage redundancy&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/rest/api/storageservices/create-account-sas&quot;&gt;Create an account SAS&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/storage/common/storage-account-overview?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json#types-of-storage-accounts&quot;&gt;Types of Azure Storage Accounts&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Storage Overview</title><link>https://sajalchoudhary.net/til/azure-storage-overview/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-storage-overview/</guid><pubDate>Tue, 09 Apr 2024 15:47:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;DNS is used for namespace/URIs are used:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Of the form: - http(s)://&amp;lt;account&amp;gt;.&amp;lt;service&amp;gt;.core.windows.net/&amp;lt;partition&amp;gt;/&amp;lt;object&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Structure&lt;/h1&gt;
&lt;p&gt;3 tier structure&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tiers&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Front-end layer&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Partition layer&lt;/td&gt;
&lt;td&gt;Looks at structures like blobs etc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stream layer&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h1&gt;Data replication&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Intra-stamp replication (stream layer) - Synchronous and keeps data durable within the stamps&lt;/li&gt;
&lt;li&gt;Inter-stamp replication (partition layer) - Asynchronous replication of data across stamps&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>storage</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Types of data</title><link>https://sajalchoudhary.net/til/types-of-data/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/types-of-data/</guid><pubDate>Tue, 09 Apr 2024 15:45:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Relational/Structured (Data has schema/fixed type of data)&lt;ol&gt;
&lt;li&gt;Relational DB is stored as row (i.e. one identity)&lt;/li&gt;
&lt;li&gt;Columnar is stored as columns&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Unstructured (media/blob)&lt;/li&gt;
&lt;li&gt;Non-relational/Semi-Structured (json, yaml, xml, etc.)&lt;/li&gt;
&lt;li&gt;Graph&lt;ol&gt;
&lt;li&gt;Has nodes&lt;/li&gt;
&lt;li&gt;Relationships between different types of nodes (entities)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>storage</category><category>data</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Set alias for cluster resource record</title><link>https://sajalchoudhary.net/til/set-alias-for-cluster-resource-record/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/set-alias-for-cluster-resource-record/</guid><pubDate>Tue, 09 Apr 2024 11:51:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# This resource needs to be Network Name
Get-ClusterResource &quot;MyClusterName&quot; | Get-ClusterParameter Aliases

Get-ClusterResource &quot;MyClusterName&quot; | Set-ClusterParameter Aliases AliasName
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After setting it, need to stop and start the role. &lt;/p&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;For SQL server with added FS role. Fileserver resource does not have any alias property. It needs to be set for the SQLserver role.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/failover-clustering/how-to-configure-an-alias-for-a-clustered-smb-share-with-windows/ba-p/371737&quot;&gt;How to Configure an Alias for a Clustered SMB Share with Windows Server 2012 - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Recreate Resources</title><link>https://sajalchoudhary.net/til/recreate-resources/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/recreate-resources/</guid><pubDate>Mon, 08 Apr 2024 16:37:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404071556 Disaster Recovery|Disaster Recovery]] and [[202404071304 Resiliency Overview]] &lt;/p&gt;
&lt;p&gt;Most probably we are using deployment pipelines. We can rerun the pipeline to create new resources in the secondary area.&lt;br /&gt;Which means what we have to ensure is whatever gets pulled into the pipeline is available in secondary locations.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Code repository (Geo-distributed)&lt;/li&gt;
&lt;li&gt;Container registry (If using containers)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Creating things takes time so it depends on [[202404081933 Recovery Time Objective|RTO]]. If [[202404081933 Recovery Time Objective|RTO]] is less then we have to have something running in the secondary region. But it will cost more. If RTO is more we can [[202404081937 Recreate Resources|recreate]].&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>resiliency</category><category>disasterrecovery</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Recovery Time Objective</title><link>https://sajalchoudhary.net/til/recovery-time-objective/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/recovery-time-objective/</guid><pubDate>Mon, 08 Apr 2024 16:33:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;How long (maximum amount of time) before I can be operational in case of any disaster?&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>resiliency</category><category>disasterrecovery</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Recovery Point Objective</title><link>https://sajalchoudhary.net/til/recovery-point-objective/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/recovery-point-objective/</guid><pubDate>Mon, 08 Apr 2024 16:31:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404071556 Disaster Recovery|Disaster Recovery]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;This basically talks about how much data (maximum) can I lose in case of any unplanned scenarios.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>resiliency</category><category>disasterrecovery</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Availability Zones</title><link>https://sajalchoudhary.net/til/azure-availability-zones/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-availability-zones/</guid><pubDate>Mon, 08 Apr 2024 15:30:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404071304 Resiliency Overview]]&lt;br /&gt;Related to [[202404071420 Azure resiliency concepts]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Things within a 2ms boundary&lt;/li&gt;
&lt;li&gt;Isolation based on (Power, Cooling, Networking) from other [[202404081830 Azure Availability Zones|AZs]]&lt;/li&gt;
&lt;li&gt;Minimum of 3 zones in every region. Even if there are more, in your subscription you will see 3.&lt;/li&gt;
&lt;li&gt;There is no guaranteed distance between AZs/Not a [[202404071556 Disaster Recovery|DR]] mechanism&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Winrm troubleshooting</title><link>https://sajalchoudhary.net/til/winrm-troubleshooting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/winrm-troubleshooting/</guid><pubDate>Mon, 08 Apr 2024 13:05:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202309181318 Powershell second hop problem]]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Check credssp setting
## Working example:
Get-WSManCredSSP

The machine is configured to allow delegating fresh credentials to the following target(s): wsman/*

This computer is configured to receive credentials from a remote client computer.


## Not working

Get-WSManCredSSP

The machine is not configured to allow delegating fresh credentials.

This computer is configured to receive credentials from a remote client computer.
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Check winrm status
winrm get winrm/config
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/winrm/multi-hop-support&quot;&gt;Multi-Hop Support in WinRM - Win32 apps | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/winrm/installation-and-configuration-for-windows-remote-management&quot;&gt;Installation and configuration for Windows Remote Management - Win32 apps | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>winrm</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Backup</title><link>https://sajalchoudhary.net/til/azure-backup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-backup/</guid><pubDate>Sun, 07 Apr 2024 12:59:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404071304 Resiliency Overview]]&lt;/p&gt;
&lt;p&gt;We backup because we want to restore. Service backups are different like SQL.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;﻿﻿&lt;strong&gt;Backup Center&lt;/strong&gt; provides single pane of glass focused on the protected workload﻿﻿&lt;/li&gt;
&lt;li&gt;At the simplest level Azure also provides backup services via recovery vaults &amp;amp; backup&lt;/li&gt;
&lt;li&gt;﻿﻿These can be used by backup applications and many Azure components (including VMs via extension) in addition to hybrid&lt;/li&gt;
&lt;li&gt;﻿﻿Data can then be recovered when needed / [[202408131927 Azure restore from backup|Restore from backups]]&lt;/li&gt;
&lt;li&gt;﻿﻿Delta-based storage with many recovery points&lt;/li&gt;
&lt;li&gt;﻿﻿Retention settings enable day, week, month and year retention goals&lt;ul&gt;
&lt;li&gt;Default: snapshots kept for 2 days&lt;/li&gt;
&lt;li&gt;Default: VM for 30 days&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Integration layer&lt;ul&gt;
&lt;li&gt;storage - snapshots for vms or files etc&lt;/li&gt;
&lt;li&gt;stream - for databases&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Availability and security&lt;ul&gt;
&lt;li&gt;[[202404061249 Azure RBAC|Azure RBAC]] and encryption﻿﻿&lt;/li&gt;
&lt;li&gt;Vaults can have local, zone-redundant or geo-redundant configuration&lt;/li&gt;
&lt;li&gt;soft-delete feature (deleted data stored for 14 days)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;can be used for- &lt;ul&gt;
&lt;li&gt;onprem (agent based)&lt;/li&gt;
&lt;li&gt;azure (built-in)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Microsoft Azure Recovery Services (MARS) agent for backing up files or specific disks etc&lt;/li&gt;
&lt;li&gt;[[202408011914 Azure Backup Access Tiers|Azure Backup Access Tiers]]&lt;/li&gt;
&lt;li&gt;Recovery services vault must be in the same region as the resources you want to backup&lt;/li&gt;
&lt;li&gt;Scheduled backups still run even if vm is shutdown&lt;/li&gt;
&lt;li&gt;Upto 100 VMs can be attached to a single backup policy&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Protecting backups&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Use [[202401121503 Entra Privileged Identity Management|pim]] maybe for JIT access for Backup admins. But assume they will have access.&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;resource guard&lt;/strong&gt;&lt;ol&gt;
&lt;li&gt;in different subscription, maybe different aad&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;For any critical operation they have to use [[202401121503 Entra Privileged Identity Management|pim]] to go up to resource guard level. So someone has to approve. &lt;/li&gt;
&lt;li&gt;Also have immutable vaults/can&apos;t be deleted before expiry time&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-file-folder-backups/1-introduction&quot;&gt;Backup intro&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>backup</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Disaster Recovery</title><link>https://sajalchoudhary.net/til/disaster-recovery/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/disaster-recovery/</guid><pubDate>Sun, 07 Apr 2024 12:56:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Disaster Recovery is moving things from one location to another when the active one is not available for any reason. &lt;/li&gt;
&lt;li&gt;DR should be part of change activity. That is if we are making any change how does that work with our DR plan.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Options for protection&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;[[202404081937 Recreate Resources|recreate]]&lt;/li&gt;
&lt;li&gt;Backup Restore&lt;/li&gt;
&lt;li&gt;[[202404071441 Replication|replication]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Metrics&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;[[202404081931 Recovery Point Objective|Recovery Point Objective]]&lt;/li&gt;
&lt;li&gt;[[202404081933 Recovery Time Objective|Recovery Time Objective]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Replication Options&lt;/h1&gt;
&lt;p&gt;[[202404071545 Preference for replications]]&lt;/p&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Planned&lt;ol&gt;
&lt;li&gt;should be no data loss&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Unplanned&lt;ol&gt;
&lt;li&gt;no clean failover - bigger outage&lt;/li&gt;
&lt;li&gt;data loss will be there&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>resiliency</category><category>azure</category><category>disasterrecovery</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Preference for replications</title><link>https://sajalchoudhary.net/til/preference-for-replications/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/preference-for-replications/</guid><pubDate>Sun, 07 Apr 2024 12:45:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404071441 Replication|replication]] and [[202404071556 Disaster Recovery|Disaster Recovery]]&lt;/p&gt;
&lt;p&gt;Think in this order/ best will be first/ but cost will be more as well. Think in terms of what is required. For example for app level replication app needs to be available in both places. That means vm needs to be running both places. Ideally things with state should be replicated (Remember from [[202404071304 Resiliency Overview#Understand services and dependent services]]). Others just create on-demand. Git repo/artifacts should be available wherever we are creating using IaC.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Native application/service multi-master&lt;/li&gt;
&lt;li&gt;Native app to standby &lt;/li&gt;
&lt;li&gt;Hyper V replica at VM level&lt;/li&gt;
&lt;li&gt;In-OS replication&lt;/li&gt;
&lt;li&gt;Storage replication that is used by Failover cluster&lt;/li&gt;
&lt;li&gt;Restoring a backup VM&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VM replications</title><link>https://sajalchoudhary.net/til/vm-replications/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vm-replications/</guid><pubDate>Sun, 07 Apr 2024 12:43:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to [[202404071441 Replication|Replication]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On-prem to azure via Azure Site Recovery&lt;/li&gt;
&lt;li&gt;Azure to Azure via ASR&lt;/li&gt;
&lt;li&gt;Crash and app consistent recovery points&lt;ol&gt;
&lt;li&gt;App consistent recovery points will have a little performance impact as everything needs to be dumped to disk / so that there is no data in transit/ then snapshot&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Multi-region deployments</title><link>https://sajalchoudhary.net/til/multi-region-deployments/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/multi-region-deployments/</guid><pubDate>Sun, 07 Apr 2024 12:18:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Mostly active-passive setups but can be active-active too&lt;ol&gt;
&lt;li&gt;because: latency&lt;/li&gt;
&lt;li&gt;because: data consistency&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Deploy to at least 2 regions&lt;/li&gt;
&lt;li&gt;Ensure all core elements are present in both regions&lt;/li&gt;
&lt;li&gt;Some resources can not move between regions (example: public IPs)&lt;/li&gt;
&lt;li&gt;Need to balance between regions&lt;ol&gt;
&lt;li&gt;Azure traffic manager is a solution for this/DNS based&lt;/li&gt;
&lt;li&gt;Azure front door&lt;ol&gt;
&lt;li&gt;creates any cast IP in edge locations&lt;/li&gt;
&lt;li&gt;when client makes request initial sessions it can do in edge&lt;/li&gt;
&lt;li&gt;when request is made it goes to closest region&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Cross region global LB&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How do Azure resources use resiliency</title><link>https://sajalchoudhary.net/til/how-do-azure-resources-use-resiliency/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-do-azure-resources-use-resiliency/</guid><pubDate>Sun, 07 Apr 2024 11:51:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Some resources are global and resilient against regional failure&lt;ol&gt;
&lt;li&gt;Azure AD, Front Door, Traffic Manager, DNS zones&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Most are deployed to specific region where services might differ&lt;ol&gt;
&lt;li&gt;Regional - don&apos;t know where anything is&lt;/li&gt;
&lt;li&gt;Zone-Redundant --&amp;gt; [[202312231415 Azure Master|Azure]] takes care of resiliency across different AZs&lt;/li&gt;
&lt;li&gt;Zonal --&amp;gt; exists in a specific zone/benefit is I know where it is&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Replication</title><link>https://sajalchoudhary.net/til/replication/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/replication/</guid><pubDate>Sun, 07 Apr 2024 11:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Two types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Asynchronous&lt;/li&gt;
&lt;li&gt;Synchronous&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Asynchronous&lt;/h1&gt;
&lt;p&gt;Transactions committed on primary as created and then transferred as soon as possible&lt;br /&gt;	1. no real impact to primary performance&lt;br /&gt;	2. risk of data loss in case of unplanned failure&lt;/p&gt;
&lt;h1&gt;Synchronous&lt;/h1&gt;
&lt;p&gt;Transactions are not committed on primary until acknowledged on secondary&lt;br /&gt;	1. Can impact primary performance&lt;br /&gt;	2. No risk of data loss&lt;/p&gt;
&lt;p&gt;Because of distance between regions, its usually asynchronous.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><category>replication</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure resiliency concepts</title><link>https://sajalchoudhary.net/til/azure-resiliency-concepts/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-resiliency-concepts/</guid><pubDate>Sun, 07 Apr 2024 11:20:00 GMT</pubDate><content:encoded>&lt;h1&gt;1. Fault domains&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;common set of hardware that has a SPoF like a rack&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;2. Update Domains&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;group of nodes that are upgraded together&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;2. Availability sets (99.95%)&lt;/h1&gt;
&lt;p&gt;Protection against rack level failures.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Logical grouping of nodes so that they are deployed over different racks.&lt;/li&gt;
&lt;li&gt;So that if 1 goes down, other is available&lt;/li&gt;
&lt;li&gt;Don&apos;t mix functionalities. Example 1 for DCs. 1 for sql for example.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;3. [[202404081830 Azure Availability Zones|Availability Zones]] (99.99%)&lt;/h1&gt;
&lt;p&gt;Racks live in a DC set (separate power, cooling, network)&lt;br /&gt;This provides protection again DC level failures.&lt;br /&gt;Minimum of 3 zones in every region. Even if there are more, in your subscription you will see 3.&lt;/p&gt;
&lt;h1&gt;4. Regions and Pairs&lt;/h1&gt;
&lt;p&gt;Set of DC sets becomes a region. 2ms latency roundtrip window between DC sets/ Availability Zones.&lt;br /&gt;Paired regions - main thing is azure does not update both regions at the same time&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/training/modules/configure-virtual-machine-availability/5-review-availability-zones&quot;&gt;https://learn.microsoft.com/en-us/training/modules/configure-virtual-machine-availability/5-review-availability-zones&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Resiliency Overview</title><link>https://sajalchoudhary.net/til/resiliency-overview/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/resiliency-overview/</guid><pubDate>Sun, 07 Apr 2024 10:04:00 GMT</pubDate><content:encoded>&lt;h1&gt;What are we protecting against&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Software failure(App/OS,etc) - Replication&lt;/li&gt;
&lt;li&gt;Hardware failures - Replication&lt;/li&gt;
&lt;li&gt;Corruption - Backup/Snapshot&lt;/li&gt;
&lt;li&gt;Attack/DoS - Isolated backups&lt;/li&gt;
&lt;li&gt;Regulatory requirements - Backup&lt;/li&gt;
&lt;li&gt;Humans - Processes&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Protection from Infrastructure Failures&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;[[202404071441 Replication|Replication]]&lt;ol&gt;
&lt;li&gt;Stateless systems can run from different places, So things like web frontends, etc.&lt;/li&gt;
&lt;li&gt;For stateful systems,&lt;ol&gt;
&lt;li&gt;async copy to a different region&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[[202404071559 Azure Backup|Backup]]&lt;ol&gt;
&lt;li&gt;Point-in-time copies&lt;/li&gt;
&lt;li&gt;For stateful systems, it does not protect against hardware failure as it runs on the same disk. But if there is some logical issue or something, we can revert with this.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[[202408041224 Azure Monitoring|Monitoring]]&lt;ol&gt;
&lt;li&gt;How are things being used&lt;/li&gt;
&lt;li&gt;so that we know when things are not working as they should&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Protection from human errors&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Little contact with production systems&lt;/li&gt;
&lt;li&gt;Orchestration tools should be human proof&lt;/li&gt;
&lt;li&gt;Automated deployments from version control systems. Automated testing.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Understand services and dependent services&lt;/h1&gt;
&lt;p&gt;Basically understand architecture.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What are critical services for my business - must protect - where is state? (critical)&lt;ol&gt;
&lt;li&gt;stateless things can be recreated &lt;/li&gt;
&lt;li&gt;In example below: state is at DB level. so that is critical. Rest can be recreated.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	subgraph stateless
	LB1 --&amp;gt; WEB1 &amp;amp; WEB2 &amp;amp; WEB3 --&amp;gt; LB2 --&amp;gt; APP1 &amp;amp; APP2
	end
	subgraph state
	APP1 &amp;amp; APP2 --&amp;gt; DB -.-&amp;gt; replicaDB
	end
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;what are the services these critical services depend on - must protect&lt;/li&gt;
&lt;li&gt;nice to have things&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Understand requirements for availability and architect accordingly&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Need to architect to meet or exceed agreed SLA&lt;/li&gt;
&lt;li&gt;Depending on criticality of service you will have certain availability requirement&lt;/li&gt;
&lt;li&gt;Balancing between price of improving SLA vs cost of downtime&lt;/li&gt;
&lt;li&gt;For overall SLA is there a &lt;strong&gt;AND&lt;/strong&gt; relationship or an &lt;strong&gt;OR&lt;/strong&gt; relationship&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Testing&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Application testing (testing with different types of input data for example)&lt;/li&gt;
&lt;li&gt;Load testing (testing with number of users)&lt;/li&gt;
&lt;li&gt;Deployment process testing (How you deploy)&lt;/li&gt;
&lt;li&gt;Failover testing&lt;/li&gt;
&lt;li&gt;Restore testing&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=iX87AomIqTw&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=14&quot;&gt;John&apos;s course&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>resiliency</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Tagging</title><link>https://sajalchoudhary.net/til/azure-tagging/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-tagging/</guid><pubDate>Sat, 06 Apr 2024 11:55:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404051739 Governance Overview|azure governance]]&lt;br /&gt;Adjacent to [[202404061451 Azure Naming|azure naming]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;name:value pair&lt;/li&gt;
&lt;li&gt;identify attribute/metadata for resource&lt;/li&gt;
&lt;li&gt;Have standards for tags used and values&lt;/li&gt;
&lt;li&gt;Can enforce through [[202404061356 Azure Policy|azure policy]]&lt;ol&gt;
&lt;li&gt;deny is scary&lt;/li&gt;
&lt;li&gt;better to tell if tag is not there, copy from resource group for example&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Can be used for search, filter, and billing&lt;/li&gt;
&lt;li&gt;not inherited but could be copied via [[202404061356 Azure Policy|policy]]&lt;ol&gt;
&lt;li&gt;should be applied at [[202404061212 Azure Resources|resources]] level for better visibility&lt;/li&gt;
&lt;li&gt;[[202404061212 Azure Resources|resources]] don&apos;t inherit [[202404061455 Azure Tagging|tags]] from [[202404051818 Resource Groups|resource group]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;can be applied at [[202404061212 Azure Resources|resource]], [[202404051818 Resource Groups|resource group]] or [[202401101441 Azure subscriptions|subscription]] level&lt;ol&gt;
&lt;li&gt;not all [[202404061212 Azure Resources|resources]] support tagging&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[[202404061425 Azure Cost Management]] enables inheritance use only for billing usage records&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging&quot;&gt;Naming and tagging&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/azure-resource-manager/management/tag-resources&quot;&gt;Guidance and Limits&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/azure-resource-manager/management/tag-support&quot;&gt;Tag support for resources&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Naming</title><link>https://sajalchoudhary.net/til/azure-naming/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-naming/</guid><pubDate>Sat, 06 Apr 2024 11:51:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;very important&lt;/li&gt;
&lt;li&gt;Applies to all resources and OS&lt;/li&gt;
&lt;li&gt;Apply common naming to onprem and cloud&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging&quot;&gt;Azure Naming&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming&quot;&gt;Naming Convention&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Cost Management</title><link>https://sajalchoudhary.net/til/azure-cost-management/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-cost-management/</guid><pubDate>Sat, 06 Apr 2024 11:25:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404051739 Governance Overview|azure governance]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Provides insight and control of Azure (and AWS) spend&lt;ol&gt;
&lt;li&gt;cost analysis&lt;/li&gt;
&lt;li&gt;cost anomaly alerts&lt;/li&gt;
&lt;li&gt;budgets&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Estimate costs with Azure Pricing Calculator&lt;/li&gt;
&lt;li&gt;Always optimize costs&lt;/li&gt;
&lt;li&gt;Costs can be based on tag, [[202401101441 Azure subscriptions|subscription]], [[202404051818 Resource Groups|resource groups]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;License&lt;/h1&gt;
&lt;p&gt;Cost Allocation with Enterprise Agreement or Customer Agreement&lt;/p&gt;
&lt;h1&gt;How to split cost for shared services&lt;/h1&gt;
&lt;p&gt;Use cost allocation.&lt;br /&gt;Split can be :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;even&lt;/li&gt;
&lt;li&gt;custom &lt;/li&gt;
&lt;li&gt;proportional (based on overall usage, compute usage, network usage, etc.)&lt;br /&gt;So a team will see accumulated costs (whatever they use) + cost allocation (cost for shared resource)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;How to optimize costs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Plan better /correct SKUs etc&lt;ul&gt;
&lt;li&gt;autoscale, serverless, shutdown, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reserved instances (1 or 3 year plan) offer discounts, etc (super-specific which sku which region)&lt;/li&gt;
&lt;li&gt;Azure savings plan (not super-specific) / lower discount than reserved.&lt;/li&gt;
&lt;li&gt;Azure Hybrid Initiative allows one to use existing licenses in Azure&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>CRUD</title><link>https://sajalchoudhary.net/til/crud/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/crud/</guid><pubDate>Sat, 06 Apr 2024 10:58:00 GMT</pubDate><content:encoded>&lt;p&gt;Create&lt;br /&gt;Read&lt;br /&gt;Update&lt;br /&gt;Delete&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Policy</title><link>https://sajalchoudhary.net/til/azure-policy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-policy/</guid><pubDate>Sat, 06 Apr 2024 10:56:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404051739 Governance Overview|azure governance]]&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sits at top of ARM and any [[202404061358 CRUD|CRUD]] operations have to go through it&lt;/li&gt;
&lt;li&gt;Can be used for enforcement and audit&lt;/li&gt;
&lt;li&gt;Start with audit (to figure out how things are being used)&lt;ol&gt;
&lt;li&gt;then later you can move to enforcement&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Uses json format to form the logic&lt;/li&gt;
&lt;li&gt;Can create a compliance report&lt;/li&gt;
&lt;li&gt;Historically focused around resource&lt;ol&gt;
&lt;li&gt;Recently focusing on actions (DenyActions, e.g. Delete) that one can take on resources&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Does not apply to existing [[202404061212 Azure Resources|resources]] (need to update resource)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;How&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	policy --&amp;gt; initiative --&amp;gt; scope
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Policy is business rules defined in json&lt;/li&gt;
&lt;li&gt;Set of policies can be grouped into an initiative&lt;/li&gt;
&lt;li&gt;which is then assigned to a scope ([[202401101441 Azure subscriptions|subscription]],[[202404051818 Resource Groups|resource groups]],[[202404051803 Management groups|management group]] or [[202404061212 Azure Resources|resources]])&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Example Policy Definition&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;properties&quot;: {
    &quot;displayName&quot;: &quot;Allowed locations&quot;,
    &quot;description&quot;: &quot;This policy enables you to restrict the locations your organization can specify when deploying resources.&quot;,
    &quot;mode&quot;: &quot;Indexed&quot;,
    &quot;metadata&quot;: {
      &quot;version&quot;: &quot;1.0.0&quot;,
      &quot;category&quot;: &quot;Locations&quot;
    },
    &quot;parameters&quot;: {
      &quot;allowedLocations&quot;: {
        &quot;type&quot;: &quot;array&quot;,
        &quot;metadata&quot;: {
          &quot;description&quot;: &quot;The list of locations that can be specified when deploying resources&quot;,
          &quot;strongType&quot;: &quot;location&quot;,
          &quot;displayName&quot;: &quot;Allowed locations&quot;
        },
        &quot;defaultValue&quot;: [
          &quot;westus2&quot;
        ]
      }
    },
    &quot;policyRule&quot;: {
      &quot;if&quot;: {
        &quot;not&quot;: {
          &quot;field&quot;: &quot;location&quot;,
          &quot;in&quot;: &quot;[parameters(&apos;allowedLocations&apos;)]&quot;
        }
      },
      &quot;then&quot;: {
        &quot;effect&quot;: &quot;deny&quot;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/governance/policy/overview&quot;&gt;Azure Policy&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure-basics&quot;&gt;Azure Policy JSON reference&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure ABAC</title><link>https://sajalchoudhary.net/til/azure-abac/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-abac/</guid><pubDate>Sat, 06 Apr 2024 10:23:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404051739 Governance Overview|azure governance]]&lt;br /&gt;Attribute based access control&lt;/p&gt;
&lt;h1&gt;Why?&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;[[202404061249 Azure RBAC|RBAC]] may not be granular enough or we start to hit [[202404061249 Azure RBAC#Limits]]&lt;/li&gt;
&lt;li&gt;Adds conditions to roles assignments based on attributes of resources and principal accessing&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Where&lt;/h1&gt;
&lt;p&gt;Currently restricted to roles that have &lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-format#actions&quot;&gt;blob storage or queue storage data actions&lt;/a&gt;.&lt;/p&gt;
&lt;h1&gt;How to assign conditions&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;On user level, we could create and add custom attributes for users in [[202404011327 Entra ID|&quot;Entra ID&quot;]]&lt;/li&gt;
&lt;li&gt;In the role (in-built or custom) you can add a condition&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview&quot;&gt;ABAC overview&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Roles</title><link>https://sajalchoudhary.net/til/azure-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-roles/</guid><pubDate>Sat, 06 Apr 2024 10:16:00 GMT</pubDate><content:encoded>&lt;p&gt;Different from [[202401072001 Entra ID Roles|entra roles]] &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Roles consist of actions that are assigned to security principal at a certain scope&lt;/li&gt;
&lt;li&gt;Scope can be at [[202401101441 Azure subscriptions|subscription]] or [[202404051818 Resource Groups|resource groups]]&lt;/li&gt;
&lt;li&gt;Ideally apply it to a group / can be applied to individual user also but that is cumbersome&lt;/li&gt;
&lt;li&gt;Leverage [[202401121503 Entra Privileged Identity Management|pim]] for just in time&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Types of Roles&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Built-in &lt;ol&gt;
&lt;li&gt;Owner - full access to manage resources and assign roles&lt;/li&gt;
&lt;li&gt;contributor - access to manage resources&lt;/li&gt;
&lt;li&gt;reader - can see, not make any changes&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[[202401072038 Azure RBAC custom roles|custom roles]]&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/rbac-and-directory-admin-roles&quot;&gt;Azure roles, Microsoft Entra roles, and classic subscription administrator roles&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles&quot;&gt;Azure Built in roles reference&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>rbac</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure RBAC</title><link>https://sajalchoudhary.net/til/azure-rbac/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-rbac/</guid><pubDate>Sat, 06 Apr 2024 09:49:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202404051739 Governance Overview|azure governance]]&lt;/p&gt;
&lt;p&gt;Role based access control / giving something permissions at a certain scope when needed&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Applies to all items in control plane ([[202404051803 Management groups|management groups]],[[202404051818 Resource Groups|resource groups]], [[202404061212 Azure Resources|resources]])&lt;/li&gt;
&lt;li&gt;can apply to some storage roles in data plane&lt;/li&gt;
&lt;li&gt;Inherited&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;License&lt;/h1&gt;
&lt;p&gt;free to use&lt;/p&gt;
&lt;h1&gt;Limits&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;4000 per [[202401101441 Azure subscriptions|subscription]]&lt;/li&gt;
&lt;li&gt;500 per [[202404051803 Management groups|management group]]&lt;/li&gt;
&lt;li&gt;5000 per tenant for [[202401072038 Azure RBAC custom roles|custom roles]]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[[202404061316 Azure Roles]]&lt;br /&gt;[[202401072038 Azure RBAC custom roles]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/overview&quot;&gt;RBAC overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-rbac-limits&quot;&gt;RBAC Limits&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>rbac</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Create diagrams in obsidian</title><link>https://sajalchoudhary.net/til/create-diagrams-in-obsidian/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/create-diagrams-in-obsidian/</guid><pubDate>Sat, 06 Apr 2024 09:23:00 GMT</pubDate><content:encoded>&lt;p&gt;Using mermaid code-block, we can create diagrams.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;flowchart TD
    Start --&amp;gt; Stop
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use subgraph to create box.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram&quot;&gt;https://help.obsidian.md/Editing+and+formatting/Advanced+formatting+syntax#Diagram&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://mermaid.js.org/syntax/flowchart.html&quot;&gt;Mermaid flowchart reference&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>obsidian</category><category>howto</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Resources</title><link>https://sajalchoudhary.net/til/azure-resources/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-resources/</guid><pubDate>Sat, 06 Apr 2024 09:12:00 GMT</pubDate><content:encoded>&lt;h1&gt;Resource structure&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	ResourceProviders --&amp;gt; Resources --&amp;gt; Properties &amp;amp; Actions
	
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Azure Resource Manager (ARM) replaced Azure Service Manager&lt;/li&gt;
&lt;li&gt;ARM Resource providers have n number of resources under them&lt;/li&gt;
&lt;li&gt;Resources have properties and actions&lt;/li&gt;
&lt;li&gt;Querying ARM can be slow and expensive. There is a quota. So we use [[202406151133 Azure Resource Graph|Azure Resource Graph]]&lt;/li&gt;
&lt;li&gt;1 [[202404061212 Azure Resources|resource]] can be a member of only 1 [[202404051818 Resource Groups|RG]]&lt;/li&gt;
&lt;li&gt;1 [[202404061212 Azure Resources|resource]] and [[202404051818 Resource Groups|resource groups]] is tagged to a single [[202401101441 Azure subscriptions|subscription]]&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Resource Groups</title><link>https://sajalchoudhary.net/til/resource-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/resource-groups/</guid><pubDate>Fri, 05 Apr 2024 15:18:00 GMT</pubDate><content:encoded>&lt;p&gt;Another construct for grouping together [[202404061212 Azure Resources|resources]]. Things that run together, might get decommissioned together, policies, etc.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I can create n number of [[202404061212 Azure Resources|resources]] under a [[202401101441 Azure subscriptions|subscription]]&lt;/li&gt;
&lt;li&gt;Can not nest resource groups i.e. can&apos;t put one RG in another RG.&lt;/li&gt;
&lt;li&gt;It is not a boundary for access&lt;/li&gt;
&lt;li&gt;1 [[202404061212 Azure Resources|resource]] can be a member of only 1 [[202404051818 Resource Groups|RG]]&lt;/li&gt;
&lt;li&gt;created in an Azure region&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Management groups</title><link>https://sajalchoudhary.net/til/management-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/management-groups/</guid><pubDate>Fri, 05 Apr 2024 15:03:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;a hierarchy that can be created for better management of subscriptions&lt;ol&gt;
&lt;li&gt;All [[202401101441 Azure subscriptions|subscriptions]] under a management group inherit the conditions applied to the [[202404051803 Management groups|management group]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;A management group can have 6 levels of depth. It does not include the root MG. root MG has the same ID as tenant AAD ID.&lt;/li&gt;
&lt;li&gt;by default all subscriptions get added to root MG.&lt;/li&gt;
&lt;li&gt;1 MG can have only 1 parent, but multiple children&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Governance Overview</title><link>https://sajalchoudhary.net/til/governance-overview/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/governance-overview/</guid><pubDate>Fri, 05 Apr 2024 14:39:00 GMT</pubDate><content:encoded>&lt;p&gt;Governance is about a set of rules that need to be followed.&lt;br /&gt;In cloud, the way of doing things is different.&lt;br /&gt;Governance in cloud consists of:&lt;br /&gt;[[202404061356 Azure Policy|policy]] - What can you do?&lt;br /&gt;[[202404061249 Azure RBAC|RBAC]] - Who?&lt;br /&gt;[[202404061425 Azure Cost Management|budget]] - How much?&lt;/p&gt;
&lt;p&gt;[[202312231415 Azure Master|&quot;Azure&quot;]] is shared compliance model.&lt;/p&gt;
&lt;h1&gt;How to use constructs for governance&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;flowchart LR
	ManagementGroup --&amp;gt; Subscription --&amp;gt; ResourceGroup --&amp;gt; Resource
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The closer you get to the resource, the stricter the policies can be.&lt;br /&gt;At root [[202404051803 Management groups|management group]] level for example, you want broad policies that need to apply. Least restrictive. And so on.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=eLSjnF6Crlw&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=12&quot;&gt;https://www.youtube.com/watch?v=eLSjnF6Crlw&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=12&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/governance/&quot;&gt;Azure Governance&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure</title><link>https://sajalchoudhary.net/now/azure/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/azure/</guid><pubDate>Mon, 01 Apr 2024 17:41:49 GMT</pubDate><content:encoded>&lt;p&gt;This will be my main focus for this year. &lt;/p&gt;
&lt;p&gt;Working to get my second cert AZ-104.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://74c1f43a.scdotnetv3.pages.dev/done/__GHOST_URL__/tech-notes/azure-admin-associate/&quot;&gt;Completed on 3rd Sep&lt;/a&gt;, 2024&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Conditional Access</title><link>https://sajalchoudhary.net/til/conditional-access/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/conditional-access/</guid><pubDate>Mon, 01 Apr 2024 12:57:00 GMT</pubDate><content:encoded>&lt;h1&gt;How&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Once authentication is done, Entra ID creates Refresh Token and Access Token. &lt;/li&gt;
&lt;li&gt;It sends RT and AT to user&lt;/li&gt;
&lt;li&gt;User sends AT to App&lt;/li&gt;
&lt;li&gt;ATs are time-bombed&lt;/li&gt;
&lt;li&gt;After time is done, new RT and AT generated&lt;/li&gt;
&lt;li&gt;If a new app requires authentication, user can use the same AT&lt;/li&gt;
&lt;li&gt;Every ask for token goes through [[202404011557 Conditional Access|conditional access]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Allows you to set conditions for access&lt;ol&gt;
&lt;li&gt;device&lt;/li&gt;
&lt;li&gt;location&lt;/li&gt;
&lt;li&gt;apps&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Access controls (make multiple selections)&lt;ol&gt;
&lt;li&gt;use MFA, FIDO2, etc.&lt;/li&gt;
&lt;li&gt;password policy etc&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Session controls&lt;ol&gt;
&lt;li&gt;continuous access evaluation&lt;/li&gt;
&lt;li&gt;cap&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>entra</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra MFA</title><link>https://sajalchoudhary.net/til/entra-mfa/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-mfa/</guid><pubDate>Mon, 01 Apr 2024 12:32:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Passwords on their own are bad&lt;/li&gt;
&lt;li&gt;MFA is from [[202404011414 Authentication and Authorization]] 2 or more items&lt;ol&gt;
&lt;li&gt;I know&lt;/li&gt;
&lt;li&gt;I have&lt;/li&gt;
&lt;li&gt;I am&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Example: &lt;ol&gt;
&lt;li&gt;Password + SMS/Phone&lt;/li&gt;
&lt;li&gt;Password + Auth app&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;You want to prompt sparingly otherwise it becomes muscle memory and they don&apos;t read the message/ they will keep saying yes&lt;/li&gt;
&lt;li&gt;Requires P1 license or use Security defaults (Ideally want to use conditional access if you don&apos;t have P1) or global admin&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Authentication context and number matching&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;In auth app, shows location and asks to enter the number&lt;/li&gt;
&lt;li&gt;not phishing attack proof&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Phishing resistant&lt;/h1&gt;
&lt;p&gt;Provided by machine so considered phishing resistant&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hello for business&lt;/li&gt;
&lt;li&gt;FIDO2&lt;/li&gt;
&lt;li&gt;CBA (Certificate based authentication)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Passwordless&lt;/h1&gt;
&lt;p&gt;Above 3 + MFA app.&lt;/p&gt;
&lt;h1&gt;Temporary access pass&lt;/h1&gt;
&lt;p&gt;For new users/to bootstrap onboarding&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Authentication and Authorization</title><link>https://sajalchoudhary.net/til/authentication-and-authorization/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/authentication-and-authorization/</guid><pubDate>Mon, 01 Apr 2024 11:14:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Authentication (AuthN) is who you are&lt;ul&gt;
&lt;li&gt;I know&lt;/li&gt;
&lt;li&gt;I have (device)&lt;/li&gt;
&lt;li&gt;I am&lt;/li&gt;
&lt;li&gt;[[202404011532 Entra MFA|Entra MFA]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Authorization (AuthZ) is what you can do&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AuthZ is always against [[202404011327 Entra ID|&quot;Entra ID&quot;]].&lt;/p&gt;
&lt;h1&gt;Ways for authentication&lt;/h1&gt;
&lt;p&gt;There are different ways for authentication, as listed below. After authentication is done then in all cases [[202404011327 Entra ID|&quot;Entra ID&quot;]] creates a token.&lt;/p&gt;
&lt;h2&gt;Password hash synchronization (cloud)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Best option/always recommended even if using others as primary (see pt. 4)&lt;/li&gt;
&lt;li&gt;AD has password hash. &lt;/li&gt;
&lt;li&gt;Hash of this password hash is synced to [[202404011327 Entra ID|&quot;Entra ID&quot;]] which is then used for AuthN&lt;/li&gt;
&lt;li&gt;can compare if any creds are leaked on dark web&lt;/li&gt;
&lt;li&gt;can&apos;t do things like locked accounts/logon hours/expired password&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Pass through AuthN (hybrid)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;If you want to use your onprem DCs for authentication&lt;/li&gt;
&lt;li&gt;Sending cred to [[202404011327 Entra ID|&quot;Entra ID&quot;]], but it checks with onprem&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Federation (hybrid)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Not recommended&lt;/li&gt;
&lt;li&gt;Could be ADFS or third-party thing&lt;/li&gt;
&lt;li&gt;Different flow: &lt;ol&gt;
&lt;li&gt;Cred to federation service&lt;/li&gt;
&lt;li&gt;Federation service will check with DC&lt;/li&gt;
&lt;li&gt;Create token and share with user&lt;/li&gt;
&lt;li&gt;User will use that token to get token from [[202404011327 Entra ID|&quot;Entra ID&quot;]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID objects</title><link>https://sajalchoudhary.net/til/entra-id-objects/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-objects/</guid><pubDate>Mon, 01 Apr 2024 10:43:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202401101139 Entra ID users]]&lt;/li&gt;
&lt;li&gt;[[202312242245 Entra ID Groups]] (Static/Dynamic)&lt;/li&gt;
&lt;li&gt;Applications/Resources [[202312231440 Azure Entra ID App Identity]] (Service Principals)&lt;/li&gt;
&lt;li&gt;[[202312231441 Entra ID Managed Identities]] (Service Principals)&lt;/li&gt;
&lt;li&gt;Devices&lt;ul&gt;
&lt;li&gt;registered (Known) / Auth as MSFT account&lt;/li&gt;
&lt;li&gt;join / auth as Azure AD&lt;/li&gt;
&lt;li&gt;hybrid (joined to onprem AD and register with Azure AD)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID</title><link>https://sajalchoudhary.net/til/entra-id/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id/</guid><pubDate>Mon, 01 Apr 2024 10:27:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Entra ID is the identity provider for MSFT clouds&lt;ol&gt;
&lt;li&gt;[[202312231415 Azure Master|&quot;Azure&quot;]]&lt;/li&gt;
&lt;li&gt;M365&lt;/li&gt;
&lt;li&gt;Dynamics 365&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Entra ID is not AD in the cloud.&lt;ol&gt;
&lt;li&gt;Has flat structure/ No OUs&lt;/li&gt;
&lt;li&gt;Has administrative units&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;We can create additional tenants&lt;/li&gt;
&lt;li&gt;By default it will &amp;lt;&amp;gt;.onmicrosoft.com&lt;ol&gt;
&lt;li&gt;Can create/add custom domains&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;When assigning license to groups only license applied to first level works not to members of nested groups&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;[[202208041136 Entra Connect sync|&quot;Entra connect&quot;]] to sync between on-prem AD and [[202404011327 Entra ID|&quot;Entra ID&quot;]]&lt;br /&gt;Active directory is always the source of truth.&lt;br /&gt;	Even if HR system is connected to Azure. Entra ID talks to on-prem to create object, which then replicates to Entra ID.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Decentralised identities</title><link>https://sajalchoudhary.net/til/decentralised-identities/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/decentralised-identities/</guid><pubDate>Mon, 01 Apr 2024 09:58:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;gaining momentum&lt;/li&gt;
&lt;li&gt;User is in centre instead of ID provider&lt;/li&gt;
&lt;li&gt;user or other identity owns the identity&lt;/li&gt;
&lt;li&gt;rooted in some trust system as IdProvider was the trusted system earlier&lt;/li&gt;
&lt;li&gt;issuer can issue credentials to subject which subject can share with verifier&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><category>identity</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Why is identity needed</title><link>https://sajalchoudhary.net/til/why-is-identity-needed/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/why-is-identity-needed/</guid><pubDate>Mon, 01 Apr 2024 09:45:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;For any service, its critical to apply principle of least privilege&lt;ol&gt;
&lt;li&gt;With shared accounts we don&apos;t know who did what&lt;/li&gt;
&lt;li&gt;we can&apos;t give granular permissions because for shared id it needs to have sum of all required permissions&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;this requires granted security principals certain actions (roles) in a certain scope&lt;/li&gt;
&lt;li&gt;a central store is required where identities are saved&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>identity</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Multiple addresses to same gmail</title><link>https://sajalchoudhary.net/til/multiple-addresses-to-same-gmail/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/multiple-addresses-to-same-gmail/</guid><pubDate>Sat, 30 Mar 2024 12:11:00 GMT</pubDate><content:encoded>&lt;h1&gt;Gmail + address&lt;/h1&gt;
&lt;p&gt;Create account like &lt;a href=&quot;mailto:sajal.choudhary+aws@gmail.com&quot;&gt;sajal.choudhary+aws@gmail.com&lt;/a&gt;. This will go to &lt;a href=&quot;mailto:sajal.choudhary@gmail.com&quot;&gt;sajal.choudhary@gmail.com&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Gmail dot blindness&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;mailto:saja.l.choudhary@gmail.com&quot;&gt;saja.l.choudhary@gmail.com&lt;/a&gt; and &lt;a href=&quot;mailto:sajal.choudhary@gmail.com&quot;&gt;sajal.choudhary@gmail.com&lt;/a&gt; are same to google. But other services might see it differently.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.labnol.org/internet/email/gmail-email-alias-two-separate-gmail-address/2388/&quot;&gt;https://www.labnol.org/internet/email/gmail-email-alias-two-separate-gmail-address/2388/&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>email</category><category>gmail</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>NPS related</title><link>https://sajalchoudhary.net/til/nps-related/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/nps-related/</guid><pubDate>Thu, 28 Mar 2024 11:33:00 GMT</pubDate><content:encoded>&lt;h1&gt;Logs&lt;/h1&gt;
&lt;p&gt;Logs are present in event viewer (Custom views &amp;gt; Server roles &amp;gt; Network Policy and Access Services)&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/troubleshoot-network-policy-server&quot;&gt;Guidance for troubleshooting Network Policy Server - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>nps</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Type of machine learning</title><link>https://sajalchoudhary.net/til/type-of-machine-learning/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/type-of-machine-learning/</guid><pubDate>Mon, 25 Mar 2024 20:00:00 GMT</pubDate><content:encoded>&lt;h1&gt;Supervised&lt;/h1&gt;
&lt;p&gt;Training data includes both features and known labels. Follows the process of train, validate and evaluate.&lt;br /&gt;In training phase dataset is split randomly. Choose an algorithm to create a model  using half the data. Then it is validated on the remaining half, i.e. how accurate it is. Compare the known actual labels against the predicted values.&lt;br /&gt;Usually data engineer will go through multiple iterations of this. And chose the one which gives the best results (evaluation metric).&lt;/p&gt;
&lt;h2&gt;[[202403252313 Regression models|regression]]&lt;/h2&gt;
&lt;p&gt;The label is a numerical value. Like number of ice cream sold on a day.&lt;/p&gt;
&lt;h2&gt;Classification&lt;/h2&gt;
&lt;p&gt;Label represents a categorisation or class.&lt;/p&gt;
&lt;h3&gt;Binary classification&lt;/h3&gt;
&lt;p&gt;Label is Yes/No. True/False. Sort of a thing. Does the patient have diabetes given the features (age/background,etc.)&lt;/p&gt;
&lt;h3&gt;Multi-class classification&lt;/h3&gt;
&lt;p&gt;Label is mutually exclusive different things. Types of dogs for example.&lt;br /&gt;Also can be multilabel classification models where one observation can have more than one labels.&lt;/p&gt;
&lt;h1&gt;Unsupervised&lt;/h1&gt;
&lt;p&gt;No lables. Algorithm figures out relations between features of observations.&lt;/p&gt;
&lt;h2&gt;Clustering&lt;/h2&gt;
&lt;p&gt;identifies similarities between observations based on their features, and groups them into discrete clusters.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/fundamentals-machine-learning/3-types-of-machine-learning&quot;&gt;https://learn.microsoft.com/en-in/training/modules/fundamentals-machine-learning/3-types-of-machine-learning&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ai</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Machine Learning</title><link>https://sajalchoudhary.net/til/machine-learning/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/machine-learning/</guid><pubDate>Mon, 25 Mar 2024 19:44:00 GMT</pubDate><content:encoded>&lt;h1&gt;What is ML?&lt;/h1&gt;
&lt;p&gt;Basic idea is to use data from the past to predict unknown outcomes.&lt;/p&gt;
&lt;h1&gt;Steps involved&lt;/h1&gt;
&lt;h2&gt;Training&lt;/h2&gt;
&lt;p&gt;Training data has past observations.&lt;br /&gt;This includes: features and label.&lt;br /&gt;Feature is basically what you are observing (x).&lt;br /&gt;And label is the thing you want to train for (y).&lt;/p&gt;
&lt;h2&gt;Algorithm&lt;/h2&gt;
&lt;p&gt;An algorithm is applied to the training data to determine relation between features and label.&lt;/p&gt;
&lt;h2&gt;Result&lt;/h2&gt;
&lt;p&gt;Result is a model. The so called f in y=f(x).&lt;/p&gt;
&lt;h1&gt;Inferencing&lt;/h1&gt;
&lt;p&gt;After training is completed, it can be used to get output given x.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/training/modules/fundamentals-machine-learning/2-what-is-machine-learning&quot;&gt;https://learn.microsoft.com/en-in/training/modules/fundamentals-machine-learning/2-what-is-machine-learning&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>ai</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Delegate permission to restore deleted ad objects</title><link>https://sajalchoudhary.net/til/delegate-permission-to-restore-deleted-ad-objects/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/delegate-permission-to-restore-deleted-ad-objects/</guid><pubDate>Mon, 25 Mar 2024 09:47:00 GMT</pubDate><content:encoded>&lt;p&gt;You need to delegate &lt;strong&gt;Reanimate tombstones&lt;/strong&gt; permission on the Domain level and make it applied to &lt;strong&gt;This object and all descendant objects&lt;/strong&gt;. You can the &lt;strong&gt;Security&lt;/strong&gt; tab in your Domain properties to do that:&lt;/p&gt;
&lt;h1&gt;Using ADUC, grant user/group rights to reanimate tombstone:&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Right-click domain root and select Properties&lt;/li&gt;
&lt;li&gt;On the Security tab, click Advanced&lt;/li&gt;
&lt;li&gt;Click Add and select user/group account&lt;/li&gt;
&lt;li&gt;Allow the Reanimate Tombstones permission and click OK&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/archive/technet-wiki/20592.how-to-delegate-the-restoration-of-objects-from-active-directory-recycle-bin&quot;&gt;How to Delegate the Restoration of Objects from Active Directory Recycle Bin | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Use managed service account for scheduled task</title><link>https://sajalchoudhary.net/til/use-managed-service-account-for-scheduled-task/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/use-managed-service-account-for-scheduled-task/</guid><pubDate>Mon, 25 Mar 2024 08:52:00 GMT</pubDate><content:encoded>&lt;h1&gt;Pre-requisites&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Add managed service account to groups/provide access on server as needed&lt;/li&gt;
&lt;li&gt;Add service account to Logon as batch job&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Add service account to Logon as batch job&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to gpedit&lt;/li&gt;
&lt;li&gt;Computer Configuration &amp;gt; Windows Settings &amp;gt; Security Settings &amp;gt; Local Policies &amp;gt; User Rights Assignment&lt;/li&gt;
&lt;li&gt;Add account to Logon as a batch job&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;h2&gt;Add service account to server&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Install-AdServiceAccount &amp;lt;gMSA&amp;gt;

Test-AdServiceAccount &amp;lt;gMSA&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Add service account to scheduled task&lt;/h2&gt;
&lt;p&gt;This needs to run as powershell. It is not possible to set it in UI.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; $principal = New-ScheduledTaskPrincipal -UserID domain\account$ -LogonType Password  
  
&amp;gt; Set-ScheduledTask -TaskName &quot;DNS monitoring&quot; -Principal $principal  
  
TaskPath TaskName State  
-------- -------- -----  
\ DNS monitoring Ready
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>SMB share does not work for cluster</title><link>https://sajalchoudhary.net/til/smb-share-does-not-work-for-cluster/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/smb-share-does-not-work-for-cluster/</guid><pubDate>Wed, 13 Mar 2024 10:11:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
## Workaround
Get-ClusterResource&quot;resource name&quot;| Set-ClusterParameter EnableNetBIOS 1
Stop-ClusterResource&quot;resource name&quot;
Start-ClusterResource&quot;resource name&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/high-availability/netbios-wins-dont-bind-cluster-ip-address-resources&quot;&gt;NetBIOS and WINS don&apos;t bind to cluster IP address resources - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>vMotion does not work</title><link>https://sajalchoudhary.net/til/vmotion-does-not-work/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmotion-does-not-work/</guid><pubDate>Mon, 11 Mar 2024 11:27:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Error:

The vMotion failed because the destination host did not receive data from the source host on the vMotion network. Please check your vMotion network settings and physical network configuration and ensure they are correct.
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Check ping&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;vmkping -I vmkX x.x.x.x  
  
#where x.x.x.x is the hostname or IP address of the server that you want to ping and vmkX is the vmkernel interface to ping out of.
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/1030264&quot;&gt;Troubleshooting vMotion fails with network errors (1030264) (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/1003728&quot;&gt;Testing VMkernel network connectivity with the vmkping command (1003728) (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/65184&quot;&gt;Troubleshooting vMotion network connectivity issues (65184) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows logoff user after period of inactivity</title><link>https://sajalchoudhary.net/til/windows-logoff-user-after-period-of-inactivity/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-logoff-user-after-period-of-inactivity/</guid><pubDate>Fri, 08 Mar 2024 10:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Can be done through GPO&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;ComputerPoplicy &amp;gt; Computer Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Remote Desktop Services &amp;gt; Remote Desktop Session Host &amp;gt; Session Time Limits &amp;gt; set values as follows:  
Set time limit for disconnected sessions: Enabled  5 minutes  
Set time limit for active but idle Remote Desktop Services sessions: Enabled  5minutes
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/archive/msdn-technet-forums/9c83443b-05f4-405c-8587-ee510063c83f&quot;&gt;Logoff Idle Users | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://devblogs.microsoft.com/oldnewthing/20190723-00/?p=102727&quot;&gt;How can I log users off after a period of inactivity, rather than merely locking the workstation? Is there a &quot;logoff&quot; screen saver? - The Old New Thing (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Raise Savya</title><link>https://sajalchoudhary.net/now/raise-savya/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/raise-savya/</guid><pubDate>Sun, 18 Feb 2024 17:41:49 GMT</pubDate><content:encoded>&lt;h2&gt;2026-03-05&lt;/h2&gt;
&lt;p&gt;Savya is at the age now, where he wants to speak so many things, but just doesn’t have the vocabulary to do so. Whenever he passes the photo fall, he starts pointing and naming his grandpa, bua, mom, dad and so on. He calls me papa first, and then if I don’t respond after 3-4 times, he will say - saja, saja, and so on.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Savya is my child. He is going to päiväkoti now. Raising him continues to be the best thing in my life.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows cluster Tuning Network Thresholds</title><link>https://sajalchoudhary.net/til/windows-cluster-tuning-network-thresholds/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-tuning-network-thresholds/</guid><pubDate>Wed, 14 Feb 2024 12:38:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;&amp;gt; get-cluster | fl *subnet*
CrossSubnetDelay          : 1000
CrossSubnetThreshold      : 20
PlumbAllCrossSubnetRoutes : 0
SameSubnetDelay           : 1000
SameSubnetThreshold       : 20
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Heartbeat timeout is SameSubnetThreshold. &lt;/p&gt;
&lt;p&gt;SameSubnetDelay is in millisecond.&lt;br /&gt;So along with SameSubnetThreshold what this means is it will ping every 1 second 20 times till it gives an error. So for 20 seconds if there is no response, then it will give heartbeat timeout.&lt;/p&gt;
&lt;h1&gt;Update&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;(get-cluster).SameSubnetThreshold = 30
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/failover-clustering/tuning-failover-cluster-network-thresholds/ba-p/371834&quot;&gt;Tuning Failover Cluster Network Thresholds - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell registry key related</title><link>https://sajalchoudhary.net/til/powershell-registry-key-related/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-registry-key-related/</guid><pubDate>Tue, 06 Feb 2024 11:38:00 GMT</pubDate><content:encoded>&lt;h1&gt;Get single key&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion -Name DevicePath -Name DevicePath

## or
(Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion).DevicePath
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Delete key&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Remove-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion -Name PSHome
Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion -Name PowerShellPath


&amp;gt; $Path = &apos;HKLM:\SYSTEM\ControlSet001\Control\Session Manager\Environment&apos;
&amp;gt; Remove-ItemProperty -Path $Path -Name Cloud_Setting_repositories
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/scripting/samples/working-with-registry-entries?view=powershell-7.4&quot;&gt;Working with registry entries - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Event viewer logs location</title><link>https://sajalchoudhary.net/til/event-viewer-logs-location/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/event-viewer-logs-location/</guid><pubDate>Tue, 30 Jan 2024 10:12:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;%SystemRoot%\System32\winevt\Logs
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows event viewer logs location</title><link>https://sajalchoudhary.net/til/windows-event-viewer-logs-location/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-event-viewer-logs-location/</guid><pubDate>Tue, 30 Jan 2024 10:12:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;%SystemRoot%\System32\winevt\Logs
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware VM serial number</title><link>https://sajalchoudhary.net/til/vmware-vm-serial-number/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-vm-serial-number/</guid><pubDate>Mon, 29 Jan 2024 10:30:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;$VM = Get-VM 7ocilpipaap01
$VM.ExtensionData.Config.UUid
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This has the serial number.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>WSUS troubleshooting</title><link>https://sajalchoudhary.net/til/wsus-troubleshooting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/wsus-troubleshooting/</guid><pubDate>Thu, 25 Jan 2024 08:45:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-WindowsUpdateLog
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Troubleshooting steps - client&lt;/h1&gt;
&lt;h2&gt;Check hard drive space&lt;/h2&gt;
&lt;h2&gt;Check connectivity&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Test-NetConnection -ComputerName &amp;lt;WSUS_Server&amp;gt; -Port 8530
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;WSUS settings&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Get-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Check event log&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Application Event log as well as App and Service Logs &amp;gt; Microsoft &amp;gt; Windows &amp;gt; WindowsUpdateClient
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Reregister client with wsus&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;gpupdate /force
wuauclt /detectnow

## Sometimes
wuauclt.exe /resetauthorization /detectnow
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Troubleshooting problems - server&lt;/h1&gt;
&lt;h2&gt;IIS Logs location&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;c:\inetpub\logfiles
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://arnaudloos.com/2019/wsus-troubleshooting/&quot;&gt;WSUS Troubleshooting Steps | Arnaud Loos&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-client/deployment/common-windows-update-errors&quot;&gt;Common Windows Update errors - Windows Client | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/windows-server/administration/windows-server-update-services/manage/wsus-messages-and-troubleshooting-tips&quot;&gt;WSUS Messages and Troubleshooting Tips | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/mem/configmgr/update-management/troubleshoot-software-update-scan-failures&quot;&gt;Troubleshoot software update scan failures - Configuration Manager | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware ESXi upgrade using baselines</title><link>https://sajalchoudhary.net/til/vmware-esxi-upgrade-using-baselines/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-esxi-upgrade-using-baselines/</guid><pubDate>Mon, 22 Jan 2024 08:53:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article/316595/build-numbers-and-versions-of-vmware-esx.html&quot;&gt;Build numbers and versions of VMware ESXi/ESX (broadcom.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/rn/vsphere-esxi-70u3q-release-notes/index.html#Patch%20Download%20and%20Installation&quot;&gt;VMware ESXi 7.0 Update 3q Release Notes&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Download a zip file for patches&lt;/h1&gt;
&lt;h2&gt;For Full ISO&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Log in to the Broadcom Support portal.&lt;/li&gt;
&lt;li&gt;On the left hand side menu, click My Downloads.&lt;/li&gt;
&lt;li&gt;In the search bar in the upper right side of the page enter &quot;VMware vSphere&quot;&lt;/li&gt;
&lt;li&gt;Choose VMware vSphere&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Products&lt;/strong&gt; tab, select VMware VSphere Enterprise and appropriate version.&lt;/li&gt;
&lt;li&gt;Click View Group on the right side of the VMware vSphere Hypervisor (ESXi) item. &lt;/li&gt;
&lt;li&gt;Use the drop-down in the upper-right to choose the desired version.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;For patches&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware+vSphere&amp;amp;tab=Solutions&quot;&gt;Direct Link&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to the Broadcom Support portal.&lt;/li&gt;
&lt;li&gt;On the left hand side menu, click My Downloads.&lt;/li&gt;
&lt;li&gt;In the search bar in the upper right side of the page enter &quot;VMware vSphere&quot;&lt;/li&gt;
&lt;li&gt;Choose VMware vSphere&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Solutions&lt;/strong&gt; tab, select VMware VSphere Enterprise and appropriate version.&lt;/li&gt;
&lt;li&gt;From the list download the appropriate version.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;For HW drivers&lt;/h2&gt;
&lt;h3&gt;How to find&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Log in to the Broadcom Support portal.&lt;/li&gt;
&lt;li&gt;On the left hand side menu, click My Downloads.&lt;/li&gt;
&lt;li&gt;In the search bar in the upper right side of the page enter &quot;VMware vSphere&quot;&lt;/li&gt;
&lt;li&gt;Choose VMware vSphere&lt;/li&gt;
&lt;li&gt;Under the Products Tab, choose the user entitlement for VMware vSphere (e.g. click on VMware vSphere - Enterprise).&lt;/li&gt;
&lt;li&gt;Select the major version of vSphere required.&lt;/li&gt;
&lt;li&gt;Select the Custom ISOs or OEM Addons tab.&lt;/li&gt;
&lt;li&gt;Click on the desired Custom ISO or Addon by OEM name and ESXi version.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Upload updates to Lifecycle Manager&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Go to vcenter &amp;gt; Lifecycle Manager&lt;/li&gt;
&lt;li&gt;Select the vcenter.&lt;/li&gt;
&lt;li&gt;Go to Actions &amp;gt; Import Updates.&lt;/li&gt;
&lt;li&gt;Browse and provide the zip. Let it import.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Create baseline&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;In Lifecycle Manager, go to baselines tab.&lt;/li&gt;
&lt;li&gt;Click new &amp;gt; Baseline&lt;/li&gt;
&lt;li&gt;Select Patch&lt;/li&gt;
&lt;li&gt;In select patches automatically screen, uncheck the option.&lt;/li&gt;
&lt;li&gt;In select patches manually, select the appropriate release.&lt;ol&gt;
&lt;li&gt;Filter id . Esxi7.&lt;/li&gt;
&lt;li&gt;Select bugfix (it has bugfix+security)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.update_manager.doc/GUID-748EA6C9-C293-4B75-AA33-5A4C8E6B4B05.html&quot;&gt;Create a Fixed Patch Baseline (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://knowledge.broadcom.com/external/article?articleNumber=366685&quot;&gt;Broadcom Link&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Access Reviews</title><link>https://sajalchoudhary.net/til/entra-access-reviews/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-access-reviews/</guid><pubDate>Fri, 12 Jan 2024 12:18:00 GMT</pubDate><content:encoded>&lt;h1&gt;Kinds&lt;/h1&gt;
&lt;p&gt;Review active and eligible assignments for: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Teams and Groups (Identity Governance)&lt;/li&gt;
&lt;li&gt;Applications (Identity Governance)&lt;/li&gt;
&lt;li&gt;Azure RBAC (PIM)&lt;/li&gt;
&lt;li&gt;Entra ID Roles (PIM)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Access Review&lt;ul&gt;
&lt;li&gt;Use the portal (ID Gov/PIM) to create an access review &lt;/li&gt;
&lt;li&gt;Example: App admin (Role)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Timing&lt;ul&gt;
&lt;li&gt;Duration, frequency and end date for review&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reviewers&lt;ul&gt;
&lt;li&gt;Specify who will review&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Privileged Identity Management</title><link>https://sajalchoudhary.net/til/entra-privileged-identity-management/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-privileged-identity-management/</guid><pubDate>Fri, 12 Jan 2024 12:03:00 GMT</pubDate><content:encoded>&lt;h1&gt;Features&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Just-in-Time access&lt;/li&gt;
&lt;li&gt;Time-Bound Access&lt;/li&gt;
&lt;li&gt;Activation Approval&lt;/li&gt;
&lt;li&gt;Activation with MFA&lt;/li&gt;
&lt;li&gt;Audit Trail&lt;/li&gt;
&lt;li&gt;Access Reviews&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Identity&lt;ul&gt;
&lt;li&gt;user/group/app&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Assignment&lt;ul&gt;
&lt;li&gt;Permanent or time-bound&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Activation&lt;ul&gt;
&lt;li&gt;privileges must be activated (requires approval/mfa)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Entitlement Management</title><link>https://sajalchoudhary.net/til/entra-id-entitlement-management/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-entitlement-management/</guid><pubDate>Wed, 10 Jan 2024 17:57:00 GMT</pubDate><content:encoded>&lt;p&gt;Part of [[202401101559 Entra ID Governance]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;helps enterprises perform access management at scale&lt;/li&gt;
&lt;li&gt;licenses are required for those who request, approve or are assigned a package.&lt;/li&gt;
&lt;li&gt;Access packages are created in portal&lt;/li&gt;
&lt;li&gt;User access is managed through myaccess.microsoft.com&lt;/li&gt;
&lt;li&gt;Permissions required: Full (Identity Governance Admin)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Identities&lt;ul&gt;
&lt;li&gt;user (internal or external)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Access Package&lt;ul&gt;
&lt;li&gt;created for a particular role (like HR management)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Resource : Role&lt;ul&gt;
&lt;li&gt;provide access to resources: share, security group, etc.&lt;/li&gt;
&lt;li&gt;add roles required for their work&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Collection&lt;ul&gt;
&lt;li&gt;used to organize access package and resources (like a logical container)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>entra</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Governance</title><link>https://sajalchoudhary.net/til/entra-id-governance/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-governance/</guid><pubDate>Wed, 10 Jan 2024 12:59:00 GMT</pubDate><content:encoded>&lt;p&gt;A suite of tools that helps with access management etc. for organizations at scale.&lt;/p&gt;
&lt;h1&gt;Features available&lt;/h1&gt;
&lt;h2&gt;[[202401102057 Entra ID Entitlement Management]]&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;helps enterprises perform access management at scale&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;[[202401121503 Entra Privileged Identity Management]]&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;just in time access&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;[[202401121518 Entra Access Reviews]]&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;checks/ what access was provided is still needed or not&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Lifecycle workflows&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;processes around people joining, moving or leaving.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Terms of use&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;usage policies&lt;/li&gt;
&lt;li&gt;Consent&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Licenses&lt;/h1&gt;
&lt;p&gt;P1 , P2, Identity Governance Package&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure subscriptions</title><link>https://sajalchoudhary.net/til/azure-subscriptions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-subscriptions/</guid><pubDate>Wed, 10 Jan 2024 11:41:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;each service belongs to a subscription &lt;/li&gt;
&lt;li&gt;Each subscription can have different billing details&lt;/li&gt;
&lt;li&gt;Multiple subscriptions can be linked to same account&lt;/li&gt;
&lt;li&gt;More than one azure account can be linked to the same subscription&lt;/li&gt;
&lt;li&gt;Billing is on per sub basis&lt;/li&gt;
&lt;li&gt;programmatic operations require subscription ID&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Common Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;free&lt;/li&gt;
&lt;li&gt;Pay-as-you-go&lt;/li&gt;
&lt;li&gt;Enterprise Agreement&lt;/li&gt;
&lt;li&gt;Student&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>governance</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID users</title><link>https://sajalchoudhary.net/til/entra-id-users/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-users/</guid><pubDate>Wed, 10 Jan 2024 08:39:00 GMT</pubDate><content:encoded>&lt;h1&gt;Types&lt;/h1&gt;
&lt;h2&gt;cloud identity&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;defined in entra id&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Directory-synchronised identity&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;defined in on-Prem and synced to entra&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Guest user&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;defined outside azure&lt;/li&gt;
&lt;li&gt;Source is invited user&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>entra</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra External IDs</title><link>https://sajalchoudhary.net/til/entra-external-ids/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-external-ids/</guid><pubDate>Mon, 08 Jan 2024 17:57:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;AuthN happens in guest [[202408281918 Entra ID tenant|tenant]]&lt;/li&gt;
&lt;li&gt;But AuthZ happens in my [[202408281918 Entra ID tenant|tenant]]&lt;/li&gt;
&lt;li&gt;User type will be guest&lt;/li&gt;
&lt;li&gt;Cross tenant access settings control on collaboration and inbound mfa trust&lt;/li&gt;
&lt;li&gt;User flow can be designed/ask for things at the time of signup&lt;/li&gt;
&lt;li&gt;Licensing is based on MAU (Monthly Active Users) - first 50,000 free&lt;/li&gt;
&lt;li&gt;To bulk add CSV requires email address and redirection url&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;B2B Collaboration&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Actually creating a guest account in your tenant&lt;/li&gt;
&lt;li&gt;User can use their own credentials and use it to access resources in our tenant&lt;/li&gt;
&lt;li&gt;Invite External User option&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;B2B Direct connect&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Content can only be shared as Teams shared channels.&lt;/li&gt;
&lt;li&gt;Between 3 entra IDs on Azure&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;B2C&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;create separate AAD of type B2C&lt;/li&gt;
&lt;li&gt;They are my customers&lt;/li&gt;
&lt;li&gt;maybe they have their own id and we don&apos;t want to use new &lt;/li&gt;
&lt;li&gt;or they can create their ID in this AAD/local account&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/entra/external-id/external-identities-pricing&quot;&gt;https://learn.microsoft.com/en-gb/entra/external-id/external-identities-pricing&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Domain Services</title><link>https://sajalchoudhary.net/til/entra-domain-services/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-domain-services/</guid><pubDate>Mon, 08 Jan 2024 17:52:00 GMT</pubDate><content:encoded>&lt;p&gt;Previously known as Azure AD DS.&lt;/p&gt;
&lt;p&gt;To provide features that might be required for legacy on-prem applications, etc.&lt;/p&gt;
&lt;p&gt;Entra ID is modern solution.&lt;/p&gt;
&lt;h1&gt;Features&lt;/h1&gt;
&lt;p&gt;AD Domain join&lt;br /&gt;AD Group policy&lt;br /&gt;Legacy protocols (LDAP,kerberos/NTLM, etc)&lt;/p&gt;
&lt;h1&gt;Key Components&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Managed domain (Managed by MSFT)&lt;/li&gt;
&lt;li&gt;Sync (one way sync from Entra ID)&lt;/li&gt;
&lt;li&gt;Virtual Network (Resources can only interact with managed domain through virtual network (same network or network which has access to this network where managed domain is deployed))&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Connect</title><link>https://sajalchoudhary.net/til/entra-connect/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-connect/</guid><pubDate>Mon, 08 Jan 2024 17:40:00 GMT</pubDate><content:encoded>&lt;p&gt;Use it if we have on-prem AD. &lt;/p&gt;
&lt;p&gt;Hybrid Identities.&lt;/p&gt;
&lt;p&gt;Entra connect for syn between on-prem and Azure Entra ID.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID custom roles</title><link>https://sajalchoudhary.net/til/entra-id-custom-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-custom-roles/</guid><pubDate>Sun, 07 Jan 2024 18:11:00 GMT</pubDate><content:encoded>&lt;p&gt;Similar to [[202401072038 Azure RBAC custom roles]]&lt;/p&gt;
&lt;p&gt;Permissions start with microsoft.directory/&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;requires P1 license&lt;/li&gt;
&lt;li&gt;use powershell or microsoft graph api for more control over permissions not in azure portal&lt;/li&gt;
&lt;li&gt;need global admin or privileged role admin&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure RBAC custom roles</title><link>https://sajalchoudhary.net/til/azure-rbac-custom-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-rbac-custom-roles/</guid><pubDate>Sun, 07 Jan 2024 17:38:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;created using role definition&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Consists of&lt;/h1&gt;
&lt;h2&gt;Metadata&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;name, description&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Permissions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;for management/data operations&lt;/li&gt;
&lt;li&gt;Actions&lt;ul&gt;
&lt;li&gt;allowed control plane actions&lt;/li&gt;
&lt;li&gt;no deny needed as only allowed permissions are given, nothing else&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;NotActions&lt;ul&gt;
&lt;li&gt;Deny specific things under something allowed above (example: give permission to everything under virtual machines under actions, then deny delete vms actions here)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;DataActions&lt;ul&gt;
&lt;li&gt;allowed data plane actions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;NotDataActions&lt;ul&gt;
&lt;li&gt;not allowed data plane actions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Scopes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Defines where roles can be used&lt;/li&gt;
&lt;li&gt;AssignableScopes&lt;/li&gt;
&lt;li&gt;Examples:&lt;ul&gt;
&lt;li&gt;Root - /*&lt;/li&gt;
&lt;li&gt;Management Groups&lt;/li&gt;
&lt;li&gt;Subscriptions&lt;/li&gt;
&lt;li&gt;Resource Groups&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To create a custom role, following things are required:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;Name&quot;: &quot;&quot;,
  &quot;Description&quot;: &quot;&quot;,
  &quot;Actions&quot;: [],
  &quot;NotActions&quot;: [],
  &quot;DataActions&quot;: [],
  &quot;NotDataActions&quot;: [],
  &quot;AssignableScopes&quot;: []
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sample:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;Name&quot;: &quot;Reader&quot;,
  &quot;Id&quot;: &quot;acdd72a7-3385-48ef-bd42-f606fba81ae7&quot;,
  &quot;IsCustom&quot;: false,
  &quot;Description&quot;: &quot;Lets you view everything, but not make any changes.&quot;,
  &quot;Actions&quot;: [
    &quot;*/read&quot;
  ],
  &quot;NotActions&quot;: [],
  &quot;DataActions&quot;: [],
  &quot;NotDataActions&quot;: [],
  &quot;AssignableScopes&quot;: [
    &quot;/&quot;
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles&quot;&gt;https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>rbac</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Roles</title><link>https://sajalchoudhary.net/til/entra-id-roles/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-roles/</guid><pubDate>Sun, 07 Jan 2024 17:01:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Different from [[202404061316 Azure Roles|azure roles]] (they apply to [[202312231415 Azure Master|Azure]] [[202404061212 Azure Resources|resources]])&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Permissions applied for [[202404011327 Entra ID|Entra ID]]&lt;/li&gt;
&lt;li&gt;Always think least privilege&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Security Principal&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Who or what is being assigned access?&lt;/li&gt;
&lt;li&gt;[[202401101139 Entra ID users|Entra user]]&lt;/li&gt;
&lt;li&gt;[[202312242245 Entra ID Groups|entra group]] (requires p1) / &lt;ul&gt;
&lt;li&gt;needs to be setup as such at creation time (Entra ID roles can be assigned to the group)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isAssignableToRole&lt;/code&gt; property&lt;/li&gt;
&lt;li&gt;immutable so only at setup&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;app&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Role Definition&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;What are the permissions being given?&lt;/li&gt;
&lt;li&gt;types: built-in or custom - [[202401072111 Entra ID custom roles|Entra custom roles]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Built-in Entra roles&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Global Administrator&lt;/li&gt;
&lt;li&gt;User Administrator&lt;/li&gt;
&lt;li&gt;Billing Administrator&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Scope&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Where will the permissions apply?&lt;/li&gt;
&lt;li&gt;Hierarchy&lt;/li&gt;
&lt;li&gt;Traditionally used to be global&lt;/li&gt;
&lt;li&gt;Can be:&lt;ol&gt;
&lt;li&gt;[[202408281918 Entra ID tenant|tenant]]&lt;/li&gt;
&lt;li&gt;[[202401061515 Entra ID Administrative Units|Entra Administrative Units]]&lt;/li&gt;
&lt;li&gt;Entra resource&lt;ol&gt;
&lt;li&gt;Microsoft Entra groups&lt;/li&gt;
&lt;li&gt;Enterprise applications&lt;/li&gt;
&lt;li&gt;Application registrations&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;If role is assigned on container level role is applied to items contained in it&lt;/li&gt;
&lt;li&gt;If role is applied at resource level it applies to the resource&lt;ol&gt;
&lt;li&gt;In particular does not extend to members of the [[202312242245 Entra ID Groups|groups]]&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/custom-overview&quot;&gt;Entra RBAC&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/groups-concept&quot;&gt;Use groups to manage Entra roles&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/role-based-access-control/rbac-and-directory-admin-roles?toc=%2Fentra%2Fidentity%2Frole-based-access-control%2FTOC.yml&amp;amp;bc=%2Fentra%2Fidentity%2Frole-based-access-control%2Fbreadcrumb%2Ftoc.yml#microsoft-entra-roles&quot;&gt;Builtin Roles&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>rbac</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Administrative Units</title><link>https://sajalchoudhary.net/til/entra-id-administrative-units/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-administrative-units/</guid><pubDate>Sat, 06 Jan 2024 12:15:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Help manage permissions for managing Entra ID&lt;/li&gt;
&lt;li&gt;Can include a mix of users, devices and groups&lt;ul&gt;
&lt;li&gt;roles added to AU will not apply to members of the group&lt;/li&gt;
&lt;li&gt;users need to be added directly to AU&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Membership can be assigned or dynamic&lt;/li&gt;
&lt;li&gt;Objects can exist in multiple AUs - one user in 2 AUs&lt;/li&gt;
&lt;li&gt;Nesting is not possible - one AU under a different AU - No structure&lt;/li&gt;
&lt;li&gt;Not for B2C&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Restricted admin units will not have inherited permissions from directory level for example. Only users who are explicitly given permissions to managed the AU will have access to do so.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS keyring fix</title><link>https://sajalchoudhary.net/til/ucs-keyring-fix/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-keyring-fix/</guid><pubDate>Thu, 04 Jan 2024 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Issue:&lt;br /&gt;default Keyring&apos;s certificate is invalid, reason: expired.&lt;/p&gt;
&lt;p&gt;Fix:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;scope security
scope keyring default
set regenerate yes
set modulus mod2048
commit-buffer
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cisco UCS clear any errors which are not actually there</title><link>https://sajalchoudhary.net/til/cisco-ucs-clear-any-errors-which-are-not-actually-there/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cisco-ucs-clear-any-errors-which-are-not-actually-there/</guid><pubDate>Wed, 03 Jan 2024 21:42:00 GMT</pubDate><content:encoded>&lt;p&gt;Go to Service Profile &amp;gt; General &amp;gt; Recover Server &amp;gt; Reset CIMC (Server Controller)&lt;/p&gt;
&lt;p&gt;This does not affect the server and just verifies everything.&lt;br /&gt;This is useful when NIC might show down but actually no issues observed for the server.&lt;br /&gt;flogi-table might have missing entries.&lt;br /&gt;Happened after an infrastructure firmware upgrade.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows server unable to patch</title><link>https://sajalchoudhary.net/til/windows-server-unable-to-patch/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-server-unable-to-patch/</guid><pubDate>Tue, 02 Jan 2024 09:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Install servicing stack patch.&lt;/p&gt;
&lt;p&gt;For 2016: KB5023788&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://support.microsoft.com/en-us/topic/kb5023788-servicing-stack-update-for-windows-server-2016-march-14-2023-4c39b60e-f919-42c6-93af-7799f0b7f57c&quot;&gt;KB5023788: Servicing stack update for Windows Server 2016: March 14, 2023 - Microsoft Support&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Groups</title><link>https://sajalchoudhary.net/til/entra-id-groups/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-groups/</guid><pubDate>Sun, 24 Dec 2023 19:45:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;[[202401072024 Entra ID roles]] can be assigned&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;security &lt;/li&gt;
&lt;li&gt;Microsoft 365 groups&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;When adding members&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;assigned (manual)&lt;/li&gt;
&lt;li&gt;Dynamic users&lt;/li&gt;
&lt;li&gt;Dynamic devices (only security groups)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Dynamic groups&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;user or device&lt;/li&gt;
&lt;li&gt;Dynamic groups require at least P1 license.&lt;/li&gt;
&lt;li&gt;Members are added based on rules.&lt;/li&gt;
&lt;li&gt;Members can&apos;t be changed.&lt;/li&gt;
&lt;li&gt;Group can be changed to normal after creation.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID Managed Identities</title><link>https://sajalchoudhary.net/til/entra-id-managed-identities/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-managed-identities/</guid><pubDate>Sat, 23 Dec 2023 11:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Provides identity for a resource which is hosted on [[202312231415 Azure Master|&quot;Azure&quot;]], when compared against [[202312231440 Azure Entra ID App Identity]] which can be used for both on-prem and azure.&lt;br /&gt;Authentication is managed by [[202312231415 Azure Master|&quot;Azure&quot;]].&lt;/p&gt;
&lt;p&gt;Two types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System-Assigned: for a single resource, as long as it is in use. If resource is deleted, identity is gone.&lt;/li&gt;
&lt;li&gt;user-assigned: can be shared between different resources. created by you. Deleting the resource does not delete the identity. one UAMI can be added to multiple resources. Also one resource can have many UAMI.&lt;ul&gt;
&lt;li&gt;Example - farm of web servers can have on UAMI. Give permission to this UAMI once and it will have permission for all resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Benefits&lt;/h1&gt;
&lt;p&gt;Here are some of the benefits of using managed identities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You don&apos;t need to manage credentials. Credentials aren’t even accessible to you.&lt;/li&gt;
&lt;li&gt;You can use [[202312231441 Entra ID Managed Identities|Managed Identity]] to authenticate to any resource that supports &lt;a href=&quot;https://learn.microsoft.com/en-in/entra/identity/authentication/overview-authentication&quot;&gt;Microsoft Entra authentication&lt;/a&gt;, including your own applications.&lt;/li&gt;
&lt;li&gt;Managed identities can be used at no extra cost.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Why?&lt;/h1&gt;
&lt;p&gt;Resource hosted in [[202312231415 Azure Master|&quot;Azure&quot;]] needs to talk to other stuff in [[202312231415 Azure Master|&quot;Azure&quot;]]. Application needs identity to have roles applied to itself so that it can access other resources. &lt;/p&gt;
&lt;h2&gt;Traditionally&lt;/h2&gt;
&lt;p&gt;When we do app registration, it creates a service principal for it in the same tenant. Once SP is there it can use secret, cert-based, etc to authenticate. Challenge is how to store it, etc.&lt;/p&gt;
&lt;h2&gt;Managed Identity&lt;/h2&gt;
&lt;p&gt;We can add a [[202312231441 Entra ID Managed Identities|Managed Identity]] for an app. There is no secret, nothing that I have to worry about storing. [[202312231441 Entra ID Managed Identities|MI]] can only exist in the tenant it is created.  &lt;/p&gt;
&lt;h3&gt;How is [[202312231441 Entra ID Managed Identities|MI]] managed&lt;/h3&gt;
&lt;p&gt;Managed Identity Resource Provider manages [[202312231441 Entra ID Managed Identities|MI]]. MIRP issues the cert and rolls the cert.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If a resource has System assigned [[202312231441 Entra ID Managed Identities|MI]] it will always use it to authenticate&lt;/li&gt;
&lt;li&gt;If a resource has no SA-MI but only 1 UA-MI it will use that UA-MI to authenticate&lt;/li&gt;
&lt;li&gt;If a resource has no SA-MI but multiple UA-MI, we need to specify which one it will use to authenticate&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;How resource gets token&lt;/h3&gt;
&lt;p&gt;For a VM,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;VM talks to Instance Meta Data Service, I need a token.&lt;/li&gt;
&lt;li&gt;IMDS talks to MIRP&lt;/li&gt;
&lt;li&gt;MIRP gives SP + Cert for the [[202312231441 Entra ID Managed Identities|MI]]&lt;/li&gt;
&lt;li&gt;IMDS goes to AAD, and asks for token.&lt;/li&gt;
&lt;li&gt;[[202404011327 Entra ID|AAD]] creates access token and sends it back to IMDS, which gives it to resource&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Other services have similar methods. &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=rC1TV0_sIrM&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=10&quot;&gt;https://www.youtube.com/watch?v=rC1TV0_sIrM&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=10&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/entra/identity/managed-identities-azure-resources/overview&quot;&gt;MI overview&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/entra/identity/managed-identities-azure-resources/managed-identities-status&quot;&gt;Services that use MI&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/entra/identity/managed-identities-azure-resources/how-managed-identities-work-vm&quot;&gt;How MI works&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/entra/identity/managed-identities-azure-resources/how-to-use-vm-token&quot;&gt;How to use MI token&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Entra ID App Identity</title><link>https://sajalchoudhary.net/til/azure-entra-id-app-identity/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-entra-id-app-identity/</guid><pubDate>Sat, 23 Dec 2023 11:40:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra ID editions</title><link>https://sajalchoudhary.net/til/entra-id-editions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-id-editions/</guid><pubDate>Sat, 23 Dec 2023 11:37:00 GMT</pubDate><content:encoded>&lt;p&gt;Four editions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Free (upto 500,000 directory objects, rest all are unlimited)&lt;/li&gt;
&lt;li&gt;Microsoft 365 apps&lt;/li&gt;
&lt;li&gt;Premium P1&lt;/li&gt;
&lt;li&gt;Premium P2&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;P1 and P2 are enterprise focused. P2 has things like PIM and JIT access.&lt;br /&gt;License is set on per user basis. Directly assigned or assigned via groups.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Microsoft Entra</title><link>https://sajalchoudhary.net/til/microsoft-entra/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/microsoft-entra/</guid><pubDate>Sat, 23 Dec 2023 11:20:00 GMT</pubDate><content:encoded>&lt;p&gt;Entra is the overall umbrella for identity and access solution in [[202312231415 Azure Master|&quot;azure&quot;]].&lt;/p&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;[[202404011327 Entra ID]]&lt;br /&gt;[[202408281918 Entra ID tenant]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202408281922 Add custom domain to Entra ID|How to add a custom domain to Entra ID tenant]]&lt;br /&gt;[[202406151743 Difference between Entra ID and ADDS]]&lt;br /&gt;[[202312231437 Entra ID editions]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Concepts&lt;/h1&gt;
&lt;p&gt;[[202404011414 Authentication and Authorization]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202404011532 Entra MFA]]&lt;br /&gt;[[202404011343 Entra ID objects]]&lt;/li&gt;
&lt;li&gt;[[202408281930 How to assign licenses in Entra|How to assign licenses in Entra]]&lt;br /&gt;[[202401082057 Entra External IDs]]&lt;br /&gt;[[202401061515 Entra ID Administrative Units]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Roles&lt;/h1&gt;
&lt;p&gt;[[202401072001 Entra ID Roles]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202401072111 Entra ID custom roles]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Sync&lt;/h1&gt;
&lt;p&gt;[[202208041136 Entra Connect sync]]&lt;/p&gt;
&lt;h1&gt;Misc&lt;/h1&gt;
&lt;h1&gt;Governance&lt;/h1&gt;
&lt;p&gt;[[202401101559 Entra ID Governance]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202401102057 Entra ID Entitlement Management]] &lt;/li&gt;
&lt;li&gt;[[202401121503 Entra Privileged Identity Management]]&lt;/li&gt;
&lt;li&gt;[[202401121518 Entra Access Reviews]]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[[202404011557 Conditional Access]]&lt;br /&gt;[[202405021835 Entra Self Service Password Reset]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=6Vm-h_3nKjc&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=8&quot;&gt;John Savill course&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure Master</title><link>https://sajalchoudhary.net/til/azure-master/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-master/</guid><pubDate>Sat, 23 Dec 2023 11:15:00 GMT</pubDate><content:encoded>&lt;h1&gt;Fundamentals&lt;/h1&gt;
&lt;p&gt;[[202207262308 Cloud Computing Fundamentals]]&lt;br /&gt;[[202406151100 How to interact with Azure]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202408141906 How to do a deployment in azure]]&lt;br /&gt;[[202404061212 Azure Resources]]&lt;/li&gt;
&lt;li&gt;[[202405011242 ARM template|ARM JSON]]&lt;/li&gt;
&lt;li&gt;[[202406151219 ARM Bicep|Bicep]]&lt;br /&gt;[[202407162120 Types of operations in Azure|Types of operations in Azure]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Identity&lt;/h1&gt;
&lt;p&gt;[[202404011245 Why is identity needed]]&lt;br /&gt;[[202404011258 Decentralised identities]]&lt;br /&gt;[[202312231420 Microsoft Entra]]&lt;/p&gt;
&lt;h1&gt;Governance&lt;/h1&gt;
&lt;p&gt;[[202404051739 Governance Overview]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202404061356 Azure Policy]]&lt;/li&gt;
&lt;li&gt;[[202404061249 Azure RBAC]]&lt;ul&gt;
&lt;li&gt;[[202404061316 Azure Roles]]&lt;/li&gt;
&lt;li&gt;[[202401072038 Azure RBAC custom roles]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;[[202404061425 Azure Cost Management]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Constructs/Hierarchy&lt;/h2&gt;
&lt;p&gt;[[202404051803 Management groups]]&lt;br /&gt;[[202401101441 Azure subscriptions]]&lt;br /&gt;[[202404051818 Resource Groups]]&lt;br /&gt;[[202404061212 Azure Resources|Azure resource]]&lt;/p&gt;
&lt;h2&gt;Other things&lt;/h2&gt;
&lt;p&gt;[[202404061323 Azure ABAC]]&lt;br /&gt;[[202404061451 Azure Naming]]&lt;br /&gt;[[202404061455 Azure Tagging]]&lt;br /&gt;[[202409021326 Azure Resource Lock]]&lt;/p&gt;
&lt;h1&gt;Resiliency&lt;/h1&gt;
&lt;p&gt;[[202404071304 Resiliency Overview]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202404071441 Replication]]&lt;/li&gt;
&lt;li&gt;[[202408041224 Azure Monitoring|Azure Monitoring]]&lt;/li&gt;
&lt;li&gt;[[202404071559 Azure Backup|Azure backup]]&lt;br /&gt;[[202404071420 Azure resiliency concepts]]&lt;br /&gt;[[202404071451 How do Azure resources use resiliency]]&lt;br /&gt;[[202404081830 Azure Availability Zones]]&lt;br /&gt;[[202404071518 Multi-region deployments]]&lt;br /&gt;[[202404071545 Preference for replications]]&lt;br /&gt;[[202404071543 VM replications]]&lt;br /&gt;[[202404071556 Disaster Recovery]]&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/reliability/availability-zones-service-support#azure-services-with-availability-zone-support&quot;&gt;MSFT AZ services&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-support-resources&quot;&gt;Move Azure resources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Storage&lt;/h1&gt;
&lt;p&gt;[[202404091847 Azure Storage Overview]]&lt;br /&gt;[[202404091859 Azure Storage Account]]&lt;br /&gt;[[202404091908 Azure Storage Redundancy]]&lt;br /&gt;[[202404121117 Azure Storage Services]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202406291221 Azure Files|Azure Files]]&lt;ul&gt;
&lt;li&gt;[[202404121239 Azure File Sync|Azure File Sync]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;[[202404121149 Azure Data Lake]]&lt;/li&gt;
&lt;li&gt;[[202404121246 Azure Netapp Files]]&lt;/li&gt;
&lt;li&gt;[[202404121254 Azure Managed Disks]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Networking&lt;/h1&gt;
&lt;p&gt;[[202407281223 Azure Networking Basics]]&lt;br /&gt;[[202404121703 Azure VNet]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202407141408 Create VNet in Azure|Create VNet in Azure]]&lt;/li&gt;
&lt;li&gt;[[202407271143 Public IP address allows inbound access based on tier in Azure|Public IP Address]]&lt;/li&gt;
&lt;li&gt;[[202407281228 Azure Private IP Address|Azure Private IP Address]]&lt;br /&gt;[[202404121727 Azure VM NIC]]&lt;br /&gt;[[202404141450 Azure DNS]]&lt;br /&gt;[[202404131219 External Access]]&lt;/li&gt;
&lt;li&gt;[[202407271319 Azure Load Balancer]]&lt;/li&gt;
&lt;li&gt;[[202407271353 Azure Application Gateway]]&lt;br /&gt;[[202404131313 Connecting virtual networks]]&lt;/li&gt;
&lt;li&gt;[[202407151908 VNet Peering|VNet Peering]]&lt;/li&gt;
&lt;li&gt;[[202407281401 User defined routing|User defined routing]]&lt;br /&gt;[[202404131337 Connecting to Onprem]]&lt;/li&gt;
&lt;li&gt;[[202404141339 Azure ExpressRoute|Express Route]]&lt;/li&gt;
&lt;li&gt;[[202407151913 Azure VPN|Azure VPN]]&lt;ul&gt;
&lt;li&gt;[[202408241251 How to create S2S VPN|S2S VPN]]&lt;/li&gt;
&lt;li&gt;[[202408241255 How to create P2S VPN|P2S VPN]]&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Network Security&lt;/h2&gt;
&lt;p&gt;[[202404141404 Control traffic flows]] via [[202404141413 Azure Firewall|Azure Firewall]] or [[202404141419 Network Security Groups|NSG]]/[[202407141403 Application Security Groups|ASG]]&lt;br /&gt;[[202404141431 Azure Virtual WAN]]&lt;br /&gt;[[202404141435 Azure Service Endpoints and Service Endpoint Policies]]&lt;br /&gt;[[202404141442 Azure Private Link]]&lt;/p&gt;
&lt;h1&gt;VMs and VMSS&lt;/h1&gt;
&lt;p&gt;[[202404161835 Azure VM Basics]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202404161906 How do we think about VM sizes or types on Azure]]&lt;/li&gt;
&lt;li&gt;[[202404171828 Azure Spot can help reduce prices for Azure VMs|Azure Spot can help reduce prices for Azure VMs]]&lt;/li&gt;
&lt;li&gt;[[202407121745 Azure custom script extension]]&lt;/li&gt;
&lt;li&gt;[[202404181846 Azure VM scale sets]]&lt;br /&gt;[[202404181829 Azure Compute Gallery]]&lt;br /&gt;[[202404181844 Use Azure VMware solution if an org wants to move to cloud quickly]]&lt;br /&gt;[[202408281650 Azure Bastion|Azure Bastion]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;App services&lt;/h1&gt;
&lt;p&gt;[[202404191840 Containers]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202404201203 Azure Container Instance|Azure Container Instance]]&lt;br /&gt;[[202404201210 Azure Kubernetes Service]]&lt;/li&gt;
&lt;li&gt;[[202404201348 Azure Container Apps|Azure Container Apps]]&lt;br /&gt;[[202404201400 Azure App service]]&lt;br /&gt;[[202404201427 Azure Functions]]&lt;br /&gt;[[202404201438 Azure Logic Apps]]&lt;br /&gt;[[202404201440 Azure Static Web App]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Database and AI&lt;/h1&gt;
&lt;p&gt;[[202404091845 Types of data]]&lt;br /&gt;[[202404271358 Type of Databases]]&lt;br /&gt;[[202404271407 Types of data related roles]]&lt;br /&gt;[[202404261946 Data flow]]&lt;/p&gt;
&lt;h2&gt;OLTP (Online Transactional Processing)&lt;/h2&gt;
&lt;p&gt;[[202404231933 Azure SQL]]&lt;br /&gt;[[202404241715 Azure Open source DB]]&lt;br /&gt;[[202404261904 Azure Cosmos DB]]&lt;/p&gt;
&lt;h2&gt;Analytical Processing&lt;/h2&gt;
&lt;p&gt;[[202404261931 Azure Data warehouse and analytics]]&lt;/p&gt;
&lt;h1&gt;Backups&lt;/h1&gt;
&lt;p&gt;[[202404071559 Azure Backup]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202408021823 Create backup for VMs|How to backup azure vm]]&lt;br /&gt;[[202408011914 Azure Backup Access Tiers|Azure Backup Access Tiers]]&lt;br /&gt;[[202408011900 What resources can we backup using Azure Backup|What can we backup using Azure Backup]]&lt;br /&gt;[[202408131927 Azure restore from backup|Restore from backups]]&lt;/li&gt;
&lt;li&gt;[[202408131929 Restore VM from Azure backup|Restore VM from Azure backup]]&lt;/li&gt;
&lt;li&gt;[[202408131919 Restore files from Azure backup|Restore files from Azure backup]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Monitoring and Security&lt;/h1&gt;
&lt;p&gt;[[202404281601 Azure monitoring old]]&lt;br /&gt;[[202408041224 Azure Monitoring|Azure Monitoring]]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[202408041409 Types of monitoring data in Azure|Types of monitoring data in Azure]]&lt;br /&gt;[[202408070754 Azure Log Analytics]]&lt;br /&gt;[[202408080800 Azure Network Watcher]]&lt;br /&gt;[[202408111224 Azure Monitor Alerts]]&lt;/li&gt;
&lt;li&gt;[[202408111240 Create an Azure metric alert|Azure metric alert]]&lt;/li&gt;
&lt;li&gt;[[202408111249 Create a log alert in Azure|Log alerts]]&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;IaC and Devops&lt;/h1&gt;
&lt;p&gt;[[202406151100 How to interact with Azure]]&lt;br /&gt;[[202405011242 ARM template]]&lt;br /&gt;[[202406151219 ARM Bicep]]&lt;br /&gt;	[[202407191832 Bicep Modules]]
	&lt;/p&gt;
&lt;h1&gt;Architecture&lt;/h1&gt;
&lt;p&gt;[[202406081205 Well Architected Framework|Azure Well Architected Framework]]&lt;br /&gt;[[202406011159 Five pillars of Azure well architected framework|Five pillars of Azure well architected framework]]&lt;/p&gt;
&lt;h1&gt;Key Documents&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/architecture/&quot;&gt;Azure Architecture Centre&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/cloud-adoption-framework/ready/landing-zone/&quot;&gt;Azure Landing Zone&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/governance/&quot;&gt;Azure Governance&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/cloud-adoption-framework/&quot;&gt;Cloud Adoption Framework&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-in/azure/well-architected/&quot;&gt;Well-architected Framework&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/credentials/browse/?credential_types=applied%20skills&quot;&gt;Applied Skills&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits&quot;&gt;Azure Resource Limits&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Learn&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://youtube.com/playlist?list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;si=vZ8yUR3PKD8oBv9Z&quot;&gt;John&apos;s Az 104 learning path&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;To do&lt;/h1&gt;
&lt;p&gt;Azcopy&lt;br /&gt;Storage explorer&lt;br /&gt;Recovery services vault &lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&quot;&gt;John&apos;s AZ-104&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS Port Licensing related</title><link>https://sajalchoudhary.net/til/ucs-port-licensing-related/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-port-licensing-related/</guid><pubDate>Thu, 14 Dec 2023 11:39:00 GMT</pubDate><content:encoded>&lt;h2&gt;Check how many ports are licensed&lt;/h2&gt;
&lt;p&gt;For FI each model comes with certain number of ports activated by default, others need to be purchased separately.&lt;/p&gt;
&lt;p&gt;Default for 6332-16UP is&lt;br /&gt;10G - 8&lt;br /&gt;40G - 4&lt;/p&gt;
&lt;p&gt;Go to Admin &amp;gt; License Management &amp;gt; &lt;/p&gt;
&lt;p&gt;Select FI &amp;gt; General Tab&lt;/p&gt;
&lt;p&gt;Select the License,&lt;br /&gt;scroll down&lt;br /&gt;it should show Total Quantity, Used Quantity&lt;/p&gt;
&lt;h2&gt;To check how many license are there&lt;/h2&gt;
&lt;p&gt;Go to Cisco Software Central &amp;gt; &lt;a href=&quot;https://software.cisco.com/software/swift/lrp/#/pak&quot;&gt;https://software.cisco.com/software/swift/lrp/#/pak&lt;/a&gt;&lt;br /&gt;Traditional licenses &amp;gt; Access LRP&lt;br /&gt;PAKs or Token &amp;gt; Show Filter&lt;br /&gt;Under Order Number put Cisco SO. It will show available license&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remove for recursive objects in AD fails</title><link>https://sajalchoudhary.net/til/remove-for-recursive-objects-in-ad-fails/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remove-for-recursive-objects-in-ad-fails/</guid><pubDate>Thu, 07 Dec 2023 12:15:00 GMT</pubDate><content:encoded>&lt;p&gt;Issue is because of additional child-objects for an object : user or computer&lt;/p&gt;
&lt;p&gt;For user it can be devices etc.&lt;br /&gt;Object class: msExchActiveSyncDevices, for example&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;## Remove fails with - The directory service can perform the requested operation only on a leaf object

## Below to get the list of all objects
Get-ADObject -SearchBase $DN -Filter *

## Remove-ADObject with -recusrsive to delete
Get-ADObject -SearchBase $DN -Filter * | Remove-ADObject -Recursive -ErrorAction Stop
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ad</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>openssl read csr</title><link>https://sajalchoudhary.net/til/openssl-read-csr/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openssl-read-csr/</guid><pubDate>Tue, 05 Dec 2023 08:26:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;openssl req -text -noout -verify -in CSR.csr
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCSM firmware upgrade</title><link>https://sajalchoudhary.net/til/ucsm-firmware-upgrade/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucsm-firmware-upgrade/</guid><pubDate>Wed, 15 Nov 2023 12:34:00 GMT</pubDate><content:encoded>&lt;h1&gt;Firmware Image Management&lt;/h1&gt;
&lt;p&gt;Cisco delivers firmware updates to UCS in bundles.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Infrastructure bundle (A)&lt;/li&gt;
&lt;li&gt;B-series bundle&lt;/li&gt;
&lt;li&gt;C-series bundle&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Infrastructure bundle&lt;/h2&gt;
&lt;p&gt;This includes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;UCSM software&lt;/li&gt;
&lt;li&gt;Kernel and system firmware for FI&lt;/li&gt;
&lt;li&gt;I/O module firmware&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;B-series bundle&lt;/h2&gt;
&lt;p&gt;This includes&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;CIMC firmware&lt;/li&gt;
&lt;li&gt;BIOS firmware&lt;/li&gt;
&lt;li&gt;Adapter firmware&lt;/li&gt;
&lt;li&gt;Board controller firmware&lt;/li&gt;
&lt;li&gt;Third-party firmware images required by the new server&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;4 things need to be checked:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hardware and OS compatibility&lt;/li&gt;
&lt;li&gt;Cross-version firmware support&lt;/li&gt;
&lt;li&gt;Upgrade path&lt;/li&gt;
&lt;li&gt;Any open caveats in the release&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Hardware and OS compatibility&lt;/h2&gt;
&lt;p&gt;You can search on &lt;a href=&quot;https://ucshcltool.cloudapps.cisco.com/public/&quot;&gt;Cisco UCS Hardware Compatibility List&lt;/a&gt; using either option: servers / os /products.&lt;br /&gt;You can go to products and search by the vic card we have for example.&lt;/p&gt;
&lt;h2&gt;Cross-Version Firmware Support&lt;/h2&gt;
&lt;p&gt;Table 11 on &lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/release/notes/cisco-ucs-manager-rn-4-2.html#Cisco_Reference.dita_c4bfdd61-9589-44a8-8610-9d66c95b34a0&quot;&gt;Release Notes for Cisco UCS Manager, Release 4.2 - Cisco&lt;/a&gt; page for the particular version has details. which infra bundle (A) supports which host version (B or C). Look for your F5 device in the cross-section. If it is listed there then support is there.&lt;/p&gt;
&lt;h2&gt;Upgrade path&lt;/h2&gt;
&lt;p&gt;Table 5 on the release page has those details.&lt;/p&gt;
&lt;h2&gt;Open caveats&lt;/h2&gt;
&lt;p&gt;Any issues identified in the target release version.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/Firmware-Mgmt/4-2/b_UCSM_GUI_Firmware_Management_Guide_4-2/b_UCSM_GUI_Firmware_Management_Guide_chapter_011.html#topic_F1A2EBE8F31243F3AFFD79FA5CB5E7C2&quot;&gt;Cisco UCS Manager Firmware Management Guide, Release 4.2 - Manage Firmware through Cisco UCS Manager [Cisco UCS Manager] - Cisco&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://software.cisco.com/download/home/283853163/type/283655681/release/4.2(3e)&quot;&gt;Software Download - Cisco Systems&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://software.cisco.com/download/home/283612660/type/283655658/release/4.2(3g)&quot;&gt;https://software.cisco.com/download/home/283612660/type/283655658/release/4.2(3g)&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;a href=&quot;https://ucshcltool.cloudapps.cisco.com/public/&quot;&gt;https://ucshcltool.cloudapps.cisco.com/public/&lt;/a&gt;&lt;/strong&gt;&lt;a href=&quot;https://software.cisco.com/download/home/283853163/type/283655681/release/4.2(3e)&quot;&gt;https://software.cisco.com/download/home/283853163/type/283655681/release/4.2(3e)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.cisco.com/c/dam/en/us/td/docs/unified_computing/ucs/ucs-manager/UCSM-upgrade-downgrade-matrix/UCSM-Upgrade-path-Overview.htm&quot;&gt;Cisco UCS Manager Upgrade/Downgrade Support Matrix&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://www.cisco.com/c/dam/en/us/td/docs/unified_computing/ucs/ucs-manager/UCSM-upgrade-downgrade-matrix/index.html#cur=4.0(4n)&amp;amp;tar=4.2(3)&quot;&gt;Cisco UCS Manager Upgrade and Downgrade Support Tool&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ucs</category><category>cisco</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to check ldaps is working or not - ldp.exe</title><link>https://sajalchoudhary.net/til/how-to-check-ldaps-is-working-or-not---ldp.exe/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-check-ldaps-is-working-or-not---ldp.exe/</guid><pubDate>Mon, 06 Nov 2023 09:52:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Run ldp.exe&lt;/li&gt;
&lt;li&gt;Connect &amp;gt; &lt;ol&gt;
&lt;li&gt;give dc fqdn&lt;/li&gt;
&lt;li&gt;port = 636&lt;/li&gt;
&lt;li&gt;select ssl&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Bind &amp;gt;&lt;ol&gt;
&lt;li&gt;Give user details&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;If connect is OK, then things are OK.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.torivar.com/2016/04/08/which-certificate-is-my-domain-controller-using-for-ldaps/&quot;&gt;Which Certificate is my Domain Controller using for LDAPS? - Mostly Technical (torivar.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows delete shadow copies</title><link>https://sajalchoudhary.net/til/windows-delete-shadow-copies/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-delete-shadow-copies/</guid><pubDate>Fri, 03 Nov 2023 09:19:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
##  List
vssadmin list shadows

### List with powershell
Get-WmiObject Win32_Shadowcopy

## Delete with powershell
Get-WmiObject Win32_Shadowcopy |  ForEach-Object {$_.Delete();}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.picussecurity.com/resource/blog/technique-to-delete-volume-shadow-copies-deviceiocontrol&quot;&gt;An Underrated Technique to Delete Volume Shadow Copies - DeviceIoControl (picussecurity.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>On Vmware tools</title><link>https://sajalchoudhary.net/til/on-vmware-tools/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/on-vmware-tools/</guid><pubDate>Fri, 03 Nov 2023 07:25:00 GMT</pubDate><content:encoded>&lt;p&gt;VMware tools check happens with respect to the Host. Each ESXi host has a storage location for VM Tools installers, which is a configurable option and visibly referenced by the /productLocker symlink. The target can be either local to each host or point to a centralized repository of VM Tools on a shared datastore.&lt;br /&gt;One possible solution is to add a shared storage as the location for the VMware tools version for all the hosts.&lt;/p&gt;
&lt;h2&gt;Type of VMware tools&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Tools ISO for supported OS&lt;/li&gt;
&lt;li&gt;For linux: Operating System Specific Packages, or OSPs (Not managed by vSphere)&lt;/li&gt;
&lt;li&gt;For Linux: Open VM Tools (OVTs) (Not managed by vSphere)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Upgrading VMware tools&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Automatic update on VM boot&lt;/li&gt;
&lt;li&gt;Through vSphere UI&lt;/li&gt;
&lt;li&gt;VMware update manager&lt;/li&gt;
&lt;li&gt;In guest update - control to server owners&lt;/li&gt;
&lt;li&gt;Mass updates through powerCLI&lt;/li&gt;
&lt;li&gt;Native Linux package management processes&lt;/li&gt;
&lt;li&gt;API&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;List of VMware tools&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/86165&quot;&gt;Build numbers and versions of VMware Tools (86165)&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Deploying through SCCM&lt;/h2&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2015/09/vmware-tools-lifecycle-why-tools-can-drive-you-crazy-and-how-to-avoid-it.html&quot;&gt;VMware Tools Lifecycle: Why Tools Can Drive You Crazy (and How to Avoid it!) - VMware vSphere Blog&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2016/02/understanding-the-three-types-of-vm-tools.html&quot;&gt;Understanding the Three Types of VM Tools - VMware vSphere Blog&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2004754&quot;&gt;Installing and upgrading VMware Tools in vSphere (2004754)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2016/03/six-methods-for-keeping-vm-tools-up-to-date.html&quot;&gt;Six Methods for Keeping VM Tools Up to Date – VMware vSphere Blog&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Security guidelines</title><link>https://sajalchoudhary.net/til/security-guidelines/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/security-guidelines/</guid><pubDate>Mon, 30 Oct 2023 07:52:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-gb/archive/blogs/secguide/security-baseline-final-for-windows-10-v1903-and-windows-server-v1903&quot;&gt;Security baseline (FINAL) for Windows 10 v1903 and Windows Server v1903 | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware MOB reference</title><link>https://sajalchoudhary.net/til/vmware-mob-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-mob-reference/</guid><pubDate>Fri, 27 Oct 2023 08:45:00 GMT</pubDate><content:encoded>&lt;p&gt;Access the url&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://hostname.yourcompany.com/mob
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Enable MOB on ESXi&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Select the host in the vSphere Client and go to Advanced System Settings.&lt;/li&gt;
&lt;li&gt;Find Config.HostAgent.plugins.solo.enableMob and enable the MOB&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;How to access stuff&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Click on the content property.&lt;/li&gt;
&lt;li&gt;Under the &lt;em&gt;Name&lt;/em&gt; column, locate &lt;em&gt;rootFolder&lt;/em&gt; and click its corresponding value, this being a &lt;em&gt;Data Center Folder&lt;/em&gt; object.&lt;/li&gt;
&lt;li&gt;Under root &amp;gt; datacenter&lt;/li&gt;
&lt;li&gt;Under datacenter &amp;gt; hostfolder&lt;/li&gt;
&lt;li&gt;Under hostfolder &amp;gt; childEntity (Select appropriate cluster)\&lt;/li&gt;
&lt;li&gt;Under that find host (select appropriate host)&lt;/li&gt;
&lt;li&gt;Under that storage&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;For storage&lt;/h3&gt;
&lt;p&gt;content --&amp;gt; rootFolder --&amp;gt; childEntity --&amp;gt; hostFolder --&amp;gt; childEntity --&amp;gt;  host --&amp;gt; config  --&amp;gt; HostStorageDeviceInfo --&amp;gt; Select appropriate lun&lt;/p&gt;
&lt;p&gt;Host -&amp;gt; config -&amp;gt; storageDevice -&amp;gt; scsiLun [selected interested lun from list] -&amp;gt; standardInquiry&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://vdc-repo.vmware.com/vmwb-repository/dcr-public/f1c3b41b-ead5-4d47-aca4-33298d5a4fcf/778a00f3-a9b6-42f4-8f22-7216733f5f03/doc/PG_Appx_Using_MOB.20.2.html&quot;&gt;Using the MOB to Explore the Object Model (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://www.altaro.com/vmware/exploring-the-vsphere-api-with-managed-object-browser/&quot;&gt;Exploring the vSphere API with Managed Object Browser (altaro.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware powercli reference</title><link>https://sajalchoudhary.net/til/vmware-powercli-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-powercli-reference/</guid><pubDate>Tue, 24 Oct 2023 13:46:00 GMT</pubDate><content:encoded>&lt;h1&gt;Get-VM filters&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;## To get only non linux vms
$Cluster | Get-VM | Where-Object { $_.Guest.OSFullName -notlike &quot;*Linux*&quot; }
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Update and refresh a manifest</title><link>https://sajalchoudhary.net/til/update-and-refresh-a-manifest/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/update-and-refresh-a-manifest/</guid><pubDate>Tue, 24 Oct 2023 08:19:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&quot;https://access.redhat.com/&quot;&gt;Red Hat Customer Portal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click on Subscriptions&lt;/li&gt;
&lt;li&gt;Go to Subcription Allocations&lt;/li&gt;
&lt;li&gt;Edit as needed.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/how-create-and-use-red-hat-satellite-manifest&quot;&gt;How to create and use a Red Hat Satellite manifest&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://access.redhat.com/solutions/3410771&quot;&gt;How to create and upload or update and refresh a manifest to the Red Hat Satellite 6 server? - Red Hat Customer Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><category>redhat</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>svchost troubleshooting</title><link>https://sajalchoudhary.net/til/svchost-troubleshooting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/svchost-troubleshooting/</guid><pubDate>Thu, 19 Oct 2023 15:18:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/ask-the-performance-team/getting-started-with-svchost-exe-troubleshooting/ba-p/372644&quot;&gt;Getting Started with SVCHOST.EXE Troubleshooting - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows host file</title><link>https://sajalchoudhary.net/til/windows-host-file/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-host-file/</guid><pubDate>Mon, 18 Sep 2023 11:32:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;c:\Windows\System32\Drivers\etc\hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell second hop problem</title><link>https://sajalchoudhary.net/til/powershell-second-hop-problem/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-second-hop-problem/</guid><pubDate>Mon, 18 Sep 2023 10:18:00 GMT</pubDate><content:encoded>&lt;p&gt;To fix issue&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add fi server entry in etc/hosts so that resolution works&lt;/li&gt;
&lt;li&gt;Two policies need to be enabled Local Computer Policy -&amp;gt; Computer Configuration -&amp;gt; Administrative Templates -&amp;gt; System -&amp;gt; Credentials Delegation. This cannot be with IP address: &lt;ol&gt;
&lt;li&gt;Enable Allow delegating fresh credentials and set value&lt;/li&gt;
&lt;li&gt;Enable Allow delegating fresh credentials with NTLM-only server authentication and set value&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/scripting/learn/remoting/ps-remoting-second-hop?view=powershell-5.1&quot;&gt;Making the second hop in PowerShell Remoting - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>winrm</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows cluster troubleshooting</title><link>https://sajalchoudhary.net/til/windows-cluster-troubleshooting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-troubleshooting/</guid><pubDate>Wed, 13 Sep 2023 09:26:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-ClusterLog

## with timespan for last 5 mins
Get-ClusterLog -Timespan 530

## Use local server time
Get-ClusterLog -Destination C:\Users\A714359\Desktop\ -TimeSpan 30 -UseLocalTime
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Log location&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;C:\Windows\Cluster\Reports
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Cluster hive&lt;/h1&gt;
&lt;p&gt;Located under HKLM &amp;gt; Cluster or 0.Cluster (loaded on node which has quorum disk)&lt;/p&gt;
&lt;h2&gt;Computer object guid&lt;/h2&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-clusterlog?view=windowsserver2022-ps&quot;&gt;Get-ClusterLog (FailoverClusters) | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.workinghardinit.work/2016/03/29/the-cluster-and-0-cluster-registry-hives/&quot;&gt;The Cluster and 0.Cluster Registry Hives - Working Hard In ITWorking Hard In IT&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cluster</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell check empty string</title><link>https://sajalchoudhary.net/til/powershell-check-empty-string/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-check-empty-string/</guid><pubDate>Tue, 12 Sep 2023 16:57:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# Use the IsNullOrEmpty/IsNullOrWhiteSpace string method
[string]::IsNullOrEmpty(...)
[string]::IsNullOrWhiteSpace(...)

## Example to check string
if ([string]::IsNullOrWhiteSpace($User))
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Remove leading and trailing space&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
# Use the .Trim() method
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/13738634/how-can-i-check-if-a-string-is-null-or-empty-in-powershell&quot;&gt;.net - How can I check if a string is null or empty in PowerShell? - Stack Overflow&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://devblogs.microsoft.com/scripting/powertip-remove-leading-and-trailing-spaces-with-powershell/&quot;&gt;PowerTip: Remove Leading and Trailing Spaces with PowerShell - Scripting Blog (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AD Connect Get current Configuration</title><link>https://sajalchoudhary.net/til/azure-ad-connect-get-current-configuration/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-ad-connect-get-current-configuration/</guid><pubDate>Wed, 30 Aug 2023 17:38:00 GMT</pubDate><content:encoded>&lt;h2&gt;Option 1&lt;/h2&gt;
&lt;p&gt;Export configuration settings json.&lt;/p&gt;
&lt;h2&gt;Option 2&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Open Azure AD connect&lt;/li&gt;
&lt;li&gt;Click Configure&lt;/li&gt;
&lt;li&gt;Click Customize Synchronization Options. &lt;/li&gt;
&lt;li&gt;Provide credentials.&lt;/li&gt;
&lt;li&gt;Take screenshots&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;![[Pasted image 20230830204132.png]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/answers/questions/128527/how-to-check-azure-ad-connect-settings-for-attribu&quot;&gt;How to check Azure AD Connect settings for Attributes filtering - Microsoft Q&amp;amp;A&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware ESXi upgrade using ESXCLI</title><link>https://sajalchoudhary.net/til/vmware-esxi-upgrade-using-esxcli/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-esxi-upgrade-using-esxcli/</guid><pubDate>Tue, 29 Aug 2023 14:11:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
## Run this to get the name
esxcli software sources profile list -d /vmfs/volumes/datastore1/ESXi7-bundle/VMware-ESXi-7.0U2d-18538813-depot.zip

## Update name after -p
esxcli software profile update -p ESXi-7.0U2d-18538813-standard -d /vmfs/volumes/datastore1/ESXi7-bundle/VMware-ESXi-7.0U2d-18538813-depot.zip


Example:
esxcli software sources profile list -d /vmfs/volumes/5da0
ab35-50b8c2e8-de81-08f1eaf4b402/VMware-ESXi-7.0.3-21424296-HPE-703.0.0.11.3.0.5-Apr2023-depot\ \(1\).zip
Name                               Vendor                      Acceptance Level  Creation Time        Modification Time
---------------------------------  --------------------------  ----------------  -------------------  -----------------
HPE-Custom-AddOn_703.0.0.11.3.0-5  Hewlett Packard Enterprise  PartnerSupported  2023-03-24T05:15:11  2023-03-24T05:15:11

esxcli software profile update -p HPE-Custom-AddOn_703.0.0.11.3.0-5 -d /vmfs/volumes/5da0
ab35-50b8c2e8-de81-08f1eaf4b402/VMware-ESXi-7.0.3-21424296-HPE-703.0.0.11.3.0.5-Apr2023-depot\ \(1\).zip
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.esxi.upgrade.doc/GUID-E51C5DB6-F28E-42E8-ACA4-0EBDD11DF55D.html&quot;&gt;Upgrade or Update a Host with Image Profiles (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Automation Platform Upgrade</title><link>https://sajalchoudhary.net/til/ansible-automation-platform-upgrade/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-automation-platform-upgrade/</guid><pubDate>Tue, 29 Aug 2023 11:32:00 GMT</pubDate><content:encoded>&lt;p&gt;Upgrade assistant here: &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://access.redhat.com/labs/aapua/&quot;&gt;Ansible Automation Platform Upgrade Assistant | Red Hat Customer Portal Labs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Steps:&lt;/p&gt;
&lt;p&gt;The step to step guide is provided here please Follow this for upgrade from 2.3 to 2.4. &lt;a href=&quot;https://access.redhat.com/labs/aapua/&quot;&gt;https://access.redhat.com/labs/aapua/&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;is it fine will use same inventory file which was used at the time of installation&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;should we add the automation hub parameter in same inventory file as we installed separately&lt;br /&gt;--&amp;gt; You can add the data to the new Inventory file referring to the old and you can add the automation hub details as well if the database of Controller and the automation hub is same. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;any validation script/playbook is there to validate AAP platform before/after of upgrade&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;incase upgrade failed in that case how we can recover it back using AAP script/playbook.&lt;br /&gt;--&amp;gt; There is no validation scripts everything is taken care by the setup.sh script itself. if in case the upgrade fails you can always uninstall the AAP&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Step 1) How to uninstall Red Hat Ansible Controller(Ansible Automation Platform 2.x)?&lt;br /&gt;&lt;a href=&quot;https://access.redhat.com/solutions/6733721&quot;&gt;https://access.redhat.com/solutions/6733721&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Step 2 ) Re install the older version of AAP &lt;/p&gt;
&lt;p&gt;Step 3) Restore the database taken  before starting the upgrade mentioned: &lt;a href=&quot;https://access.redhat.com/labs/aapua/&quot;&gt;https://access.redhat.com/labs/aapua/&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;while upgrading AAP platform will be available/what will impact for end user.&lt;br /&gt;--&amp;gt; While doing the upgrade the services get&apos;s stopped so take a proper downtime before proceeding with the upgrade and also do the upgrade in the test environment first.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><category>aap</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure portal url list</title><link>https://sajalchoudhary.net/til/azure-portal-url-list/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-portal-url-list/</guid><pubDate>Tue, 29 Aug 2023 11:15:00 GMT</pubDate><content:encoded>&lt;p&gt;Refer to the link below.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-portal/azure-portal-safelist-urls?tabs=public-cloud&quot;&gt;Allow the Azure portal URLs on your firewall or proxy server - Azure portal | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware connecting through winscp gives ftp error</title><link>https://sajalchoudhary.net/til/vmware-connecting-through-winscp-gives-ftp-error/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-connecting-through-winscp-gives-ftp-error/</guid><pubDate>Wed, 09 Aug 2023 07:40:00 GMT</pubDate><content:encoded>&lt;p&gt;![[Pasted image 20230809104044.png]]&lt;/p&gt;
&lt;p&gt;Go to Advanced &amp;gt; SFTP&lt;/p&gt;
&lt;p&gt;Paste this:&lt;/p&gt;
&lt;p&gt;shell /usr/libexec/sftp-server&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://dailysysadmin.com/KB/Article/3875/vcenter-vcsa-received-too-large-sftp-packet-max-supported-packet-size-is-with-winscp/#google_vignette&quot;&gt;vCenter VCSA Received too large sftp packet max supported packet size is with WinSCP - DailySysAdmin | For all things IT!&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Vmware get list of rebooted servers by HA</title><link>https://sajalchoudhary.net/til/vmware-get-list-of-rebooted-servers-by-ha/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-get-list-of-rebooted-servers-by-ha/</guid><pubDate>Wed, 02 Aug 2023 07:20:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# Update the following

$VIServer = &quot;fieslpvcs01.fi.tcsecp.com&quot;  
$ClusterName = &quot;FIES-SQL-PROD-Trusted&quot;

Import-Module -Name VMware.PowerCLI  
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false  
Connect-VIServer -Server $VIServer  
$Cluster = Get-Cluster $ClusterName

$Events = $Cluster | Get-VM | Get-VIEvent | where {$_.FullFormattedMessage -match &quot;vSphere HA restarted virtual machine&quot;}

$Events | select ObjectName, CreatedTime

Disconnect-VIServer -Server $VIServer -Force -Confirm:$false
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell pass variables to Invoke-Command</title><link>https://sajalchoudhary.net/til/powershell-pass-variables-to-invoke-command/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-pass-variables-to-invoke-command/</guid><pubDate>Thu, 13 Jul 2023 13:54:00 GMT</pubDate><content:encoded>&lt;p&gt;Refer to local variable with $using&lt;/p&gt;
&lt;p&gt;Use the &apos;$using:&apos; scope&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$Using:variablename
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-7.2#scope-modifiers&quot;&gt;about Scopes - PowerShell | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://powershellexplained.com/2016-08-28-PowerShell-variables-to-remote-commands/&quot;&gt;PowerShell: Passing variables to remote commands (powershellexplained.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS FI modes</title><link>https://sajalchoudhary.net/til/ucs-fi-modes/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-fi-modes/</guid><pubDate>Mon, 10 Jul 2023 12:23:00 GMT</pubDate><content:encoded>&lt;h2&gt;Default : End host mode&lt;/h2&gt;
&lt;p&gt;Everything in ucs domain as a single thing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MAC learning on specific ports only&lt;ul&gt;
&lt;li&gt;Uplink ports (No MAC learning)&lt;/li&gt;
&lt;li&gt;Unconfigured - NO&lt;/li&gt;
&lt;li&gt;Server ports - Yes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;No spanning tree&lt;/li&gt;
&lt;li&gt;Server traffic is pinned&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS IOM pinning</title><link>https://sajalchoudhary.net/til/ucs-iom-pinning/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-iom-pinning/</guid><pubDate>Mon, 10 Jul 2023 09:54:00 GMT</pubDate><content:encoded>&lt;p&gt;Can be done in 1,2,4,8&lt;/p&gt;
&lt;h2&gt;Direct pinning to FI&lt;/h2&gt;
&lt;p&gt;If any link goes down, config shifts to lowest common denominator.&lt;/p&gt;
&lt;h2&gt;Pinning to port channel&lt;/h2&gt;
&lt;p&gt;If we lose one link, it will still be one connection to Port channel.&lt;/p&gt;
&lt;p&gt;![[Pasted image 20230710125701.png]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows how to tell if user group modification event is triggered due to group policy</title><link>https://sajalchoudhary.net/til/windows-how-to-tell-if-user-group-modification-event-is-triggered-due-to-group-policy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-how-to-tell-if-user-group-modification-event-is-triggered-due-to-group-policy/</guid><pubDate>Thu, 06 Jul 2023 11:51:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://serverfault.com/questions/1036063/how-can-i-tell-if-a-user-group-modification-event-is-triggered-due-to-group-poli&quot;&gt;windows - How can I tell if a user group modification event is triggered due to group policy instead of manual action? - Server Fault&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS manager</title><link>https://sajalchoudhary.net/til/ucs-manager/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-manager/</guid><pubDate>Fri, 30 Jun 2023 10:14:00 GMT</pubDate><content:encoded>&lt;p&gt;UCS manager runs on FI.&lt;br /&gt;For clustered FI, cluster IP is the UCS manager IP.&lt;/p&gt;
&lt;p&gt;Manages upto 20 chassis or 160 servers.&lt;/p&gt;
&lt;p&gt;Access &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;UI&lt;/li&gt;
&lt;li&gt;SSH &lt;ul&gt;
&lt;li&gt;R/O nxos&lt;/li&gt;
&lt;li&gt;Local mgmt&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;XML/API&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS IOM or Fabric Extenders</title><link>https://sajalchoudhary.net/til/ucs-iom-or-fabric-extenders/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-iom-or-fabric-extenders/</guid><pubDate>Fri, 30 Jun 2023 09:48:00 GMT</pubDate><content:encoded>&lt;p&gt;Fit on the left side of the chassis.&lt;br /&gt;IOM A and IOM B.&lt;/p&gt;
&lt;p&gt;IOM A goes to FIA.&lt;br /&gt;IOM B goes to FIB.&lt;/p&gt;
&lt;p&gt;This is how we communicate from chassis to FI.&lt;/p&gt;
&lt;p&gt;We have UCS 2304. (2nd number is the generation/ last 2 numbers are the no of ports)&lt;br /&gt;40gig interconnects&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS chassis</title><link>https://sajalchoudhary.net/til/ucs-chassis/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-chassis/</guid><pubDate>Fri, 30 Jun 2023 08:58:00 GMT</pubDate><content:encoded>&lt;p&gt;B-series: &lt;/p&gt;
&lt;p&gt;Chassis is where the servers go.&lt;br /&gt;Usually 8 servers. (half width)&lt;br /&gt;Or 4 large ones. (full width)&lt;/p&gt;
&lt;p&gt;Below the servers is the powersupply.&lt;/p&gt;
&lt;p&gt;Servers don&apos;t have ports. They connect to backchannel ports on the [[202306301248 UCS IOM or Fabric Extenders]] module.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS FI</title><link>https://sajalchoudhary.net/til/ucs-fi/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-fi/</guid><pubDate>Fri, 30 Jun 2023 08:52:00 GMT</pubDate><content:encoded>&lt;p&gt;Fabric Interconnects are like the brains.&lt;br /&gt;FIs should be in cluster.&lt;br /&gt;Cluster links between them. &lt;/p&gt;
&lt;p&gt;Now we have Unified Ports. &lt;/p&gt;
&lt;p&gt;We have Gen3. 40Gig&lt;br /&gt;UCS 6332 16UP. UP is unified ports.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;16 unified ports&lt;/li&gt;
&lt;li&gt;24 40-Gigabit Ethernet and Fibre Channel over Ethernet (FCoE)&lt;/li&gt;
&lt;li&gt;16 1- and 10-Gbps and FCoE or 4-,8-, and 16-Gbps Fibre Channel unified ports&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ports assigned in even.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows what are current control sets</title><link>https://sajalchoudhary.net/til/windows-what-are-current-control-sets/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-what-are-current-control-sets/</guid><pubDate>Thu, 29 Jun 2023 11:48:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;code&gt;CurrentControlSet&lt;/code&gt; is an alternating symbolic link to either &lt;code&gt;ControlSet001&lt;/code&gt; or &lt;code&gt;ControlSet002&lt;/code&gt;. The other key is kept as a backup for the Load Last Known Good Configuration boot option.&lt;/p&gt;
&lt;p&gt;current ControlSet number is set by Current under HKLM\System\Select.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/291519/how-does-currentcontrolset-differ-from-controlset001-and-controlset002&quot;&gt;windows - How does CurrentControlSet differ from ControlSet001 and ControlSet002? - Stack Overflow&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows get last boot time</title><link>https://sajalchoudhary.net/til/windows-get-last-boot-time/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-get-last-boot-time/</guid><pubDate>Wed, 28 Jun 2023 11:25:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://devblogs.microsoft.com/scripting/powertip-get-the-last-boot-time-with-powershell/&quot;&gt;PowerTip: Get the Last Boot Time with PowerShell - Scripting Blog (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install offline plugin notepad ++</title><link>https://sajalchoudhary.net/til/install-offline-plugin-notepad-++/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-offline-plugin-notepad-++/</guid><pubDate>Wed, 28 Jun 2023 07:19:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x64.md&quot;&gt;x64 plugin list&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Dowload the plugin and extract the plugin dll file.&lt;/li&gt;
&lt;li&gt;Place the plugin.dll file under plugin folder of notepad++ installation. For me it was : &lt;code&gt;C:\Program Files\Notepad++\plugins&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Start Notepad++ as an elevated administrator and then go to: &lt;code&gt;Settings -&amp;gt; Import -&amp;gt; Import plugin(s)...&lt;/code&gt; (import the plugin).&lt;/li&gt;
&lt;li&gt;Notepad++ will show the restart message. / Sometimes it may not show it.&lt;/li&gt;
&lt;li&gt;Restart the notepad++.&lt;/li&gt;
&lt;li&gt;Should see new plugin under the Plugins menu. ALL DONE!!&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/40015350/how-to-install-a-notepad-plugin-offline&quot;&gt;How to install a Notepad++ plugin offline? - Stack Overflow&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AD sync SSO disable RC4</title><link>https://sajalchoudhary.net/til/azure-ad-sync-sso-disable-rc4/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-ad-sync-sso-disable-rc4/</guid><pubDate>Tue, 27 Jun 2023 12:12:00 GMT</pubDate><content:encoded>&lt;h2&gt;Enforcing AES256 for the Azure AD SSO Account in Active Directory&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to computer OU.&lt;/li&gt;
&lt;li&gt;Right click on the Azure sync account AZUREADSSOACC. Go to attribute editor.&lt;/li&gt;
&lt;li&gt;Update msDS-SupportedEncryptionTypes to 16 (AES 256) and confirm OK&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Roll-Over of the Kerberos Decryption Key (to enable SSO again)&lt;/h2&gt;
&lt;p&gt;on the Azure AD Connect server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run powershell as Admin. And run the following commands:&lt;/li&gt;
&lt;li&gt;cd to $env:programfiles&quot;\Microsoft Azure Active Directory Connect&quot; &lt;/li&gt;
&lt;li&gt;Import-Module .\AzureADSSO.psd1&lt;/li&gt;
&lt;li&gt;New-AzureADSSOAuthenticationContext&lt;br /&gt;In popup enter credentials.&lt;/li&gt;
&lt;li&gt;Get-AzureADSSOStatus | ConvertFrom-Json&lt;br /&gt;This command provides you the list of AD forests (look at the &quot;Domains&quot; list) on which this feature has been enabled.&lt;/li&gt;
&lt;li&gt;$creds = Get-Credential&lt;br /&gt;Enter credentials in jty\AID format. Domain Admin credentials.&lt;/li&gt;
&lt;li&gt;Update-AzureADSSOForest -OnPremCredentials $creds&lt;br /&gt;This command updates the Kerberos decryption key for the AZUREADSSO computer account in this specific AD forest and updates it in Azure AD.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://azuregeek.io/en/secure-azure-ad-sso-and-disable-rc4-hmac/&quot;&gt;Secure Active Directory + Azure AD SSO and disable RC4 HMAC - azuregeek.io&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://azurecloudai.blog/2020/08/03/roll-over-kerberos-decryption-key-for-seamless-sso-computer-account/&quot;&gt;Roll over Kerberos decryption key for Seamless SSO computer account - Azure Cloud &amp;amp; AI Domain Blog (azurecloudai.blog)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/how-to-connect-sso-faq&quot;&gt;Azure AD Connect - Microsoft Entra | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/decrypting-the-selection-of-supported-kerberos-encryption-types/ba-p/1628797&quot;&gt;Decrypting the Selection of Supported Kerberos Encryption Types - Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Openssh on Windows failing with 0x80072ee2</title><link>https://sajalchoudhary.net/til/openssh-on-windows-failing-with-0x80072ee2/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openssh-on-windows-failing-with-0x80072ee2/</guid><pubDate>Wed, 21 Jun 2023 14:51:00 GMT</pubDate><content:encoded>&lt;p&gt;Download from &lt;a href=&quot;https://github.com/PowerShell/Win32-OpenSSH/releases/&quot;&gt;https://github.com/PowerShell/Win32-OpenSSH/releases/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Error: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;PS C:\Windows\system32&amp;gt; Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Add-WindowsCapability : Add-WindowsCapability failed. Error code = 0x80072ee2
At line:1 char:1
+ Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsCapability], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsCapabilityCommand
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cause: Required files are not present.&lt;/p&gt;
&lt;h1&gt;Fix/Steps to install&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Attach ISO.&lt;/li&gt;
&lt;li&gt;Run powershell per below&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Get-WindowsCapability -Online | Where-Object Name -like &apos;OpenSSH*&apos;

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 -LimitAccess -Source Z:\LanguagesAndOptionalFeatures

# Start the sshd service
Start-Service sshd

# OPTIONAL but recommended:
Set-Service -Name sshd -StartupType &apos;Automatic&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Uninstall&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# Uninstall the OpenSSH Client
Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

# Uninstall the OpenSSH Server
Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Configuration&lt;/h1&gt;
&lt;p&gt;Configuration file is created here&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;%programdata%\ssh\sshd_config
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Port and IP binding&lt;/h3&gt;
&lt;p&gt;1.       Open the file and uncomment Port and provide the custom port required.&lt;br /&gt;2.       Uncomment ListenAddress and provide clustered role IP. This binds the SSH to that IP.&lt;/p&gt;
&lt;h3&gt;Default directory&lt;/h3&gt;
&lt;p&gt;1.       Set ChrootDirectory to whatever default location is needed.&lt;/p&gt;
&lt;h3&gt;Authorized groups&lt;/h3&gt;
&lt;p&gt;1.       Use AllowGroups to allow whatever group needs access. By default add Administrators.&lt;/p&gt;
&lt;p&gt;Additional configuration is not in scope of this document. Refer to man page for the list of configuration and how to setup authentication.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell#uninstall-openssh-for-windows&quot;&gt;Get started with OpenSSH for Windows | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Openstack disintegration</title><link>https://sajalchoudhary.net/til/openstack-disintegration/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openstack-disintegration/</guid><pubDate>Tue, 20 Jun 2023 09:38:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Restart of VMs to update managed by openstack to managed by VMware&lt;/li&gt;
&lt;li&gt;shared Disk allocated by Openstack / Same DC&lt;/li&gt;
&lt;li&gt;replicated disks moved&lt;/li&gt;
&lt;li&gt;svmotion for the shared disk&lt;/li&gt;
&lt;li&gt;backup/restore option not pursued&lt;/li&gt;
&lt;li&gt;Rebuilding VMs from vmx file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;--&amp;gt; Cluster/shared disk can be remapped without downtime by storage team&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows set proxy</title><link>https://sajalchoudhary.net/til/windows-set-proxy/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-set-proxy/</guid><pubDate>Thu, 15 Jun 2023 12:41:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;set proxy myproxy
set proxy myproxy:80 &quot;&amp;lt;local&amp;gt;bar&quot;
netsh winhttp set proxy proxy-server=&quot;http=myproxy;https=sproxy:88&quot; bypass-list=&quot;*.contoso.com&quot;

# Remove proxy
netsh winhttp reset proxy
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc731131(v=ws.10)?redirectedfrom=MSDN#BKMK_5&quot;&gt;Netsh Commands for Windows Hypertext Transfer Protocol (WINHTTP) | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS General</title><link>https://sajalchoudhary.net/til/ucs-general/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-general/</guid><pubDate>Tue, 13 Jun 2023 12:01:00 GMT</pubDate><content:encoded>&lt;p&gt;UCS helps with stateless computing&lt;br /&gt;Done through service profiles.&lt;br /&gt;Abstract identifying information (wwpn,mac,etc) from physical host to service profile. Policies, boot policy, etc.&lt;/p&gt;
&lt;p&gt;What this allows us to do, is in case of hardware failure, we can attach this service profile to a new physical host. &lt;/p&gt;
&lt;p&gt;Also simplifies cabling.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://tcsglobal.udemy.com/course/learning-cisco-unified-computing-system-ucs/learn/lecture/6573148#content&quot;&gt;Learning Cisco Unified Computing System - UCS (udemy.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Managed service account does not work</title><link>https://sajalchoudhary.net/til/managed-service-account-does-not-work/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/managed-service-account-does-not-work/</guid><pubDate>Fri, 09 Jun 2023 09:33:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Error:
Install-ADServiceAccount : Cannot Install service account. Error Message:  ‘The provided context did not match the target’

The Test-ADServiceAccount cmdlet gives us a little more to go on:

WARNING: Test failed for Managed Service Account SQLServerGMSA. If standalone Managed Service Account, the account is linked to another computer object in the Active Directory. If group Managed Service Account, either this computer does not have permission to use the group MSA or this computer does not support all the Kerberos encryption types required for the gMSA. See the MSA operational log for more information.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Cause&lt;/h2&gt;
&lt;p&gt;Windows server is configured not to use RC4. AES should be configured explicitly for service accounts.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Set-ADServiceAccount -Identity &amp;lt;account name&amp;gt; -KerberosEncryptionType AES128,AES256
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://technet239.rssing.com/chan-4753999/article26556.html&quot;&gt;Cannot install service account. The provided context did not match the target (rssing.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831782(v=ws.11)?redirectedfrom=MSDN&quot;&gt;Group Managed Service Accounts Overview | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Yoga</title><link>https://sajalchoudhary.net/now/yoga/</link><guid isPermaLink="true">https://sajalchoudhary.net/now/yoga/</guid><pubDate>Thu, 01 Jun 2023 17:41:49 GMT</pubDate><content:encoded>&lt;p&gt;I can touch the ground in the forward bend while doing surya-namaskar, fairly easily now. It does not happen in one smooth motion still. There is still a long way to go. I wrote about &lt;a href=&quot;https://sajalchoudhary.net/evergreen/the-goal-with-yoga/&quot;&gt;the goal with yoga&lt;/a&gt; . I continue to work toward that goal.&lt;/p&gt;
</content:encoded><category>now</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ports to be opened for Ansible Automation Platform</title><link>https://sajalchoudhary.net/til/ports-to-be-opened-for-ansible-automation-platform/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ports-to-be-opened-for-ansible-automation-platform/</guid><pubDate>Fri, 26 May 2023 06:11:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;Job executions for managed nodes from hybrid/execution nodes&lt;ul&gt;
&lt;li&gt;external cloud service to retrieve inventory information : 443/tcp (REST API in HTTPS)&lt;ul&gt;
&lt;li&gt;Amazon EC2&lt;/li&gt;
&lt;li&gt;Google Compute Engine&lt;/li&gt;
&lt;li&gt;Microsoft Azure Resource Manager&lt;/li&gt;
&lt;li&gt;VMware vCenter&lt;/li&gt;
&lt;li&gt;Red Hat Satellite&lt;/li&gt;
&lt;li&gt;Red Hat OpenStack&lt;/li&gt;
&lt;li&gt;Red Hat Insights&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;RHEL : 22/tcp (SSH)&lt;/li&gt;
&lt;li&gt;Windows Server : 5986/tcp (HTTPS), 5985/tcp (HTTP), 88/tcp,udp (Kerberos)&lt;/li&gt;
&lt;li&gt;Network : 22/tcp (SSH), 443/tcp (HTTPS), etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://access.redhat.com/solutions/6756251&quot;&gt;What Ports Need To Be Opened In The Firewall For Ansible Automation Platform 2 Services? - Red Hat Customer Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Check which ansible collections are installed in image</title><link>https://sajalchoudhary.net/til/check-which-ansible-collections-are-installed-in-image/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/check-which-ansible-collections-are-installed-in-image/</guid><pubDate>Thu, 18 May 2023 11:27:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# From one of the controller system:
podman run -it --rm registry.redhat.io/ansible-automation-platform-21/ee-supported-rhel8 ansible-galaxy collection list
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://access.redhat.com/solutions/6844291&quot;&gt;What all certified collections are included in the Execution Environments(EE&apos;s) provided by Ansible Automation Platform 2.x? - Red Hat Customer Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows Cluster disk reserved error 170</title><link>https://sajalchoudhary.net/til/windows-cluster-disk-reserved-error-170/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-disk-reserved-error-170/</guid><pubDate>Wed, 10 May 2023 09:52:00 GMT</pubDate><content:encoded>&lt;p&gt;Error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Node is not able to join after reboot, goes in quarantine

In cluster logs:
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [CORE] Node 7ogbwtsqldb08 attempted to bring online the witness resource at time 2023/05/08-08:49:35.935 with result (5038) Failed to bring quorum resource 97b68097-a457-4539-b315-c3cd433a5e01 online, status 5038
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [QUORUM] An attempt to form cluster failed due to insufficient quorum votes. Try starting additional cluster node(s) with current vote or as a last resort use Force Quorum option to start the cluster. Look below for quorum information,
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [QUORUM] To achieve quorum cluster needs at least 2 of quorum votes. There is only 2 quorum votes running
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [QUORUM] List of running node(s) attempting to form cluster: 7ogbwtsqldb08, 5ogbwtsqldb09,
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [QUORUM] List of running node(s) with current vote: 7ogbwtsqldb08, 5ogbwtsqldb09,
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  [QUORUM] Attempt to start some or all of the following down node(s) that have current vote: Quorum Disk,
[Verbose] 00000f44.00000a58::2023/05/08-11:55:37.173 WARN  FatalError: join/form timeout (status = 258)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Further: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
[Verbose] 00002344.000016a4::2023/05/08-11:56:49.325 WARN  [RES] Physical Disk &amp;lt;Quorum Disk&amp;gt;: HardDiskpPRArbitrate: Failed to preempt reservation, new key bce033420001734d, old key 4dda28d90002734d, status 170
[Verbose] 00002344.000016a4::2023/05/08-11:56:49.602 ERR   [RES] Physical Disk &amp;lt;Quorum Disk&amp;gt;: ResHardDiskArbitrateInternal: PR Arbitration for disk Error: 170
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;5038 is&lt;/p&gt;
&lt;p&gt;5038 (0x13AE)&lt;/p&gt;
&lt;p&gt;A cluster resource failed.&lt;/p&gt;
&lt;p&gt;170 is&lt;/p&gt;
&lt;p&gt;ERROR_BUSY&lt;/p&gt;
&lt;p&gt;170 (0xAA)&lt;/p&gt;
&lt;p&gt;The requested resource is in use.&lt;/p&gt;
&lt;p&gt;Resolution:&lt;br /&gt;Shared RDMs must be perennially reserved. Issue fixed after that.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VC appliance connect through winscp</title><link>https://sajalchoudhary.net/til/vc-appliance-connect-through-winscp/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vc-appliance-connect-through-winscp/</guid><pubDate>Wed, 10 May 2023 09:46:00 GMT</pubDate><content:encoded>&lt;p&gt;Error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Received too large (1433299822 B) SFTP packet. Max supported packet size is 1024000 B
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command changes the default shell from /bin/appliancesh to /bin/bash  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;chsh -s /bin/bash root
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Users can connect with WINSCP without getting the too large packet error.  &lt;/p&gt;
&lt;p&gt;To return to the Appliance Shell, run this command:  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;chsh -s /bin/appliancesh root
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2115983&quot;&gt;Connecting to vCenter Server Virtual Appliance 6.0 using WinSCP fails with the error: Received too large SFTP packet (2115983) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Vmware check rdm details</title><link>https://sajalchoudhary.net/til/vmware-check-rdm-details/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-check-rdm-details/</guid><pubDate>Mon, 08 May 2023 12:33:00 GMT</pubDate><content:encoded>&lt;p&gt;To check if disk is perennialy reserved&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage core device list -d naa.id
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/1016106&quot;&gt;ESXi host takes a long time to start during rescan of RDM LUNs (1016106) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows cluster on vmware</title><link>https://sajalchoudhary.net/til/windows-cluster-on-vmware/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-cluster-on-vmware/</guid><pubDate>Mon, 08 May 2023 12:12:00 GMT</pubDate><content:encoded>&lt;p&gt;The WSFC cluster heartbeat time-out must be modified at least to the values listed below:&lt;br /&gt;(get-cluster -name ).SameSubnetThreshold = 10&lt;br /&gt;(get-cluster -name ).CrossSubnetThreshold = 20&lt;br /&gt;(get-cluster -name ).RouteHistoryLength = 40&lt;br /&gt;The virtual hardware version for the WSFC virtual machine must be version 11 and later&lt;/p&gt;
&lt;p&gt;You can also adjust other properties to control the workload tolerance for failover. Adjusting delay controls how often heartbeats are sent between the clustered node. The default setting is 1 second and the maximum setting is 2 seconds. Set the SameSubnetDelay value to 1. Threshold controls how many consecutive heartbeats can be missed before the node considers its partner to be unavailable and triggers the failover process. The default threshold is 5 heartbeats and the maximum is 120 heartbeats. It is the combination of delay and threshold that determines the total elapsed time during which clustered Windows nodes can lose communication before triggering a failover. When the clustered nodes are in different subnets, they are called CrossSubnetDelay and CrossSubnetThreshold. Set the CrossSubnetDelay value to 2 and the CrossSubnetThreshold value to 20.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>windows</category><category>failover</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Winsocket reset</title><link>https://sajalchoudhary.net/til/winsocket-reset/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/winsocket-reset/</guid><pubDate>Tue, 28 Mar 2023 13:14:00 GMT</pubDate><content:encoded>&lt;p&gt;Error:&lt;br /&gt;The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the service failed to listen.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware logs</title><link>https://sajalchoudhary.net/til/vmware-logs/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-logs/</guid><pubDate>Tue, 21 Mar 2023 10:23:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-832A2618-6B11-4A28-9672-93296DA931D0.html&quot;&gt;ESXi Log File Locations (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;System: /var/log/syslog.log&lt;br /&gt;Auth : /var/log/auth.log&lt;/p&gt;
&lt;p&gt;vCenter server agent log: /var/log/vpxa.log&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware upgrade license</title><link>https://sajalchoudhary.net/til/vmware-upgrade-license/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-upgrade-license/</guid><pubDate>Tue, 31 Jan 2023 09:50:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Go to Manage Licenses. (&lt;strong&gt;Products and Accounts &amp;gt;Account &amp;gt; Manage Licenses&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;select license, actions will show upgrade option&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/81665&quot;&gt;How to Upgrade or Downgrade License Keys in Customer Connect with troubleshooting steps (81665) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>infoblox ip reservation csv import</title><link>https://sajalchoudhary.net/til/infoblox-ip-reservation-csv-import/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/infoblox-ip-reservation-csv-import/</guid><pubDate>Mon, 30 Jan 2023 13:39:00 GMT</pubDate><content:encoded>&lt;p&gt;These fields required:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;header-fixedaddress,ip_address*,mac_address*,name,comment  
FixedAddress,10.45.48.1,00:00:00:00:00:00,,Gateway
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If no existing data, then if you chose modify as the import mode, it fails. As existing record is not there.&lt;/p&gt;
&lt;p&gt;So, if data does not exist, it needs to be Add when doing import.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.infoblox.com/space/NCR8/23069057/IPv4+Fixed+Address%2FReservation&quot;&gt;IPv4 Fixed Address/Reservation - NIOS CSV Import Reference - Infoblox Documentation Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Infoblox ip status</title><link>https://sajalchoudhary.net/til/infoblox-ip-status/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/infoblox-ip-status/</guid><pubDate>Mon, 30 Jan 2023 09:08:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Unused: An IP address that has not been detected and is not associated with any network device or active host on the network.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conflict: An IP address that has either a MAC address conflict or a DHCP lease conflict detected through a network discovery.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Used: An IP address that is associated with an active host on the network. It can be a resource record, fixed address, reservation, DHCP lease, or host record.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pending: An IP address that is associated with a scheduled task or approval workflow, and the associated operation has not been executed yet. This IP address is not considered when using the next available IP address function.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Selected IP Address: The IP address that you selected.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DHCP Range: The IP addresses within a DHCP range in the network. The appliance highlights the cells using a green background.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reserved Range: A range of IP addresses that are reserved for statically configured hosts. They are not served as dynamic addresses. You can allocate the next available IP from the reserved range when you create a static host.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>OSI Model</title><link>https://sajalchoudhary.net/til/osi-model/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/osi-model/</guid><pubDate>Wed, 25 Jan 2023 18:03:00 GMT</pubDate><content:encoded>&lt;h1&gt;Physical&lt;/h1&gt;
&lt;p&gt;physical shared medium.&lt;br /&gt;protocols on how to transfer and receive from common shared medium.&lt;br /&gt;no access control, device ids, or device --&amp;gt; device comms. &lt;/p&gt;
&lt;h1&gt;Data Link&lt;/h1&gt;
&lt;p&gt;Network&lt;br /&gt;Transport&lt;br /&gt;Session&lt;br /&gt;Presentation&lt;br /&gt;Application&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/OSI_model&quot;&gt;Wiki&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AAP about credentials</title><link>https://sajalchoudhary.net/til/aap-about-credentials/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aap-about-credentials/</guid><pubDate>Fri, 20 Jan 2023 10:57:00 GMT</pubDate><content:encoded>&lt;p&gt;Types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Private credential (any user can create it/owner and sys admins can use it/sys auditors can see it)&lt;/li&gt;
&lt;li&gt;Organization credential (sys admin and admins can create it/can be assigned to users and teams)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;The automation controller &lt;code&gt;Admin&lt;/code&gt; user can assign an organization to an existing private credential, converting a private credential into an organization credential.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once credential is created/saved, no way to get the password in plain text. It is encrypted and then saved in DB.&lt;/p&gt;
&lt;p&gt;Credentials can be configured to prompt for password.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AAP about hosts licensing</title><link>https://sajalchoudhary.net/til/aap-about-hosts-licensing/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aap-about-hosts-licensing/</guid><pubDate>Fri, 20 Jan 2023 10:45:00 GMT</pubDate><content:encoded>&lt;p&gt;If you have multiple hosts in your inventory that have the same name, such as &lt;code&gt;webserver1&lt;/code&gt;, they count for licensing purposes as a single node. Note that this differs from the Hosts count on the Dashboard, which counts hosts in separate inventories separately. Note that this behavior is case-sensitive; &lt;code&gt;webserver1&lt;/code&gt; and &lt;code&gt;WebServer1&lt;/code&gt; are treated as different nodes.&lt;/p&gt;
&lt;p&gt;In the automation controller web UI, click Settings in the left pane and select Subscription settings from the Settings page to verify how many hosts your license supports and how many are remaining.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AAP install</title><link>https://sajalchoudhary.net/til/aap-install/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aap-install/</guid><pubDate>Fri, 20 Jan 2023 09:23:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Download bundled installer from &lt;a href=&quot;https://access.redhat.com/downloads/content/480&quot;&gt;Bundled installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Move the installer bundle to controller node.&lt;/li&gt;
&lt;li&gt;Untar the setup.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;tar zxvf ansible-automation-platform-setup-2.1.0-1.tar.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Change directory into untared folder.&lt;/li&gt;
&lt;li&gt;Backup existing inventory file&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;cp inventory inventory.bkup
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Install ansible core.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install ansible-core --assumeyes
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Modify inventory file&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><category>aap</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AAP controller rbac</title><link>https://sajalchoudhary.net/til/aap-controller-rbac/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aap-controller-rbac/</guid><pubDate>Fri, 20 Jan 2023 08:47:00 GMT</pubDate><content:encoded>&lt;h1&gt;Users&lt;/h1&gt;
&lt;p&gt;Three types of users:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;System Administrator (superuser/provides read/write permission on all objects in all organizations on the automation controller)&lt;/li&gt;
&lt;li&gt;System Auditor (has read-only access to the entire automation controller installation)&lt;/li&gt;
&lt;li&gt;Normal User (starts with no access/granted access based on org/team)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Users are system wide.&lt;br /&gt;A team belongs to exactly one organization.&lt;br /&gt;An admin user can assign the team roles on resources that belong to other organizations&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Teams&lt;/h1&gt;
&lt;p&gt;Roles in a team: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Admin (full control on team/can manage membership/can manage roles on resources if team has admin role on the resource)&lt;/li&gt;
&lt;li&gt;Member (gets roles assigned to team/can see other team users and their roles)&lt;/li&gt;
&lt;li&gt;Read (can see other team users and their roles)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;In practice, most organizations do not use team roles other than &lt;code&gt;Member&lt;/code&gt;. Instead, team membership is managed through an external authentication source, or the &lt;code&gt;Organization Administrator&lt;/code&gt; and &lt;code&gt;System Administrator&lt;/code&gt; roles are used for administrative purposes and &lt;code&gt;System Auditor&lt;/code&gt; for auditing requirements instead of &lt;code&gt;Read&lt;/code&gt; on individual teams.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Organizations&lt;/h1&gt;
&lt;p&gt;Roles in an org:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Execute (execute job templates/workflow job templates)&lt;/li&gt;
&lt;li&gt;Admin (full access on everything in an org)&lt;/li&gt;
&lt;li&gt;Project Admin (full access incl. create on all projects)&lt;/li&gt;
&lt;li&gt;Inventory Admin (full access on inventories, inc. create)&lt;/li&gt;
&lt;li&gt;Credential Admin (manage all credentials)&lt;/li&gt;
&lt;li&gt;Workflow Admin (manage all workflows)&lt;/li&gt;
&lt;li&gt;Notification Admin (manage all notifications)&lt;/li&gt;
&lt;li&gt;Job Template Admin (can make changes to non-sensitive fields)&lt;/li&gt;
&lt;li&gt;Execution Environment Admin (manage all execution environments)&lt;/li&gt;
&lt;li&gt;Auditor (RO access to the org)&lt;/li&gt;
&lt;li&gt;Read (read permission to org only/see users and their roles/does not inherit roles on objects)&lt;/li&gt;
&lt;li&gt;Approve (approve/deny workflow approval)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Project + Inventory Admin --&amp;gt; Create job templates&lt;br /&gt;Project + Inventory + Job Template Admin --&amp;gt; Full control over job templates&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.ansible.com/automation-controller/latest/html/userguide/users.html&quot;&gt;8. Users — Automation Controller User Guide v4.3 (ansible.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/automation-controller/latest/html/userguide/organizations.html&quot;&gt;7. Organizations — Automation Controller User Guide v4.3 (ansible.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Import</title><link>https://sajalchoudhary.net/til/ansible-import/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-import/</guid><pubDate>Wed, 18 Jan 2023 14:17:00 GMT</pubDate><content:encoded>&lt;p&gt;Previous versions used &lt;code&gt;include&lt;/code&gt; directive. Which had issues (confusing and error-prone).&lt;br /&gt;So, it was deprecated. &lt;/p&gt;
&lt;p&gt;There are two things we can do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;include (dynamic)&lt;/li&gt;
&lt;li&gt;import (static)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Play related&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;import_playbook&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;the &lt;code&gt;import_playbook&lt;/code&gt; feature can only be used at the top level of a playbook and cannot be used inside a play. If you import multiple playbooks, then they will be imported and run in order.&lt;/p&gt;
&lt;h1&gt;Task related&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;include_tasks&lt;/code&gt;, &lt;code&gt;import_tasks&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Plays/tasks can be variablized for reuse.&lt;br /&gt;For example, instead of &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
  - name: Install the httpd package
    yum:
      name: httpd
      state: latest
  - name: Start the httpd service
    service:
      name: httpd
      enabled: true
      state: started
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It can be variablized as &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;---
  - name: Install the {{ package }} package
    yum:
      name: &quot;{{ package }}&quot;
      state: latest
  - name: Start the {{ service }} service
    service:
      name: &quot;{{ service }}&quot;
      enabled: true
      state: started
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And variables set like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tasks:
    - name: Import task file and set variables
      import_tasks: task.yml
      vars:
        package: httpd
        service: httpd
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows DNS issue</title><link>https://sajalchoudhary.net/til/windows-dns-issue/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-dns-issue/</guid><pubDate>Wed, 04 Jan 2023 08:46:00 GMT</pubDate><content:encoded>&lt;h1&gt;Error&lt;/h1&gt;
&lt;p&gt;Resolution has multiple canonical names. Resolves couple of hops, but fails on 3rd/4th step.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;** server can&apos;t find example.example.example.com : NXDOMAIN

Example:
Non-authoritative answer:
insights.viva.office.com        canonical name = vi-prod-afd-gca7e3d5gcbzf0c7.z01.azurefd.net.
vi-prod-afd-gca7e3d5gcbzf0c7.z01.azurefd.net    canonical name = region-azurefd-prod-ts1.trafficmanager.net.
region-azurefd-prod-ts1.trafficmanager.net      canonical name = dual.part-0017.t-0009.t-s1-msedge.net.
dual.part-0017.t-0009.t-s1-msedge.net   canonical name = part-0017.t-0009.t-s1-msedge.net.
Name:   part-0017.t-0009.t-s1-msedge.net
Address: 13.107.229.28
Name:   part-0017.t-0009.t-s1-msedge.net
Address: 13.107.228.28
Name:   part-0017.t-0009.t-s1-msedge.net
Address: 2620:1ec:4b::28
Name:   part-0017.t-0009.t-s1-msedge.net
Address: 2620:1ec:4a::28
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Resolution&lt;/h1&gt;
&lt;p&gt;Forwarder does not exist for this 3rd/4th domain. So create conditional forwarder for this domain to the external/dmz dns server.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware convert eager zeroed disk to lazy zeroed</title><link>https://sajalchoudhary.net/til/vmware-convert-eager-zeroed-disk-to-lazy-zeroed/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-convert-eager-zeroed-disk-to-lazy-zeroed/</guid><pubDate>Mon, 02 Jan 2023 12:15:00 GMT</pubDate><content:encoded>&lt;p&gt;Conversion to lazy zeroed might not work, so better to convert disk to thin. and then do vmotion to lazy zeroed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vmkfstools -i /vmfs/volumes/datastoreName/VMName/VMName.vmdk /vmfs/volumes/datastoreName/VMName/temp/VMName.vmdk -d zeroedthick


vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-primary.vmdk /vmfs/volumes/myVMFS/myOS.vmdk -d thin
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://communities.vmware.com/t5/ESXi-Discussions/clone-virtual-disk-eager-zero-to-lazy-zeroed/td-p/2751823&quot;&gt;Solved: clone virtual disk eager zero to lazy zeroed - VMware Technology Network VMTN&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.storage.doc/GUID-01D3CF47-A84A-4988-8103-A0487D6441AA.html&quot;&gt;Cloning or Converting a Virtual Disk or RDM (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible configuration</title><link>https://sajalchoudhary.net/til/ansible-configuration/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-configuration/</guid><pubDate>Thu, 22 Dec 2022 11:14:00 GMT</pubDate><content:encoded>&lt;h1&gt;Default config file locations in order of precedence&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;ANSIBLE_CONFIG&lt;/code&gt; environment variable&lt;br /&gt;./ansible.cfg&lt;br /&gt;~/.ansible.cfg&lt;br /&gt;/etc/ansible/ansible.cfg (Only used if no other config file found)&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible inventory</title><link>https://sajalchoudhary.net/til/ansible-inventory/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-inventory/</guid><pubDate>Thu, 22 Dec 2022 10:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Host groups&lt;/h1&gt;
&lt;p&gt;Two host groups always exist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;all&lt;/code&gt; host group contains every host explicitly listed in the inventory&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;ungrouped&lt;/code&gt; host group contains every host explicitly listed in the inventory that is not a member of any other group.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Nested groups&lt;/h3&gt;
&lt;p&gt;Specified by using &lt;code&gt;:children&lt;/code&gt; suffix.&lt;br /&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[usa]
washington1.example.com
washington2.example.com

[canada]
ontario01.example.com
ontario02.example.com

[north-america:children]
canada
usa
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Default location&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;/etc/ansible/hosts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To override use the &lt;code&gt;-i&lt;/code&gt; switch.&lt;/p&gt;
&lt;h1&gt;Commands&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# To list ungrouped hosts
ansible ungrouped --list-hosts

&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible way</title><link>https://sajalchoudhary.net/til/ansible-way/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-way/</guid><pubDate>Thu, 22 Dec 2022 08:48:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;simple&lt;/li&gt;
&lt;li&gt;readable&lt;/li&gt;
&lt;li&gt;declarative (i.e. not like scripting language, but rather states you want)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Full text&lt;/h1&gt;
&lt;h2&gt;Complexity Kills Productivity&lt;/h2&gt;
&lt;p&gt;Simpler is better. Ansible is designed so that its tools are simple to use and automation is simple to write and read. You should take advantage of this to strive for simplification in how you create your automation.&lt;/p&gt;
&lt;h2&gt;Optimize For Readability&lt;/h2&gt;
&lt;p&gt;The Ansible automation language is built around simple, declarative, text-based files that are easy for humans to read. Written properly, Ansible Playbooks can clearly document your workflow automation.&lt;/p&gt;
&lt;h2&gt;Think Declaratively&lt;/h2&gt;
&lt;p&gt;Ansible is a &lt;em&gt;desired-state engine&lt;/em&gt;. It approaches the problem of how to automate IT deployments by expressing them in terms of the state that you want your systems to be in. Ansible&apos;s goal is to put your systems into the desired state, only making changes that are necessary. Trying to treat Ansible like a scripting language is not the right approach.&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible execution behaviour</title><link>https://sajalchoudhary.net/til/ansible-execution-behaviour/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-execution-behaviour/</guid><pubDate>Thu, 22 Dec 2022 08:42:00 GMT</pubDate><content:encoded>&lt;p&gt;module defines the state in which something should be.&lt;br /&gt;when used in a task, following things happen&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;if system is not in the required state, task should put it in that state&lt;/li&gt;
&lt;li&gt;if system is in the required state, it does nothing&lt;/li&gt;
&lt;li&gt;if task fails, default behaviour is to abort the rest of the playbook for the hosts that had a failure&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows disable ipv6</title><link>https://sajalchoudhary.net/til/windows-disable-ipv6/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-disable-ipv6/</guid><pubDate>Wed, 21 Dec 2022 12:01:00 GMT</pubDate><content:encoded>&lt;h1&gt;Powershell&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Get-NetAdapterBinding | Where-Object ComponentID -EQ &apos;ms_tcpip6&apos;

Disable-NetAdapterBinding -Name &apos;Ethernet&apos; -ComponentID &apos;ms_tcpip6&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Registry&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Location&lt;/strong&gt;: &lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\&lt;/code&gt;&lt;br /&gt;&lt;strong&gt;Name&lt;/strong&gt;: DisabledComponents&lt;br /&gt;&lt;strong&gt;Type&lt;/strong&gt;: REG_DWORD&lt;br /&gt;&lt;strong&gt;Min Value&lt;/strong&gt;: 0x00 (default value)&lt;br /&gt;&lt;strong&gt;Max Value&lt;/strong&gt;: 0xFF (IPv6 disabled) Decimal 255&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;New-ItemProperty -Path &quot;HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\&quot; -Name DisabledComponents -Value 255 -PropertyType DWORD -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://adamtheautomator.com/disable-ipv6/&quot;&gt;How to Disable IPv6 on Windows (adamtheautomator.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-ipv6-in-windows&quot;&gt;Configure IPv6 for advanced users - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>diskpart</title><link>https://sajalchoudhary.net/til/diskpart/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/diskpart/</guid><pubDate>Tue, 20 Dec 2022 09:36:00 GMT</pubDate><content:encoded>&lt;h1&gt;Online/Offline disk&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;list disk
select disk 1
offline disk

or 

online disk
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Disable firewall with powershell</title><link>https://sajalchoudhary.net/til/disable-firewall-with-powershell/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/disable-firewall-with-powershell/</guid><pubDate>Tue, 20 Dec 2022 08:27:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Get status&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Get-NetFirewallProfile | Format-Table Name, Enabled
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Disable&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Get-NetFirewallProfile | Set-NetFirewallProfile -Enabled False
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install VMware tools on Windows server core</title><link>https://sajalchoudhary.net/til/install-vmware-tools-on-windows-server-core/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-vmware-tools-on-windows-server-core/</guid><pubDate>Tue, 20 Dec 2022 08:18:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Click Install VMware tools on vCenter/Mount the iso.&lt;/li&gt;
&lt;li&gt;gwmi win32_logicaldisk to find the vmware disk.&lt;/li&gt;
&lt;li&gt;cd to vmware directory.&lt;/li&gt;
&lt;li&gt;Run setup64.exe. Window will come up, Next, Next.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Import csv data into infoblox</title><link>https://sajalchoudhary.net/til/import-csv-data-into-infoblox/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/import-csv-data-into-infoblox/</guid><pubDate>Wed, 14 Dec 2022 06:38:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.infoblox.com/space/nios84/44600724/Importing+and+Exporting+Data+using++CSV+Import&quot;&gt;Importing and Exporting Data using CSV Import - Infoblox NIOS 8.4 - Infoblox Documentation Portal&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell exe location</title><link>https://sajalchoudhary.net/til/powershell-exe-location/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-exe-location/</guid><pubDate>Fri, 09 Dec 2022 15:06:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;C:\Windows\System32
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# For scheduled task

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>ESXi hosts showing out of sync with distributed switch</title><link>https://sajalchoudhary.net/til/esxi-hosts-showing-out-of-sync-with-distributed-switch/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/esxi-hosts-showing-out-of-sync-with-distributed-switch/</guid><pubDate>Mon, 05 Dec 2022 12:21:00 GMT</pubDate><content:encoded>&lt;p&gt;Fix:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Move all attached virtual machines to another host or to a standard switch.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A new standard switch can be built using one of the physical adapters that passes the correct VLANs from the vDS. See the note below on Load Balancing information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Move all vmkernels from the vDS to a standard switch.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Again, a new standard switch can be built using one of the physical adapters that passes the correct VLANs from the vDS. See the note below on Load Balancing information.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove any remaining physical adapters from the vDS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove the host from the vDS. Click Home &amp;gt; Networking. Right click the vDS, click Add and Manage Hosts &amp;gt; Remove Hosts, and follow the wizard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the host back to the vDS along with its vmkernels, physical adapters, and VMs.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/76959&quot;&gt;ESXi hosts showing out of sync with distributed switch (76959) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows extend volume blocked by partition</title><link>https://sajalchoudhary.net/til/windows-extend-volume-blocked-by-partition/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-extend-volume-blocked-by-partition/</guid><pubDate>Mon, 05 Dec 2022 09:20:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Run diskpart&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;list disk

select disk *

list partition

select partition *

delete partition override
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.diskpart.com/res/extend-volume-blocked-by-a-recovery-partition-on-windows-10-0825.html#:~:text=Volume%20extension%20might%20be%20blocked%20by%20a%20recovery,operating%20system%20in%20case%20of%20any%20system%20failure.&quot;&gt;Fixed: Cannot Extend Volume Blocked by a Recovery Partition on Windows 10 (diskpart.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Curl</title><link>https://sajalchoudhary.net/til/curl/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/curl/</guid><pubDate>Fri, 25 Nov 2022 11:56:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;curl -H &quot;Content-Type: application/json&quot; --data @body.json http://localhost:8080/ui/webapp/conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From postman, this can be exported as well. the curl command.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://stackoverflow.com/questions/7172784/how-do-i-post-json-data-with-curl&quot;&gt;rest - How do I POST JSON data with cURL? - Stack Overflow&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Run powershell as admin</title><link>https://sajalchoudhary.net/til/run-powershell-as-admin/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/run-powershell-as-admin/</guid><pubDate>Thu, 24 Nov 2022 10:20:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;Start-Process powershell -Verb RuAs
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows corrupt profile issue</title><link>https://sajalchoudhary.net/til/windows-corrupt-profile-issue/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-corrupt-profile-issue/</guid><pubDate>Thu, 24 Nov 2022 08:47:00 GMT</pubDate><content:encoded>&lt;p&gt;Event: Windows has backed up this user profile. Windows will automatically try to use the backup profile the next time this user logs on.&lt;/p&gt;
&lt;h1&gt;Fix&lt;/h1&gt;
&lt;p&gt;Requires reboot&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Get your SID from whoami /user command.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the following path: &lt;strong&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If sid exists with sid and sid.bak. Delete both the folders, one after the other. Logout and login.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Delete sid folder. &lt;/li&gt;
&lt;li&gt;Rename sid.bak to sid. &lt;/li&gt;
&lt;li&gt;Double-click &lt;strong&gt;ProfileImagePath&lt;/strong&gt; to modify its value name, enter the correct path of the user profile folder and select &lt;strong&gt;OK&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Verify that the &lt;strong&gt;State&lt;/strong&gt; DWORD value of the SID key is &lt;strong&gt;0&lt;/strong&gt; and then close the Registry Editor.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://helpdeskgeek.com/windows-10/how-to-fix-a-corrupt-user-profile-in-windows-10/&quot;&gt;How to Fix a Corrupt User Profile in Windows 10 (helpdeskgeek.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Automation Platform</title><link>https://sajalchoudhary.net/til/ansible-automation-platform/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-automation-platform/</guid><pubDate>Wed, 23 Nov 2022 11:12:00 GMT</pubDate><content:encoded>&lt;h1&gt;Automation controller&lt;/h1&gt;
&lt;p&gt;types: control, hybrid, execution, and hop&lt;/p&gt;
&lt;h1&gt;Automation mesh&lt;/h1&gt;
&lt;h2&gt;Control plane&lt;/h2&gt;
&lt;p&gt;Instances in the control plane run persistent automation controller services such as the the web server and task dispatcher, in addition to project updates, and management jobs.&lt;/p&gt;
&lt;h3&gt;Hybrid nodes&lt;/h3&gt;
&lt;p&gt;default. responsible for automation controller runtime functions and ansible-runner task operations.&lt;/p&gt;
&lt;h3&gt;Control nodes&lt;/h3&gt;
&lt;p&gt;execution capabilities disabled.&lt;/p&gt;
&lt;h2&gt;Execution plane&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;execution plane&lt;/strong&gt; consists of execution nodes that execute automation on behalf of the control plane and have no control functions&lt;/p&gt;
&lt;h3&gt;Execution nodes&lt;/h3&gt;
&lt;p&gt;default. Execution nodes run jobs under &lt;code&gt;ansible-runner&lt;/code&gt; with &lt;code&gt;podman&lt;/code&gt; isolation.&lt;/p&gt;
&lt;h3&gt;Hop nodes&lt;/h3&gt;
&lt;p&gt;redirect traffic to execution nodes/&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.2/html/red_hat_ansible_automation_platform_installation_guide/planning-installation#red_hat_ansible_automation_platform_system_requirements&quot;&gt;Chapter 1. Planning your Red Hat Ansible Automation Platform installation Red Hat Ansible Automation Platform 2.2 | Red Hat Customer Portal&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/red_hat_ansible_automation_platform/2.2/html/red_hat_ansible_automation_platform_automation_mesh_guide/assembly-planning-mesh&quot;&gt;Chapter 1. Planning for automation mesh in your Red Hat Ansible Automation Platform environment Red Hat Ansible Automation Platform 2.2 | Red Hat Customer Portal&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://access.redhat.com/documentation/en-us/reference_architectures/2021/html-single/deploying_ansible_automation_platform_2.1/index#overview&quot;&gt;Deploying Ansible Automation Platform 2.1 Reference Architectures 2021 | Red Hat Customer Portal&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/automation-controller/latest/html/administration/clustering.html&quot;&gt;7. Clustering — Automation Controller Administration Guide v4.3.0 (ansible.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/ansible-tower/latest/html/installandreference/tower_install_wizard.html#setting-up-the-inventory-file&quot;&gt;7. Installing Ansible Automation Platform — Ansible Tower Installation and Reference Guide v3.8.6&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Vmware interop matrix</title><link>https://sajalchoudhary.net/til/vmware-interop-matrix/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-interop-matrix/</guid><pubDate>Fri, 11 Nov 2022 13:43:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://interopmatrix.vmware.com/Interoperability&quot;&gt;Product Interoperability Matrix (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can be used to compare interop between:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;vCenter and esxi&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://interopmatrix.vmware.com/Interoperability?col=2,&amp;amp;row=1,&amp;amp;isHideGenSupported=false&amp;amp;isHideTechSupported=true&amp;amp;isHideCompatible=false&amp;amp;isHideNTCompatible=false&amp;amp;isHideIncompatible=false&amp;amp;isHideNotSupported=true&amp;amp;isCollection=false&quot;&gt;Product Interoperability Matrix (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upgrade Path&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://interopmatrix.vmware.com/Upgrade?productId=2&quot;&gt;Product Interoperability Matrix (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://interopmatrix.vmware.com/Interoperability&quot;&gt;Product Interoperability Matrix (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Eventcomb tool Account lockout</title><link>https://sajalchoudhary.net/til/eventcomb-tool-account-lockout/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/eventcomb-tool-account-lockout/</guid><pubDate>Wed, 09 Nov 2022 10:03:00 GMT</pubDate><content:encoded>&lt;h1&gt;Steps&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On the &lt;strong&gt;Searches&lt;/strong&gt; menu, point to &lt;strong&gt;Built In Searches&lt;/strong&gt;, and then click &lt;strong&gt;Account Lockouts&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;All domain controllers for the domain appear in the &lt;strong&gt;Select To Search/Right Click To Add&lt;/strong&gt; box. Also, in the &lt;strong&gt;Event IDs&lt;/strong&gt; box, you see that event IDs 529, 644, 675, 676, and 681 are added.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the &lt;strong&gt;Event IDs&lt;/strong&gt; box, type a space, and then type 12294 after the last event number&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;4740 event ID on DC for account lock.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/use-eventcombmt-to-search-logs-for-account-lockout&quot;&gt;How to use the EventCombMT utility to search event logs for account lockouts - Windows Server | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>vCenter upgrade</title><link>https://sajalchoudhary.net/til/vcenter-upgrade/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vcenter-upgrade/</guid><pubDate>Mon, 07 Nov 2022 08:47:00 GMT</pubDate><content:encoded>&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Verify plugin compatibility&lt;/li&gt;
&lt;li&gt;Backup&lt;/li&gt;
&lt;li&gt;Upgrade vCenter&lt;/li&gt;
&lt;li&gt;Upgrade ESXi&lt;/li&gt;
&lt;li&gt;Upgrade VMs&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vcenter.upgrade.doc/GUID-EB29D42E-7174-467C-AB40-DB37236FEAF5.html&quot;&gt;vCenter Server Upgrade Options (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vcenter.upgrade.doc/GUID-C5CBFB63-4E95-4143-BA89-89AA5D292C68.html#GUID-C5CBFB63-4E95-4143-BA89-89AA5D292C68&quot;&gt;Overview of the vCenter Server Upgrade Process (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows enable quota</title><link>https://sajalchoudhary.net/til/windows-enable-quota/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-enable-quota/</guid><pubDate>Thu, 03 Nov 2022 09:14:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Open the disk properties window, on which you want to enable quotas, go to the &lt;strong&gt;Quota&lt;/strong&gt; tab. Then click &lt;strong&gt;Show Quota Settings&lt;/strong&gt;:&lt;/li&gt;
&lt;li&gt;To enable the quotas for this volume, check &lt;strong&gt;Enable quota management&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deny disk space to users exceeding quota limit&lt;/strong&gt; – prevent users who have exceeded the quota limit from writing to disk;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limit disk space to&lt;/strong&gt; — set a limit on the total size of files for one user;&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Quota Entries&lt;/strong&gt; button. You will see a resulting table showing quotas and the current size of the space used by each user (whose files are found on file system)&lt;/li&gt;
&lt;li&gt;You must disable quotas for the system accounts NT Service\TrustedInstaller and &lt;a href=&quot;http://woshub.com/runas-localsystem-account-windows/&quot;&gt;NT AUTHORITY\SYSTEM&lt;/a&gt;, otherwise Windows may not work correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;http://woshub.com/using-ntfs-disk-quotas-to-set-limits-for-users/&quot;&gt;How to Enable and Configure User Disk Quotas in Windows? | Windows OS Hub (woshub.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Run remote command cmd</title><link>https://sajalchoudhary.net/til/run-remote-command-cmd/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/run-remote-command-cmd/</guid><pubDate>Thu, 03 Nov 2022 09:09:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Open cmd, admin.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;WMIC /node:&amp;lt;computername&amp;gt; process call create “cmd.exe /c GPUpdate.exe /force”
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://community.spiceworks.com/how_to/127139-run-a-command-on-a-remote-computer#:~:text=How%20to%3A%20Run%20a%20command%20on%20a%20remote,Step%202%3A%20Run%20your%20command.%203%20References.%20&quot;&gt;Run a command on a remote computer - Windows Forum - Spiceworks&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>keytab</title><link>https://sajalchoudhary.net/til/keytab/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/keytab/</guid><pubDate>Tue, 01 Nov 2022 07:50:00 GMT</pubDate><content:encoded>&lt;p&gt;Keytab is a file that contains user account and an encrypted hash of that user account&apos;s password.&lt;/p&gt;
&lt;p&gt;When you want to integrate Unix systems to AD, you can&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;type the password (in clear text) into a configuration file somewhere and maybe encrypt that&lt;/li&gt;
&lt;li&gt;store an encrypted hash of the password in a keytab file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Option 2, is more secure.&lt;/p&gt;
&lt;h2&gt;How to create a keypass (using ktpass.exe)&lt;/h2&gt;
&lt;p&gt;The ktpass command must be run on either a member server or a domain controller of the Active Directory domain. Must be run as admin.&lt;br /&gt;Note: if you re-create a keytab using the same SPN, you will need to (1) first ensure the application server config is pointed to the new keytab file name (if you&apos;ve changed it) and (2) you will also need to restart the application service engine.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/wiki/contents/articles/36470.active-directory-using-kerberos-keytabs-to-integrate-non-windows-systems.aspx&quot;&gt;Active Directory: Using Kerberos Keytabs to integrate non-Windows systems - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>SamAccount Name limit</title><link>https://sajalchoudhary.net/til/samaccount-name-limit/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/samaccount-name-limit/</guid><pubDate>Tue, 01 Nov 2022 06:56:00 GMT</pubDate><content:encoded>&lt;p&gt;The &lt;strong&gt;sAMAccountName&lt;/strong&gt; attribute is a logon name used to support clients and servers from previous version of Windows, such as Windows NT 4.0, Windows 95, Windows 98, and LAN Manager. The logon name must be 20 or fewer characters and be unique among all security principal objects within the domain.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/ad/naming-properties?source=recommendations#samaccountname&quot;&gt;User Naming Attributes - Win32 apps | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Clean reboot a windows cluster</title><link>https://sajalchoudhary.net/til/clean-reboot-a-windows-cluster/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/clean-reboot-a-windows-cluster/</guid><pubDate>Wed, 26 Oct 2022 11:37:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Shutdown one node.&lt;/li&gt;
&lt;li&gt;Reboot the other node.&lt;/li&gt;
&lt;li&gt;Bring the first node up.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Send a message to all logged in users</title><link>https://sajalchoudhary.net/til/send-a-message-to-all-logged-in-users/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/send-a-message-to-all-logged-in-users/</guid><pubDate>Tue, 11 Oct 2022 12:00:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;msg * &quot;Hallo, this is a test!&quot;`
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell install modules offline</title><link>https://sajalchoudhary.net/til/powershell-install-modules-offline/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-install-modules-offline/</guid><pubDate>Tue, 11 Oct 2022 07:09:00 GMT</pubDate><content:encoded>&lt;p&gt;Download module and put it in below path on a VM that does not have internet access.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Save-Module -Name &amp;lt;modulename&amp;gt; -Path &amp;lt;localpath&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;C:\Program Files\WindowsPowerShell\Modules
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/powershellget/save-module?view=powershell-7.3&quot;&gt;Save-Module (PowerShellGet) - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell install packages offline</title><link>https://sajalchoudhary.net/til/powershell-install-packages-offline/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-install-packages-offline/</guid><pubDate>Tue, 11 Oct 2022 07:09:00 GMT</pubDate><content:encoded>&lt;p&gt;Download module and put it in below path on a VM that does not have internet access.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Save-Module -Name &amp;lt;modulename&amp;gt; -Path &amp;lt;localpath&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;C:\Program Files\WindowsPowerShell\Modules
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/powershellget/save-module?view=powershell-7.3&quot;&gt;Save-Module (PowerShellGet) - PowerShell | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell search ad for a user</title><link>https://sajalchoudhary.net/til/powershell-search-ad-for-a-user/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-search-ad-for-a-user/</guid><pubDate>Fri, 07 Oct 2022 16:01:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;$ADFilter = &quot;*345&quot; #anything which has 345 at end
Get-ADUser -Server $Domain -Filter { SamAccountName -like $ADFilter } -Properties *
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Grep Reference</title><link>https://sajalchoudhary.net/til/grep-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/grep-reference/</guid><pubDate>Thu, 29 Sep 2022 09:33:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;# n lines after searchterm
grep -An

# n lines before searchterm
grep -Bn
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell create custom object</title><link>https://sajalchoudhary.net/til/powershell-create-custom-object/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-create-custom-object/</guid><pubDate>Thu, 29 Sep 2022 07:29:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
#Example create hash, create ps custom object and export
# Useful for ceating outputs
$DSProperties = @{
	ClusterName = $DSClusterName
	DataStore = $DSName
	StorageTag = $DSTag
	CapacityGB = $TotalSpaceGB
	FreeSpaceGB = $FreeSpaceGB
	ProvisionedSpaceGB = $ProvisionedSpaceGB
	NumberOfVMs = $NumberOfVMs
}

$DSUtilReport = New-Object -TypeName PSCustomObject -Property $DSProperties
$DSUtilReport | 
	Select-Object ClusterName, DataStore, StorageTag, CapacityGB, FreeSpaceGB, ProvisionedSpaceGB, NumberOfVMs |
	Export-Csv -Path $DSReportPath -NoTypeInformation -NoClobber -Append -Encoding ASCII -Force
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/wiki/contents/articles/7804.powershell-creating-custom-objects.aspx#:~:text=PowerShell%3A%20Creating%20Custom%20Objects%201%201.%20New-Object%20You,6.%20Using%20Class%20%28PowerShell%20v5%20or%20higher%29%20&quot;&gt;PowerShell: Creating Custom Objects - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows sysprep reference</title><link>https://sajalchoudhary.net/til/windows-sysprep-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-sysprep-reference/</guid><pubDate>Mon, 26 Sep 2022 10:30:00 GMT</pubDate><content:encoded>&lt;p&gt;Located: %WINDIR%\system32\sysprep\sysprep.exe&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Sysprep will remove language location settings, etc.&lt;br /&gt;So let the server boot up, select region. Then shutdown and convert it to template.\&lt;/p&gt;
&lt;p&gt;After bootup:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select region&lt;/li&gt;
&lt;li&gt;Remove IP&lt;/li&gt;
&lt;li&gt;Remove any groups from local groups&lt;/li&gt;
&lt;li&gt;Also cleanup all logs&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation?view=windows-11&quot;&gt;Sysprep (Generalize) a Windows installation | Microsoft Learn&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-windows-to-audit-mode-or-oobe?view=windows-11&quot;&gt;Boot Windows to Audit Mode or OOBE | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows local time change</title><link>https://sajalchoudhary.net/til/windows-local-time-change/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-local-time-change/</guid><pubDate>Mon, 26 Sep 2022 10:27:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;w32tm /query /source
w32tm /config /syncfromflags:domhier /update
net stop w32time &amp;amp;&amp;amp; net start w32time
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows activation</title><link>https://sajalchoudhary.net/til/windows-activation/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-activation/</guid><pubDate>Mon, 26 Sep 2022 10:26:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;slmgr.vbs /skms &amp;lt;serverfqdn&amp;gt;
slmgr.vbs /ato
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cscript.exe is not recognised</title><link>https://sajalchoudhary.net/til/cscript.exe-is-not-recognised/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cscript.exe-is-not-recognised/</guid><pubDate>Mon, 26 Sep 2022 10:24:00 GMT</pubDate><content:encoded>&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;http://triplescomputers.com/blog/casestudies/solution-cant-find-script-engine-vbscript-for-script/&quot;&gt;http://triplescomputers.com/blog/casestudies/solution-cant-find-script-engine-vbscript-for-script/&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows rpc server is unavailable</title><link>https://sajalchoudhary.net/til/windows-rpc-server-is-unavailable/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-rpc-server-is-unavailable/</guid><pubDate>Mon, 26 Sep 2022 10:23:00 GMT</pubDate><content:encoded>&lt;p&gt;Issue: The RPC server is unavailable while trying to take Remote Desktop of 2003&lt;/p&gt;
&lt;p&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server&lt;br /&gt;Create a new key selecting Dword and name it as IgnoreRegUserConfigErrors&lt;br /&gt;now double click it and give a value as 1&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AD join fails with The Revision Level is Unknown</title><link>https://sajalchoudhary.net/til/ad-join-fails-with-the-revision-level-is-unknown/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ad-join-fails-with-the-revision-level-is-unknown/</guid><pubDate>Mon, 26 Sep 2022 10:17:00 GMT</pubDate><content:encoded>&lt;p&gt;When trying to join to workgroup, or join domain, we get the message:&lt;br /&gt;&quot;The Revision Level is Unknown&quot;&lt;/p&gt;
&lt;p&gt;To workaround this behavior:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; Log on locally with Administrator privileges.&lt;/li&gt;
&lt;li&gt;Use the registry Editor to grant the your account Full Control of the HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets$MACHIN E.ACC registry key.&lt;/li&gt;
&lt;li&gt;Delete the HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets$MACHIN E.ACC registry key.&lt;/li&gt;
&lt;li&gt;Shutdown and restart your computer.&lt;/li&gt;
&lt;li&gt;Log on locally with Administrator privileges.&lt;/li&gt;
&lt;li&gt;Join a WORKGROUP and restart your computer.&lt;/li&gt;
&lt;li&gt;Log on locally with Administrator privileges.&lt;/li&gt;
&lt;li&gt;Join your domain.&lt;/li&gt;
&lt;li&gt;Shutdown and restart your computer.&lt;/li&gt;
&lt;li&gt;Logon to your domain.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;p&gt;The registry HKEY_LOCAL_MACHINE\SECURITY might not have anything visible with the local account you use to login. In order to workaround that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download PSTools (&lt;a href=&quot;https://download.sysinternals.com/files/PSTools.zip&quot;&gt;https://download.sysinternals.com/files/PSTools.zip&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Extract.&lt;/li&gt;
&lt;li&gt;Run:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;psexec -i -s c:\windows\regedit.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Then do the above workaround.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VSS writers in failed state</title><link>https://sajalchoudhary.net/til/vss-writers-in-failed-state/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vss-writers-in-failed-state/</guid><pubDate>Mon, 26 Sep 2022 10:15:00 GMT</pubDate><content:encoded>&lt;p&gt;Restart services based on below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;VSS Writer        Service Name        Service Display Name
ASR Writer        VSS        Volume Shadow Copy
BITS Writer        BITS        Background Intelligent Transfer Service
COM+ REGDB Writer        VSS        Volume Shadow Copy
DFS Replication service writer        DFSR        DFS Replication
DHCP Jet Writer        DHCPServer        DHCP Server
FRS Writer        NtFrs        File Replication
FSRM writer        srmsvc        File Server Resource Manager
IIS Config Writer        AppHostSvc        Application Host Helper Service
IIS Metabase Writer        IISADMIN        IIS Admin Service
Microsoft Exchange Writer        MSExchangeIS        Microsoft Exchange Information Store
Microsoft Hyper-V VSS Writer        vmms        Hyper-V Virtual Machine Management
NTDS        NTDS        Active Directory Domain Services
OSearch VSS Writer        OSearch        Office SharePoint Server Search
OSearch14 VSS Writer        OSearch14        SharePoint Server Search 14
Registry Writer        VSS        Volume Shadow Copy
Shadow Copy Optimization Writer        VSS        Volume Shadow Copy
SPSearch VSS Writer        SPSearch        Windows SharePoint Services Search
SPSearch4 VSS Writer        SPSearch4        SharePoint Foundation Search V4
SqlServerWriter        SQLWriter        SQL Server VSS Writer
System Writer        CryptSvc        Cryptographic Services
TermServLicensing        TermServLicensing        Remote Desktop Licensing
WINS Jet Writer        WINS        Windows Internet Name Service (WINS)
WMI Writer        Winmgmt        Windows Management Instrumentation
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://support.arcserve.com/s/article/209606286?language=en_US&quot;&gt;https://support.arcserve.com/s/article/209606286?language=en_US&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows make disk active</title><link>https://sajalchoudhary.net/til/windows-make-disk-active/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-make-disk-active/</guid><pubDate>Mon, 26 Sep 2022 10:14:00 GMT</pubDate><content:encoded>&lt;p&gt;After migration if VM does not boot:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;diskpart
list disk
select disk #
list partition
select partition #
active
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows Alternate Keys</title><link>https://sajalchoudhary.net/til/windows-alternate-keys/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-alternate-keys/</guid><pubDate>Mon, 26 Sep 2022 10:13:00 GMT</pubDate><content:encoded>&lt;p&gt;How to right click&lt;/p&gt;
&lt;p&gt;Shift + F10&lt;/p&gt;
&lt;p&gt;Alt-Tab inside RDP&lt;/p&gt;
&lt;p&gt;Alt+Shift+Tab&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Compare two directories</title><link>https://sajalchoudhary.net/til/compare-two-directories/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/compare-two-directories/</guid><pubDate>Mon, 26 Sep 2022 10:10:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;dir /s /b &amp;gt; flatfile.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compare pre and post files with fc (file-compare) or powershell using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$File1 = Get-Content file1.txt
$File2 = Get-Content file2.txt
Compare-Object $File1 $File2
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Powershell script&lt;/h1&gt;
&lt;p&gt;Use powershell script for comparisons.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$Dir = &quot;C:\Users\smigmgmt\Desktop\checks&quot;
$Drive = &quot;&quot;
$PrePath = $Dir + &quot;\$Drive&quot; + &quot;pre.txt&quot;
$PostPath = $Dir + &quot;\$Drive&quot; + &quot;post.txt&quot;
$OutPutPath = $Dir + &quot;\$Drive&quot; + &quot;diff.txt&quot;
$Pre = Get-Content -Path $PrePath
$Post = Get-Content -Path $PostPath
Compare-Object -ReferenceObject $Pre -DifferenceObject $Post |
    Select-Object InputObject, SideIndicator |
    Out-File -FilePath $OutPutPath -Width 1000
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows make link</title><link>https://sajalchoudhary.net/til/windows-make-link/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-make-link/</guid><pubDate>Mon, 26 Sep 2022 10:09:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;mklink /d \MyFolder &amp;lt;Share Path&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink&quot;&gt;mklink&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin iperf to check connectivity</title><link>https://sajalchoudhary.net/til/platespin-iperf-to-check-connectivity/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-iperf-to-check-connectivity/</guid><pubDate>Mon, 26 Sep 2022 10:04:00 GMT</pubDate><content:encoded>&lt;p&gt;Download iperf from:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To start any port using iperf:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;iperf -s -p &amp;lt;port&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On target vm&lt;/p&gt;
&lt;p&gt;![[lperf_platespin.png]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin FIPS Error</title><link>https://sajalchoudhary.net/til/platespin-fips-error/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-fips-error/</guid><pubDate>Mon, 26 Sep 2022 10:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Error:&lt;br /&gt;Exception has been thrown by the target of an invocation.&lt;br /&gt;This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.&lt;/p&gt;
&lt;p&gt;You can enable PlateSpin Migrate to suppress errors for non-compliant FIPS algorithms.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In a text editor, open the ofxcontrollerexecution.exe.config file found in this folder:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;install folder&amp;gt;\PlateSpin Migrate Server\Controller\Packages\0\C863075B-8130-4d29-893B-70FF2AD9308C\1
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Add the following element to the runtime section of the file:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;configuration&amp;gt;
    &amp;lt;runtime&amp;gt;
         ...
        &amp;lt;enforceFIPSPolicy enabled=&quot;false&quot;/&amp;gt;
    &amp;lt;/runtime&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Save your changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-11/migrate-user/bug1125663.html?view=print&quot;&gt;https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-11/migrate-user/bug1125663.html?view=print&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin scheduling target machine for provisioning fails</title><link>https://sajalchoudhary.net/til/platespin-scheduling-target-machine-for-provisioning-fails/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-scheduling-target-machine-for-provisioning-fails/</guid><pubDate>Mon, 26 Sep 2022 09:59:00 GMT</pubDate><content:encoded>&lt;p&gt;Scheduling target machine for provisioning fails with&lt;br /&gt;NPART Error: code=28 msg=Device sdb does not have enough free space. (No space left on device)&lt;/p&gt;
&lt;p&gt;On the target VM, press:&lt;br /&gt;Alt F2     &lt;br /&gt;or  &lt;br /&gt;CTRL ALT F2.&lt;br /&gt;At the prompt press 0 to go to a shell. Once you are at the shell run the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dd if=/dev/zero of=/dev/sda  bs=512M count=1 conv=sync
dd if=/dev/zero of=/dev/sdb  bs=512M count=1 conv=sync
dd if=/dev/zero of=/dev/sdc  bs=512M count=1 conv=sync
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once that is complete please reboot the target, run the discovery again and let me know if you still are running into a problem partitioning the target volumes.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin SQL queries</title><link>https://sajalchoudhary.net/til/platespin-sql-queries/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-sql-queries/</guid><pubDate>Mon, 26 Sep 2022 09:57:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;USE protection;
SELECT Id, SourceMachineDisplayName, discoverySourceAddress
FROM Workloads;

DELETE
FROM Workloads
WHERE Id = &apos;&apos;;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin install</title><link>https://sajalchoudhary.net/til/platespin-install/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-install/</guid><pubDate>Mon, 26 Sep 2022 09:55:00 GMT</pubDate><content:encoded>&lt;h1&gt;Automated&lt;/h1&gt;
&lt;p&gt;If proxy is enabled. Then run the powershell script.&lt;/p&gt;
&lt;h1&gt;Manual&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Installing Visual C++ 2013. To install VC++ 2013 on the planned Migrate server:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract the PlateSpinMigrateSetup-2019.5.0.x.exe to a location on the planned server host for PlateSpin Migrate.&lt;/li&gt;
&lt;li&gt;In a file browser, navigate to the ..\Migrate-2019_5\PlateSpinImage\VCruntime-x64 folder.&lt;/li&gt;
&lt;li&gt;Run vcredist_x64.exe as Administrator.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Installing SQL Server Native Client&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download: &lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=50402&quot;&gt;https://www.microsoft.com/en-us/download/details.aspx?id=50402&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;And install.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install dot net core&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download: &lt;a href=&quot;https://download.visualstudio.microsoft.com/download/pr/a46ea5ce-a13f-47ff-8728-46cb92eb7ae3/1834ef35031f8ab84312bcc0eceb12af/dotnet-hosting-2.2.3-win.exe&quot;&gt;https://download.visualstudio.microsoft.com/download/pr/a46ea5ce-a13f-47ff-8728-46cb92eb7ae3/1834ef35031f8ab84312bcc0eceb12af/dotnet-hosting-2.2.3-win.exe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;And install.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now run the script for pre-requisite to install everything.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-5/migrate-install/install-prereq-sw.html#silent-install-vcplusplus%5D(https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-5/migrate-install/install-prereq-sw.html#silent-install-vcplusplus)&quot;&gt;https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-5/migrate-install/install-prereq-sw.html#silent-install-vcplusplus](https://www.microfocus.com/documentation/platespin/platespin-migrate-2019-5/migrate-install/install-prereq-sw.html#silent-install-vcplusplus)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Velero install</title><link>https://sajalchoudhary.net/til/velero-install/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/velero-install/</guid><pubDate>Mon, 26 Sep 2022 09:54:00 GMT</pubDate><content:encoded>&lt;h1&gt;Fresh install&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Extract the tarball.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
tar -xvf velero-v1.6.0-linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Move the velero* file from velero directory to /usr/local/bin/&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
mv velero /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Configure velero&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Refer &lt;a href=&quot;https://github.com/vmware-tanzu/velero-plugin-for-aws&quot;&gt;compatibility matrix&lt;/a&gt; to figure out which version of plugin goes with which version of velero.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
velero install --provider aws --bucket velero --secret-file ./credentials-velero  --use-volume-snapshots=false --backup-location-config region=minio,s3ForcePathStyle=&quot;true&quot;,s3Url=http://10.47.19.232:9000  --use-restic --plugins velero/velero-plugin-for-aws:v1.0.0 –wait

velero install --provider aws --bucket velero --secret-file ./credentials-velero  --use-volume-snapshots=false --backup-location-config region=minio,s3ForcePathStyle=&quot;true&quot;,s3Url=http://10.47.20.119:9000  --use-restic --plugins velero/velero-plugin-for-aws:v1.0.0 –wait
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Check install Status&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
kubectl logs deployment/velero -n velero
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Annotate pods.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
python pod_vol_restic_scan.py -n cisco
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Create backup.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
velero backup create backup-20220621 --include-namespaces=cisco --wait --ttl 48h0m0s
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;List backups.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
velero backup get
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;velero backup create backup-20220308 --include-namespaces=cisco --wait&lt;/p&gt;
&lt;p&gt;velero restore create --from-backup &lt;/p&gt;
&lt;h1&gt;04 Op Ccs Velero&lt;/h1&gt;
&lt;h2&gt;Create backup schedule&lt;/h2&gt;
&lt;p&gt;14 days = 336 hrs&lt;/p&gt;
&lt;p&gt;10 days = 240 hrs&lt;/p&gt;
&lt;p&gt;07 days = 168 hrs&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
velero schedule create ccs-prod --schedule=&quot;@every 24h&quot; --include-namespaces=cisco --ttl 192h0m0s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Velero backup list&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
velero backup get
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Velero take backup&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
velero backup create backup-20210819 --include-namespaces=cisco --wait --ttl 48h0m0s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Delete backup&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
velero backup delete [backup_name]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;kubectl delete namespace/velero clusterrolebinding/velero&lt;/p&gt;
&lt;p&gt;cp velero-v1.3.2-linux-amd64.tar.gz /home/restore/&lt;/p&gt;
&lt;p&gt;tar -xvf velero-v1.3.2-linux-amd64.tar.gz&lt;/p&gt;
&lt;p&gt;cd velero-v1.3.2-linux-amd64&lt;/p&gt;
&lt;p&gt;mv velero /usr/local/bin/&lt;/p&gt;
&lt;p&gt;velero install --provider aws --bucket velero --secret-file ./credentials-velero  --use-volume-snapshots=false --backup-location-config region=minio,s3ForcePathStyle=&quot;true&quot;,s3Url=&lt;a href=&quot;http://10.47.20.119:9000&quot;&gt;http://10.47.20.119:9000&lt;/a&gt;  --use-restic --plugins velero/velero-plugin-for-aws:v1.0.0 –wait&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>CloudRemote docker related</title><link>https://sajalchoudhary.net/til/cloudremote-docker-related/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cloudremote-docker-related/</guid><pubDate>Mon, 26 Sep 2022 09:53:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;## Docker get exited containers count

docker ps -a -q -f status=exited | wc -l

## Docker remove exited containers

docker rm -v $(docker ps -a -q -f status=exited)

docker logs -v $(docker ps -a)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install cliqr agent for vmware cloud</title><link>https://sajalchoudhary.net/til/install-cliqr-agent-for-vmware-cloud/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-cliqr-agent-for-vmware-cloud/</guid><pubDate>Mon, 26 Sep 2022 09:51:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;.\cliqr_installer.exe /CLOUDTYPE=vmware /CLOUDREGION=defau1t
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Download from agents file the cliqr_installer.exe&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Upgrade cloud remote</title><link>https://sajalchoudhary.net/til/upgrade-cloud-remote/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/upgrade-cloud-remote/</guid><pubDate>Mon, 26 Sep 2022 09:50:00 GMT</pubDate><content:encoded>&lt;p&gt;To upgrade Cloud Remote (script available in the Cloud Remote artifact file mentioned in the section above) in your Workload Manager or Cost Optimizer&lt;br /&gt;system, follow this procedure for each instance of Cloud Remote.&lt;br /&gt;Locate the Cloud Remote upgrade script at software.cisco.com and copy it to a directory in your Cloud Remote instance.&lt;br /&gt;Establish a terminal session to the Cloud Remote instance and navigate to the directory containing the upgrade script.&lt;br /&gt;Run the following commands from the Cloud Remote command prompt.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;chmod +x UPGRADE_FILE
sudo ./ UPGRADE_FILE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm the successful execution of the script.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Extend volume</title><link>https://sajalchoudhary.net/til/extend-volume/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/extend-volume/</guid><pubDate>Mon, 26 Sep 2022 09:49:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;lvextend -L +2G &amp;lt;FS&amp;gt; -r
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remove vmware tools</title><link>https://sajalchoudhary.net/til/remove-vmware-tools/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remove-vmware-tools/</guid><pubDate>Mon, 26 Sep 2022 09:47:00 GMT</pubDate><content:encoded>&lt;p&gt;Remove from all three locations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;HKLM \Software\Microsoft\Windows\CurrentVersion\uninstall&lt;/li&gt;
&lt;li&gt;HKLM\Software\Classes\Installer\Products&lt;/li&gt;
&lt;li&gt;HKEY_CLASSES_ROOT\Installer\Products&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt=&quot;Image&quot; /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.vladan.fr/how-to-remove-vmware-tools-manually-if-uninstall-or-upgrade-finish-with-error/&quot;&gt;https://www.vladan.fr/how-to-remove-vmware-tools-manually-if-uninstall-or-upgrade-finish-with-error/&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware increase max NFS on an ESXi</title><link>https://sajalchoudhary.net/til/vmware-increase-max-nfs-on-an-esxi/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-increase-max-nfs-on-an-esxi/</guid><pubDate>Mon, 26 Sep 2022 09:41:00 GMT</pubDate><content:encoded>&lt;p&gt;Default number is 8.&lt;br /&gt;ESXi 6.0/6.7/7.0 : Set NFS.MaxVolumes to 256&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2239&quot;&gt;KB2239&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware SNMP troubleshooting</title><link>https://sajalchoudhary.net/til/vmware-snmp-troubleshooting/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-snmp-troubleshooting/</guid><pubDate>Mon, 26 Sep 2022 09:36:00 GMT</pubDate><content:encoded>&lt;p&gt;Tcpdump command to capture outgoing packets&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tcpdump-uw -v -i vmk# -n -T snmp udp and port 161
# typically port 162; if custom ports are configured use those
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2033528&quot;&gt;VMware KB&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Velero does not delete expired backups automatically</title><link>https://sajalchoudhary.net/til/velero-does-not-delete-expired-backups-automatically/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/velero-does-not-delete-expired-backups-automatically/</guid><pubDate>Mon, 26 Sep 2022 09:35:00 GMT</pubDate><content:encoded>&lt;p&gt;When scheduled backup reach their TTL, the deletion process is started but gets stuck in status &lt;code&gt;Deleting&lt;/code&gt;. The contents are properly deleted, while volume snapshots stay (causing space issue).&lt;br /&gt;To manually delete backups that are stuck in Deleting state:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
kubectl delete backups.velero.io -n velero &amp;lt;backup_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/vmware-tanzu/velero/issues/3094&quot;&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/vmware-tanzu/velero/pull/2993&quot;&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS CLI reference</title><link>https://sajalchoudhary.net/til/ucs-cli-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-cli-reference/</guid><pubDate>Mon, 26 Sep 2022 09:34:00 GMT</pubDate><content:encoded>&lt;h1&gt;Ucs Cheatsheet&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;show interface trunk
show service-profile circuit server 3/3
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;UCS nxos/network/troubleshooting&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;connect nxos

# show npv flogi-table

# show mac address-table
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;UCS NIC related&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;## For overview
# show interface brief


## For particular interface status

# show interface fc1/2

## To check utilization

Shows if anything is on the interface which has issue
# show npv flogi-table
--------------------------------------------------------------------------------
SERVER                                                                  EXTERNAL
INTERFACE VSAN FCID             PORT NAME               NODE NAME       INTERFACE
--------------------------------------------------------------------------------
vfc711    1    0x15070e 20:00:00:25:b5:01:b0:8f 20:00:00:25:b5:01:00:ff fc1/4
vfc747    1    0x150601 20:00:00:25:b5:01:b0:0f 20:00:00:25:b5:01:00:6f fc1/3
vfc753    1    0x150402 20:00:00:25:b5:01:b0:2f 20:00:00:25:b5:01:00:8f fc1/1
vfc759    1    0x15043b 20:00:00:25:b5:01:b0:1f 20:00:00:25:b5:01:00:7f fc1/1
vfc815    1    0x15043d 20:00:00:25:b5:01:b0:6f 20:00:00:25:b5:01:00:ef fc1/1
vfc821    1    0x150710 20:00:00:25:b5:01:b0:7f 20:00:00:25:b5:01:00:bf fc1/4
vfc827    1    0x150705 20:00:00:25:b5:01:b0:ff 20:00:00:25:b5:01:00:4f fc1/4
vfc839    1    0x150704 20:00:00:25:b5:01:b0:ef 20:00:00:25:b5:01:00:2f fc1/4

&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS Commands</title><link>https://sajalchoudhary.net/til/ucs-commands/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-commands/</guid><pubDate>Mon, 26 Sep 2022 09:34:00 GMT</pubDate><content:encoded>&lt;h1&gt;Ucs Cheatsheet&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;show interface trunk
show service-profile circuit server 3/3
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install terraform on ubuntu</title><link>https://sajalchoudhary.net/til/install-terraform-on-ubuntu/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-terraform-on-ubuntu/</guid><pubDate>Mon, 26 Sep 2022 09:33:00 GMT</pubDate><content:encoded>&lt;h2&gt;Install terraform on Ubuntu server&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Add the HashiCorp &lt;a href=&quot;https://apt.releases.hashicorp.com/gpg&quot; title=&quot;HashiCorp GPG key&quot;&gt;GPG key&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Add the official HashiCorp Linux repository.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
sudo apt-add-repository &quot;deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Add the official HashiCorp Linux repository.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install terraform
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;export HTTP_PROXY=&lt;a href=&quot;http://172.21.21.5:3128&quot;&gt;http://172.21.21.5:3128&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;export HTTPS_PROXY=&lt;a href=&quot;https://172.21.21.5:3128&quot;&gt;https://172.21.21.5:3128&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/terraform-providers/terraform-provider-azurerm/tree/master/examples&quot;&gt;Terraform Azure Examples&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;VM Config&lt;/h2&gt;
&lt;h3&gt;Extend LVs&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Check physical volumes.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
pvs
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Extend partition to fill available space. Use &lt;a href=&quot;%5Bhttps://www.systutorials.com/docs/linux/man/1-growpart/%5D(https://www.systutorials.com/docs/linux/man/1-growpart/)&quot;&gt;growpart&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
growpart /dev/sda 3
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Resize physical volume. Use &lt;a href=&quot;%5Bhttps://www.systutorials.com/docs/linux/man/8-pvresize/%5D(https://www.systutorials.com/docs/linux/man/8-pvresize/)&quot;&gt;pvresize&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
pvresize /dev/sda3
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;List logical volumes.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
lvs
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Extend logical volumes.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
lvextend ubuntu-vg/homelv -L 3GB -r

  
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Solarwinds IPAM reference</title><link>https://sajalchoudhary.net/til/solarwinds-ipam-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/solarwinds-ipam-reference/</guid><pubDate>Mon, 26 Sep 2022 09:32:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://github.com/solarwinds/orionsdk-python&quot;&gt;Python&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/solarwinds/OrionSDK/tree/master/Samples/PowerShell&quot;&gt;Powershell&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Concurrent calls return the same IP&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://thwack.solarwinds.com/product-forums/the-orion-platform/f/orion-sdk/46254/concurrent-update-the-same-ipam-ipnode-table-python-orion-sdk/98236#98236&quot;&gt;Thwack Reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When making concurrent calls, i.e. concurrent find first IP and reserve it, it will always have a chance of returning the same result, as these call are without transactional support.&lt;/p&gt;
&lt;p&gt;Hence, we use StartIpReservation/FinishIpReservation/CancelIpReservation trio of verb calls on IPAM.SubnetManagement to make sure that this does not happen.&lt;/p&gt;
&lt;p&gt;Alternate approach is to use a random sleep in the command such that concurrent calls don&apos;t go in. But it doesn&apos;t make sense to put in longer than 10 sec sleep. And the more the number of VMs in the deployment (10 for example) the higher the chances of two random sleeps being the same, and hence the same issue.&lt;/p&gt;
&lt;p&gt;So, we decided to go with the 1st method. The official method.&lt;/p&gt;
&lt;h2&gt;CRUD updates references&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Wyko/DeployACI/blob/85e1988232ca66fbecfcebad5eb97758b06c1cf6/deployaci/swipam.py#L132&quot;&gt;https://github.com/Wyko/DeployACI/blob/85e1988232ca66fbecfcebad5eb97758b06c1cf6/deployaci/swipam.py#L132&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/solarwinds/OrionSDK/wiki/IPAM-2019.4-and-higher-versions-API&quot;&gt;IPAM reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
Set-SwisObject $swis -Uri &apos;swis://localhost/Orion/IPAM.Subnet/SubnetId=100,ParentId=2&apos; -Properties @{VLAN=&apos;test&apos;}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://thwack.solarwinds.com/product-forums/the-orion-platform/f/orion-sdk/98142/swis-rest-api-port-deprecation-did-you-know&quot;&gt;SWIS REST API Port Deprecation, did you know? - Orion SDK - The Orion Platform - THWACK (solarwinds.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Robocopy reference</title><link>https://sajalchoudhary.net/til/robocopy-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/robocopy-reference/</guid><pubDate>Mon, 26 Sep 2022 09:31:00 GMT</pubDate><content:encoded>&lt;h1&gt;robocopy-command&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;net use &quot;&quot; /user:&amp;lt;domainid&amp;gt;
robocopy &quot;&quot; &quot;&quot; /E /COPYALL /R:0 /W:0 /FP /ZB /LOG+:C:\Robologs\F.txt /TEE /MT:128

# Create folder structure only.  
robocopy &quot;source&quot; &quot;target&quot; /e /xf *
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# Copy 
Get-ChildItem -Path $Path -Recurse -File | Copy-Item -Destination &quot;\\opflttru16-52.op.okobank.com\RMK\Burana\Ad-hoc_History_Load\LOAD&quot; -Exclude &apos;buranaout_*&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx&quot;&gt;Robocopy and a Few Examples - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/Forums/security/en-US/0b3d3006-0e0f-4c95-9e2f-4c820832ebfa/using-robocopy-to-copy-folder-structure-only?forum=w7itprogeneral&quot;&gt;itprolink&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://cects.com/copying-directory-structures-without-files/&quot;&gt;online link&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Linux disable ipv6</title><link>https://sajalchoudhary.net/til/linux-disable-ipv6/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/linux-disable-ipv6/</guid><pubDate>Mon, 26 Sep 2022 09:30:00 GMT</pubDate><content:encoded>&lt;h1&gt;RHEL-disable-ipv6&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;vi /etc/sysctl.d/ipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
sysctl -p /etc/sysctl.d/ipv6.conf
dracut -f
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remove cloud-init</title><link>https://sajalchoudhary.net/til/remove-cloud-init/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remove-cloud-init/</guid><pubDate>Mon, 26 Sep 2022 09:29:00 GMT</pubDate><content:encoded>&lt;h1&gt;Remove-cloud-init&lt;/h1&gt;
&lt;h2&gt;Stop services&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;systemctl stop cloud-init.service
systemctl disable cloud-init.service
systemctl stop cloud-init-local.service
systemctl disable cloud-init-local.service
systemctl stop cloud-config.
systemctl stop cloud-config.service
systemctl disable cloud-config.service
systemctl stop cloud-final.service
systemctl disable cloud-final.service
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Remove cloud-init&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;### Find cloud-init pakage
rpm -qa | grep cloud-init

### Remove the package found in step above
rpm -e &amp;lt;cloud-init*&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell Issues with Returned Values from Remote Sessions</title><link>https://sajalchoudhary.net/til/powershell-issues-with-returned-values-from-remote-sessions/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-issues-with-returned-values-from-remote-sessions/</guid><pubDate>Mon, 26 Sep 2022 09:27:00 GMT</pubDate><content:encoded>&lt;h2&gt;Issue Description&lt;/h2&gt;
&lt;p&gt;In case of using Get-Child/Get-ChildItem to return registry values, the returned output is formatted according to the local system even if you ran the command remotely. [^1]&lt;/p&gt;
&lt;p&gt;This behaviour is because of the fact that PowerShell returns a calculated Property value alongside the Get-Item/Get-ChildItem values. This is useful when running the command locally, but when running the command remotely, the returned output is compared against the local copy of the registry. This causes issues, as referenced in [1] and also when developing the script to get proxy details.&lt;/p&gt;
&lt;h2&gt;Cause&lt;/h2&gt;
&lt;p&gt;The root cause is a bug in the formatting instructions for registry keys (as of Windows PowerShell 5.1.18362.125 and PowerShell Core 7.0.0-preview.2) leading to the unexpected mix of remote and local information - see &lt;a href=&quot;https://github.com/PowerShell/PowerShell/issues/10341&quot;&gt;this GitHub issue&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From the bottom of $PSHOME\Registry.format.ps1xml for type Microsoft.Win32.RegistryKey:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;ScriptBlock&amp;gt;

  $result = (Get-ItemProperty -LiteralPath $_.PSPath |

      Select * -Exclude PSPath,PSParentPath,PSChildName,PSDrive,PsProvider |

      Format-List | Out-String | Sort).Trim()

  $result = $result.Substring(0, [Math]::Min($result.Length, 5000) )

  if($result.Length -eq 5000) { $result += &quot;...&quot; }

  $result

&amp;lt;/ScriptBlock&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Fix/Work-around&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When returning output, you can either return only the values you require as a custom PS custom object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;code&gt;| fl*&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In my case, run all the queries as part of script block. Create a PS Custom object with values I require, and then return it after everything is done.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;[1]: (StackOverflow Post)&lt;a href=&quot;https://stackoverflow.com/questions/57400948/invoke-command-on-remote-session-returns-local-values&quot;&gt;https://stackoverflow.com/questions/57400948/invoke-command-on-remote-session-returns-local-values&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell DNS reference</title><link>https://sajalchoudhary.net/til/powershell-dns-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-dns-reference/</guid><pubDate>Mon, 26 Sep 2022 09:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Powershell General Commands&lt;/h1&gt;
&lt;h2&gt;Find DNS record&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Get-DnsServerResourceRecord -ZoneName &quot;kehi.okobank.net&quot; | Where-Object {$_.HostName -eq &apos;devopstester&apos;}

# DNS record based on type
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Create DNS record&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://adamtheautomator.com/powershell-dns/&quot;&gt;PowerShell-DNS-Reference&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/powershell/module/dnsserver/add-dnsserverresourcerecord?view=windowsserver2022-ps&quot;&gt;Add-DnsServerResourceRecord (DnsServer) | Microsoft Learn&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>dns</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell Centos Reference</title><link>https://sajalchoudhary.net/til/powershell-centos-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-centos-reference/</guid><pubDate>Mon, 26 Sep 2022 09:05:00 GMT</pubDate><content:encoded>&lt;h2&gt;Linux Directories&lt;/h2&gt;
&lt;p&gt;$PSHOME is /opt/microsoft/powershell/7/&lt;br /&gt;User profiles are read from ~/.config/powershell/profile.ps1&lt;br /&gt;Default profiles are read from $PSHOME/profile.ps1&lt;br /&gt;User modules are read from ~/.local/share/powershell/Modules&lt;br /&gt;Shared modules are read from /usr/local/share/powershell/Modules&lt;br /&gt;Default modules are read from $PSHOME/Modules&lt;br /&gt;PSReadLine history is recorded to ~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Platespin Windows PreReqs</title><link>https://sajalchoudhary.net/til/platespin-windows-prereqs/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/platespin-windows-prereqs/</guid><pubDate>Thu, 22 Sep 2022 07:05:00 GMT</pubDate><content:encoded>&lt;h1&gt;PlateSpinPrechecks&lt;/h1&gt;
&lt;p&gt;•   Disable UAC&lt;br /&gt;•   .Net 3.5&lt;br /&gt;•   1 GB free on OS drive&lt;br /&gt;•   Admin$ IPC$, C$ Share enabled and shoudl be accessible from Platespin server&lt;br /&gt;•   Verify WMI is enabled  - Start -&amp;gt; Run -&amp;gt;  wbemtest&lt;br /&gt;•   Verify DCOM installed and running on all servers in Migrate - Start -&amp;gt; Run -&amp;gt; dcomcnfg&lt;br /&gt;•   VSS Service (Snapshot) to be enabled&lt;br /&gt;•   Make sure there is 10% free space (In all the partitions / Volumes / LVMs) and VSS Snapshot enabled&lt;br /&gt;•   Dependency (Firewall, IP Filters) &quot; Refer to KB Article to &lt;a href=&quot;https://www.netiq.com/support/kb/doc.php?id=7920341&quot;&gt;https://www.netiq.com/support/kb/doc.php?id=7920341&lt;/a&gt;&lt;br /&gt;•   Ensure hostname is responding back on Prod IP&lt;/p&gt;
&lt;h1&gt;Cluster Specific pre checks&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Discover the active node as a Windows Cluster&lt;/li&gt;
&lt;li&gt;All the instances to be on single node and secondary node to be paused in failover cluster so that during the platespin copy instances should not failover to other node&lt;/li&gt;
&lt;li&gt;Minimum 10% free space should be available&lt;/li&gt;
&lt;li&gt;On the source server, we would require volume details with drive letters&lt;/li&gt;
&lt;li&gt;Screenshot of failover cluster, instances and quorum details required.&lt;/li&gt;
&lt;li&gt;On the target server once server is up, team to validate the volume and drive letters and rectify the change in case there is a change&lt;/li&gt;
&lt;li&gt;To open the failover cluster, we require domain rights and reconfigure the cluster with proper volume and drive letters.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;•   On PlateSpin Server DiscoverActiveNodeAsWindowsCluster=False (default is True)&lt;br /&gt;•   Domain Account to access the Failover cluster Manager to check source settings like Disk Order, other dependency&lt;br /&gt;•   Ensure resources are running on one node&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Openstack cheat sheet</title><link>https://sajalchoudhary.net/til/openstack-cheat-sheet/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openstack-cheat-sheet/</guid><pubDate>Thu, 22 Sep 2022 07:02:00 GMT</pubDate><content:encoded>&lt;h1&gt;Openstack Cheat Sheet&lt;/h1&gt;
&lt;h2&gt;Volume&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;openstack volume create --size 25 --description 7OCIWPPOCAP01_DATA_DISK1 --type OP-ES-OPPT-T2 7OCIWPPOCAP01_DATA_DISK1

nova volume-attach 7OCIWPPOCAP01 58fdd51a-e3bc-4d80-983d-e8d9f2828094
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Compute&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;nova interface-list {hostname}
nova interface-detach {hostname} {port-id}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Network&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;gbp group-list
openstack port list
openstack port delete {port-id}
openstack port show {port-id}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Remove interface&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nova interface-list 7OGBWPCENAP01
nova interface-detach 7OCIWPSWAPE16 8e4237df-9dec-4f59-9316-89a56ce97ddc
neutron port-delete 52a02dbb-36d8-4ac6-8042-28a48dd9a98a
nova interface-attach --port-id 93610a8b-4003-473f-a9b0-64e403f123e7 7OGBWPSAPAP02
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Reserve IPs&lt;/h3&gt;
&lt;h3&gt;epg-Trusted-Devops-Test&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Trusted-Devops-Test --fixed-ip subnet_id=8996ed17-fff7-4742-84cb-b4466102cc4e,ip_address=10.45.59.252 SWIPAM_rsrvd_ip

  
  
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;epg-Trusted-Devops-Prod&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Trusted-Devops-Prod --fixed-ip subnet_id=f4861689-8893-4934-8662-9b1835581cd2,ip_address=10.45.59.252 SWIPAM_rsrvd_ip

  
  

gbp policy-target-create --policy-target-group epg-Trusted-Devops-Prod 7OGBWPMCIAP01_rsrvd_ip

nova interface-attach --port-id 03294e0d-3eb0-40da-a55b-d072459dd7e1 7OGBWPMCIAP01

nova interface-detach 7OGBWPMCIAP01 39beb2a3-93ec-441d-bfcd-84abfde63c44

neutron port-delete 39beb2a3-93ec-441d-bfcd-84abfde63c44
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;epg-Heartbit-L2-Vlan-267&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Heartbit-L2-Vlan-267 --fixed-ip subnet_id=e2377dc9-9f69-462e-9e8f-0f60f7464cf1,ip_address=10.45.181.119 5OCIWTEXGAP02_rsrvd_ip

nova interface-attach --port-id fa474fa4-5955-41ec-9224-af544e337e3f 5OCIWTEXGAP02

gbp policy-target-create --policy-target-group epg-Heartbit-L2-Vlan-267 --fixed-ip subnet_id=e2377dc9-9f69-462e-9e8f-0f60f7464cf1,ip_address=10.45.181.120 7OCIWTEXGAP01_rsrvd_ip

nova interface-attach --port-id f1b00083-c2b3-4fc9-8b21-fa696c87393e 7OCIWTEXGAP01
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-Audit-Zone&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Audit-Zone --fixed-ip subnet_id=76eedfa2-6362-4bae-9a0d-e334e196e4f2,ip_address=10.45.128.47 5OCILPBCTAP01_rsrvd_ip

gbp policy-target-create --policy-target-group epg-Audit-Zone --fixed-ip subnet_id=76eedfa2-6362-4bae-9a0d-e334e196e4f2,ip_address=10.45.128.48 5OCILPBCTAP02_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Trusted-Devops-Prod-VLAN3262&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=10.129.102.210

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=

gbp policy-target-create --policy-target-group epg-OP-Trusted-Devops-Prod-VLAN3262 --fixed-ip subnet_id=c5c6c497-707f-4ca5-b18d-b47155c96c66,ip_address=
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Trusted-Test2-VLAN3083&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-OP-Trusted-Test2-VLAN3083 --fixed-ip subnet_id=5b943a39-0f06-4524-8253-eeee1a9dfcb2,ip_address=10.128.100.144 OGBWTAVACL01_rsrvd_ip

nova interface-attach --port-id cc615e5c-2558-4e0a-8225-58893988aa6b 7ogbwtdocap01

nova interface-detach 7ogbwtdocap01 58c53acd-135e-4dd8-a894-3112701b1630

neutron port-delete 58c53acd-135e-4dd8-a894-3112701b1630
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Control-Zone&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-OP-Control-Zone --fixed-ip subnet_id=2f04a7cb-c676-412b-9183-02122c8a4be8,ip_address=10.45.99.233 7oczlpecsap01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-Trusted-FLT&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-Trusted-FLT --fixed-ip subnet_id=fb88cf28-91eb-400c-a10a-f04616e67346,ip_address=10.45.39.198 PRDISAM01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-DMZ-FLT&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-DMZ-FLT --fixed-ip subnet_id=f2cecd7e-1bef-4610-82f9-307ec9a372ff,ip_address=10.45.4.150 7OGBLPIAMAP01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-DMZ-Dev&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-DMZ-Dev --fixed-ip subnet_id=3686f7a3-7755-4d4f-80ce-2a5011ad735b,ip_address=10.45.23.201 5OGBLDIAMAP01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-DMZ-Test 10.45.16.0/22&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-DMZ-Test --fixed-ip subnet_id=d1413a33-7a81-4563-a63f-fa0e0c9d4f02,ip_address=10.45.19.151 5OGBLTIAMAP01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-trusted-test 10.45.48.0/22&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-trusted-test --fixed-ip subnet_id=34c45edd-4e9b-4620-8efe-faef869aab9f,ip_address=10.45.51.235 OCIWTFTIFS01_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-trusted-test&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-trusted-test --fixed-ip subnet_id=0b3bf2dc-6d58-409e-8ece-ff36f4ade038,ip_address=10.45.244.234 MIFID2NTP03_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-Trusted-Dev&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Trusted-Dev --fixed-ip subnet_id=af8fcf51-42d4-455d-b3bb-061829db3652,ip_address=10.45.55.210 rhel79_rsrvd_ip
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Trusted-FLT2-VLAN3100&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-OP-Trusted-FLT2-VLAN3100 --fixed-ip subnet_id=8fea6f7f-b724-40ae-8fbd-f95f192c7fd1,ip_address=10.140.16.145 7ocilpmqaap01_rsrvd_ip

  

nova interface-attach --port-id cb8f7b39-fba8-4277-9d3d-10d6cded2a7d 7ogbwpft3ap01

nova interface-detach 7ogbwpft3ap01 97ddb931-3d4f-42fe-a34b-65094d21af8b

neutron port-delete 97ddb931-3d4f-42fe-a34b-65094d21af8b

  
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-FLT-Restricted-VLAN3225&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-OP-FLT-Restricted-VLAN3225 --fixed-ip subnet_id=667a81b0-67cb-40e6-b5ff-12cdf901d8a3,ip_address=10.128.175.156 7ocilpmdbdb01_gbpui

nova interface-attach --port-id 9381a2ce-09c9-4d90-a8a3-f07cbe772430 7ocilpmdbdb01

nova interface-detach 7ocilpmdbdb01 25dcba60-f09d-4bf9-92b9-2129fc51e4ca

neutron port-delete 25dcba60-f09d-4bf9-92b9-2129fc51e4ca
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-FLT-Trusted-VLAN3306&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-OP-FLT-Trusted-VLAN3306 --fixed-ip subnet_id=c3f5b87d-c251-440b-9e9d-ab061686f398,ip_address=10.243.111.15 7OCILPHCPAP01_gbpui
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Trusted-Tuki-VLAN3128&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-OP-Trusted-Tuki-VLAN3128 --fixed-ip subnet_id=97cd8e88-fd2f-4b26-81f3-cbcd2c49f0e1,ip_address=10.140.49.67 7OGBWPSAPAP02_gbpui
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-OP-Trusted-Dev-VLAN3292&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --tenant-id 0ecd949fad4f4c6781515574ea37ba18 --policy-target-group epg-OP-Trusted-Dev-VLAN3292 --fixed-ip subnet_id=23ee9d7e-d711-4cbe-adce-e6c017853f12,ip_address=10.132.182.120 7ogbwddocap01_gbpui

nova interface-attach --port-id 7f603f40-79d4-491e-8846-62e251a6ed72 7ogbwddocap01

nova interface-detach 7ogbwddocap01 5e39b4a2-cb98-4273-b328-19c0a00bcc81

neutron port-delete 5e39b4a2-cb98-4273-b328-19c0a00bcc81
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;epg-Backup-Client&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;
gbp policy-target-create --policy-target-group epg-Backup-Client 5OCIWPDLPAP01_gbpui
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Create Volume&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
openstack volume create --size 50 --description 5OCILISSAP02_DATA_DISK1 --type OP-HE-LOPTT-T2 5OCILISSAP02_DATA_DISK1

openstack server add volume 7OGBWPCENAP01 6a34d3fb-bb38-4092-8682-867c39319c8c

openstack volume show 6a34d3fb-bb38-4092-8682-867c39319c8c
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware offline snapshots</title><link>https://sajalchoudhary.net/til/vmware-offline-snapshots/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-offline-snapshots/</guid><pubDate>Thu, 22 Sep 2022 06:36:00 GMT</pubDate><content:encoded>&lt;h1&gt;Why?&lt;/h1&gt;
&lt;p&gt;When using multiple vCenters in the same Single Sign on Domain (Enhanced Linked Mode), there is high potential of corruption of the domain if no offline snapshots are taken of all nodes before the changes.&lt;/p&gt;
&lt;h1&gt;Revert&lt;/h1&gt;
&lt;p&gt;If a change must be reverted, all nodes of the Enhanced Linked Mode domain have to be restored back to this offline/consistent snapshot. All nodes must be reverted to the snapshots first, before powering any on.&lt;/p&gt;
&lt;h1&gt;Examples when this must be done&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;vCenter Server Updates (Full Version, Update Release, or Patch Release).&lt;/li&gt;
&lt;li&gt;Using the lsdoctor tool to make any changes.&lt;/li&gt;
&lt;li&gt;Adding a new vCenter Server to an existing SSO domain.&lt;/li&gt;
&lt;li&gt;Retiring a vCenter Server from an existing SSO domain.&lt;/li&gt;
&lt;li&gt;Certificate Replacement (Machine, CA, STS, etc).&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Caution&lt;/h1&gt;
&lt;p&gt;Disable VCHA before taking snapshot backups.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/85662&quot;&gt;VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice (85662)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware using lsdoctor tool</title><link>https://sajalchoudhary.net/til/vmware-using-lsdoctor-tool/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-using-lsdoctor-tool/</guid><pubDate>Thu, 22 Sep 2022 06:30:00 GMT</pubDate><content:encoded>&lt;h1&gt;Options&lt;/h1&gt;
&lt;h2&gt;Trustfix&lt;/h2&gt;
&lt;p&gt;This option corrects SSL trust mismatch issues in the lookup service.  The lookup service registrations may have an SSL trust value that doesn’t match the MACHINE_SSL_CERT on port 443 of the node.  This can be caused by a failure during certificate replacement, among other failures.&lt;/p&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Before running this tool, need to take offline snapshots.&lt;/li&gt;
&lt;li&gt;Unzip.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;unzip lsdoctor.zip
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Launching the tool.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;# Trustfix option
python lsdoctor.py -t
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Restart all services&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;service-control --status

## Stop all
service-control --stop --all

## Start
service-control --start --all
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/80469&quot;&gt;Using the &apos;lsdoctor&apos; Tool (80469) (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Kubernetes Pods Certificate Related</title><link>https://sajalchoudhary.net/til/kubernetes-pods-certificate-related/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/kubernetes-pods-certificate-related/</guid><pubDate>Wed, 21 Sep 2022 09:51:00 GMT</pubDate><content:encoded>&lt;h2&gt;Rabbitmq Cert health status - should be ok for both&lt;/h2&gt;
&lt;p&gt;kubectl -n cisco exec -t cloudcenter-shared-rabbitmq-0 -- bash -c &quot;openssl verify -verbose -CAfile /secrets/c2ssl/ca/ca_certificate.pem /secrets/c2ssl/cert/certificate.pem&quot;&lt;/p&gt;
&lt;h2&gt;To check duration for certificates&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
kubectl get certs --all-namespaces  -o=custom-columns=NAME:.metadata.name,SECRET:.spec.duration
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;To check expiry date for certificates, sorted earliest expiry to latest&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;kubectl get cert -A -o jsonpath=&apos;{range .items[*]}{.status.notAfter}{&quot;\t&quot;}{.metadata.namespace}{&quot;\t&quot;}{.metadata.name}{&quot;\n&quot;} {end}&apos; | sort -n

kubectl -n cisco get secret -o wide | grep &apos;kubernetes.io/tls&apos; | awk &apos;{print $1}&apos; | xargs -i sh -c &quot;printf &apos;%-50s; %-5s&apos; {}; kubectl -n cisco get secret {} -o jsonpath=&apos;{.data.tls\.crt}&apos; | base64 -d | openssl x509 -noout -enddate&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;To check for expiry date for certificates&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
for s in `kubectl get secrets -n cisco | grep  &quot;kubernetes.io/tls&quot; | awk &apos;{ print $1 }&apos;`; do dend=`kubectl get secret $s -n cisco -o json | jq -r &apos;.data.&quot;tls.crt&quot;&apos; | base64 -d | openssl x509 -enddate -noout`; echo $s\t$dend; done;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Instructions to perform activity for setting cert duration&lt;/h2&gt;
&lt;p&gt;There are actually 2 more things we will need to do, note that it will require a downtime.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Recreate the “duration” variable which was deleted from the certificate by the old (now removed) cert-manager.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regenerate the certificate.  Regarding this second point (steps 3 and 4 below), it should normally be done automatically, but the engineering team couldn’t give the guarantee that it will happen so they suggested to regenerate manually the certificates, which requires a downtime to restart the pods.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here are script format of the different activities this will require.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Collect a backup of all the certificates and secrets in case something goes wrong (create a script and execute it):&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
#!/bin/bash

namespace=&quot;cisco&quot;

mkdir -p $namespace

for n in $(kubectl -n $namespace get secrets -o custom-columns=:metadata.name | grep -v &apos;service-account&apos;)

do

    echo &quot;Saving $namespace/secret_$n...&quot;

    kubectl -n $namespace get secret $n -o yaml &amp;gt; $namespace/secret_$n.yaml

done

for n in $(kubectl -n $namespace get cert -o custom-columns=:metadata.name)

do

    echo &quot;Saving $namespace/cert_$n...&quot;

    kubectl -n $namespace get cert $n -o yaml &amp;gt; $namespace/cert_$n.yaml

done
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Update the duration field in all the certificates (create a script and execute it):&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
#! /bin/bash

for s in $(kubectl -n cisco get certs -o=custom-columns=NAME:.metadata.name,SECRET:.spec.secretName | tail -n +2 | awk &apos;{print $1}&apos;)

do

    kubectl patch cert $s --patch &apos;{&quot;spec&quot;: {&quot;duration&quot;: &quot;19680h&quot;}}&apos; --type=merge -n cisco

done
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Delete the secrets storing the old certificates (run the command), ignore the error “error: resource(s) were provided, but no name, label selector, or --all flag specified”:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
kubectl -n cisco get cert -o jsonpath=&apos;{range .items[*]}{.spec.secretName}{&quot;\n&quot;}&apos; | awk &apos;{cmd=&quot;kubectl -n cisco delete secret &quot;$1; system(cmd)}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Restart all the pods to regenerate the certificates (this generates a downtime of several minutes).&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
kubectl delete --all pods -n=cisco
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Step 2 is required and can be performed whenever you want (I suggest to do it as soon as possible).  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Regarding steps 3 and 4, either plan at your earliest convenience or first monitor the certificates to see if they get automatically renewed using the command below.  This second option has the advantage to probably require no downtime, but require some monitoring.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;
kubectl get cert -A -o jsonpath=&apos;{range .items[*]}{.status.notAfter}{&quot;\t&quot;}{.metadata.namespace}{&quot;\t&quot;}{.metadata.name}{&quot;\n&quot;} {end}&apos; | sort -n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The backup taken in step 1 can be restored using this script:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
#!/bin/bash

namespace=cisco

echo &quot;Restoring Opaque Secrets via YAML..&quot;

for n in $namespace/*.yaml; do

        [ -f &quot;$n&quot; ] || break

        if [[ $n =~ &quot;secret_&quot; ]]; then

                echo &quot;Restoring Secret via yaml file $n...&quot;

                kubectl apply -f &quot;$n&quot;

        fi

done

echo &quot;Restoring Certs via YAML&quot;

for n in $namespace/*.yaml; do

        [ -f &quot;$n&quot; ] || break

        if [[ $n =~ &quot;cert&quot; ]]; then

                echo &quot;Restoring Cert via yaml file $n...&quot;

                kubectl apply -f &quot;$n&quot;

        fi

done

  

echo &quot;Restarting all CCS Pods...&quot;

kubectl delete --all pods --namespace=$namespace
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Kubernets certificate expiry fix</title><link>https://sajalchoudhary.net/til/kubernets-certificate-expiry-fix/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/kubernets-certificate-expiry-fix/</guid><pubDate>Wed, 21 Sep 2022 09:49:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a&gt;Cisco documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/&quot;&gt;Kubernetes documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-alpha/&quot;&gt;Kubernetes Alpha Kubeadm Documentation&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to a master node, and sudo su - to become root.&lt;/li&gt;
&lt;li&gt;Backup your old certificates and keys. This is not required but recommended. Make a backup directory and copy these files to it.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;$ sudo cp -a /etc/kubernetes/ .
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Use kubeadm alpha certs to renew the certificates:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
admin@ccs-52-rcdn-74601e81-d5f0-4178-mg-1-1201e401a1:/etc/kubernetes$ sudo kubeadm alpha certs renew all --v=5
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Regenerate the kubernetes .conf files by kubeadm alpha kubeconfig:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
kubeadm alpha kubeconfig user --org system:masters --client-name kubernetes-admin &amp;gt; /etc/kubernetes/admin.conf

kubeadm alpha kubeconfig user --client-name system:kube-controller-manager &amp;gt; /etc/kubernetes/controller-manager.conf

kubeadm alpha kubeconfig user --client-name system:kube-scheduler &amp;gt; /etc/kubernetes/scheduler.conf

kubeadm alpha kubeconfig user --org system:nodes --client-name system:node:$(hostname) &amp;gt; /etc/kubernetes/kubelet.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;If there is a file /etc/kubernetes/node.conf in the system, replace it with a copy of the new admin.conf file and edit it to replace the VIP with the local IP of the node:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
cp /etc/kubernetes/admin.conf /etc/kubernetes/node.conf

vi node.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Export your new admin.conf file to your host.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

chown $(id -u):$(id -g) $HOME/.kube/config

chmod 777 $HOME/.kube/config

export KUBECONFIG=.kube/config
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reboot the master node via shutdown -r now.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perform above steps for all master nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify kubernetes status using kubectl get nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only do steps 19-25 on each worker IF they show as NotReady and having issues. On later clusters you might not have to do this. On one master, generate a new join token via kubeadm token create --print-join-command. Copy that command for later use.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
[root@cx-ccs-prod-master-d7f34f25-f524-4f90-9037-7286202ed13a1 k8s-mgmt]# kubeadm token create --print-join-command

kubeadm join 192.168.1.14:6443 --token m1ynvj.f4n3et3poki88ry4

 --discovery-token-ca-cert-hash

sha256:4d0c569985c1d460ef74dc01c85740285e4af2c2369ff833eed1ba86e1167575
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install stuff on alpine linux using apk</title><link>https://sajalchoudhary.net/til/install-stuff-on-alpine-linux-using-apk/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-stuff-on-alpine-linux-using-apk/</guid><pubDate>Wed, 21 Sep 2022 09:48:00 GMT</pubDate><content:encoded>&lt;h1&gt;Command to install using local .apk file&lt;/h1&gt;
&lt;p&gt;apk add --no-cache --no-network --repositories-file=/dev/null --allow-untrusted /tmp/ca-certificates-20190108-r0.apk&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware remove datastores</title><link>https://sajalchoudhary.net/til/vmware-remove-datastores/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-remove-datastores/</guid><pubDate>Wed, 21 Sep 2022 09:47:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt; Power down all VMs on the datastore you wish to remove.&lt;/li&gt;
&lt;li&gt; Unregister all powered down VMs from inventory.&lt;/li&gt;
&lt;li&gt; Unmount the datastore from all hosts.&lt;/li&gt;
&lt;li&gt; Detach the device from all hosts.&lt;/li&gt;
&lt;li&gt; Rescan for storage devices.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Handling Reboots in Workload Manager</title><link>https://sajalchoudhary.net/til/handling-reboots-in-workload-manager/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/handling-reboots-in-workload-manager/</guid><pubDate>Wed, 21 Sep 2022 09:45:00 GMT</pubDate><content:encoded>&lt;p&gt;Reboots in CCS Workload manager are of two types:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Internal reboot, which happens during initialization&lt;/li&gt;
&lt;li&gt;External reboot, which can be triggered by user.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are separate workflows for both.&lt;/p&gt;
&lt;p&gt;For reboots, during node initialization, the agent performs reboot after coming across the .cliqrRebootResumeInit file in OSMOSIX_HOME directory. We do not directly write to this file present in OSMOSIX_HOME directory, instead we write to the files present in tmp directory, present at root.&lt;/p&gt;
&lt;p&gt;In the approach we are using, we create two files in the tmp directory, .cliqrRebootResumeInit (which the agent copies over to the OSMOSIX_HOME directory) and the .step file which keeps track of the number of reboots.&lt;/p&gt;
&lt;p&gt;The .cliqrRebootResumeInit file contails the #!CliQrReboot: header flag which basically tells the agent which lifecycle flow to go to next.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
Some options:

#!CliQrReboot:Current --&amp;gt; to resume the current lifecycle action

#!CliQrReboot:Next to resume to next step in the lifecycle actions

#!CliQrReboot:Deploy to resume from deploy service lifecycle actions
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;To use the .#!CliQrReboot: header, you must use ASCII encoding&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Remove IP from cluster NIC</title><link>https://sajalchoudhary.net/til/remove-ip-from-cluster-nic/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/remove-ip-from-cluster-nic/</guid><pubDate>Wed, 21 Sep 2022 09:43:00 GMT</pubDate><content:encoded>&lt;p&gt;To remove IP from the microsoft cluster nic&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;netsh interface ip set address “Local Area Connection” dhcp
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Assigning Multiple IPs to Single NIC</title><link>https://sajalchoudhary.net/til/assigning-multiple-ips-to-single-nic/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/assigning-multiple-ips-to-single-nic/</guid><pubDate>Wed, 21 Sep 2022 09:29:00 GMT</pubDate><content:encoded>&lt;h1&gt;Issue:&lt;/h1&gt;
&lt;p&gt;When adding multiple IPs to a single NIC, DNS entry keep getting updated with the IPs which are not primary.&lt;/p&gt;
&lt;h1&gt;Fix:&lt;/h1&gt;
&lt;h2&gt;To list IPs&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Get-NetIPAddress -AddressFamily IPv4 | ft IPAddress, InterfaceAlias, SkipAsSource
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Add new IP&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;New-NetIPAddress –IPAddress &quot;10.45.38.22&quot; –PrefixLength 22 –InterfaceAlias “Prod” –SkipAsSource $True
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Set skip as source property&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Get-NetIPAddress 192.168.1.92 | Set-NetIPAddress -SkipAsSource $False
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;http://woshub.com/assign-multiple-ip-addresses-single-nic-windows/&quot;&gt;Online reference&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ucs Changing Mtu Value Results in Esxi Not Booting and Other Issues</title><link>https://sajalchoudhary.net/til/ucs-changing-mtu-value-results-in-esxi-not-booting-and-other-issues/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-changing-mtu-value-results-in-esxi-not-booting-and-other-issues/</guid><pubDate>Wed, 21 Sep 2022 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;Related to the following bug:&lt;br /&gt;&lt;a href=&quot;https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvs72258&quot;&gt;Cisco Link&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Conditions&lt;/h2&gt;
&lt;p&gt;Issue is specific to UCS-FI-6332-16UP.&lt;/p&gt;
&lt;p&gt;Only impacted on firmware &amp;gt;= 4.0.  Earlier versions (3.2(3) and below) are NOT impacted.&lt;/p&gt;
&lt;p&gt;Other Fabric Interconnect models are not affected&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Issue occurs after change of System QOS from default values when FC ports were up/enabled from most recent boot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Issue does not occur if System QOS has been changed from default values and Fabric Interconnect has been rebooted previously&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: Default System QOS has only FC and Best Effort Ethernet enabled, with 50% weight each, with Normal MTU for Best Effort Ethernet.&lt;/p&gt;
&lt;p&gt;Any System QOS configuration which differs from this is not a default configuration.&lt;/p&gt;
&lt;p&gt;Most common trigger is to change Best Effort MTU to 9216 to allow Jumbo frames, however any System QOS change can trigger issue.&lt;/p&gt;
&lt;p&gt;Immediately reverting the change does not recover the environment.&lt;/p&gt;
&lt;h2&gt;Workaround&lt;/h2&gt;
&lt;p&gt;If the domain has no FC workload (e.g. UCS domain is having initial setup done), then:&lt;/p&gt;
&lt;p&gt;Disable all FC ports&lt;/p&gt;
&lt;p&gt;Make System QOS changes&lt;/p&gt;
&lt;p&gt;Enable all FC ports&lt;/p&gt;
&lt;p&gt;If System QOS changes need to be made after FC ports are configured and being used, then to have minimal impact:&lt;/p&gt;
&lt;p&gt;Reduce FC IOPS as much as possible&lt;/p&gt;
&lt;p&gt;Make System QOS changes&lt;/p&gt;
&lt;p&gt;Disable FC ports&lt;/p&gt;
&lt;p&gt;Enable FC Ports&lt;/p&gt;
&lt;p&gt;If immediate recovery is needed, disable/enable of all configured FC ports will recover the issue.&lt;/p&gt;
&lt;p&gt;Avoid changing back to Default System QOS setting in the future until on a fixed release&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;QoS system class requires FI reboots as per &lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/Network-Mgmt/4-0/b_UCSM_Network_Mgmt_Guide_4_0/b_UCSM_Network_Mgmt_Guide_4_0_chapter_01000.html&quot;&gt;this document&lt;/a&gt;: Cisco UCS Manager Network Management Guide, Release 4.0 - Quality of Service [Cisco UCS Manager] - Cisco&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>esxi</category><category>cisco</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform azure reference</title><link>https://sajalchoudhary.net/til/terraform-azure-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-azure-reference/</guid><pubDate>Wed, 21 Sep 2022 09:24:00 GMT</pubDate><content:encoded>&lt;h1&gt;Details&lt;/h1&gt;
&lt;p&gt;DB Name - sbwehcmsqldb_poc&lt;br /&gt;Server Name - sbwehcmsqldbserver_poc&lt;br /&gt;Region - West Europe&lt;br /&gt;Compute - Basic, 2 GB storage&lt;/p&gt;
&lt;h2&gt;Terraform VM&lt;/h2&gt;
&lt;h2&gt;Azure&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;SP login&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
az login --service-principal -u 562ee4ba-6359-4e5d-a4d6-83de64a445f2 -p \_hvmAThuf7R\_41J2hF05HLr.34v-CpFFOg --tenant 0fadfa8b-6e6e-44b1-a381-6203bfe1a199
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;List all az groups&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
 az group list --subscription &quot;bf1dbcea-044c-4e6d-ad6c-d54cecf69616&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Get resource group: Sandbox RG: &lt;a href=&quot;https://portal.azure.com/#@tryg.onmicrosoft.com/resource/subscriptions/bf1dbcea-044c-4e6d-ad6c-d54cecf69616/resourceGroups/WE-HCM-RG-POC&quot; title=&quot;https://portal.azure.com/#@tryg.onmicrosoft.com/resource/subscriptions/bf1dbcea-044c-4e6d-ad6c-d54cecf69616/resourcegroups/we-hcm-rg-poc&quot;&gt;WE-HCM-RG-POC&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
$ az group show --name WE-HCM-RG-POC --subscription &quot;bf1dbcea-044c-4e6d-ad6c-d54cecf69616&quot;                                         {

  &quot;id&quot;: &quot;/subscriptions/bf1dbcea-044c-4e6d-ad6c-d54cecf69616/resourceGroups/WE-HCM-RG-POC&quot;,

  &quot;location&quot;: &quot;westeurope&quot;,

  &quot;managedBy&quot;: null,

  &quot;name&quot;: &quot;WE-HCM-RG-POC&quot;,

  &quot;properties&quot;: {

    &quot;provisioningState&quot;: &quot;Succeeded&quot;

  },

  &quot;tags&quot;: {

    &quot;ApplicationName&quot;: &quot;HCM PoC&quot;,

    &quot;BusinessUnit_CostCenter&quot;: &quot;74170&quot;,

    &quot;Environment&quot;: &quot;Development&quot;,

    &quot;HPNumber&quot;: &quot;HPNumber&quot;,

    &quot;TCSCloudOps_Scope&quot;: &quot;YES&quot;

  },

  &quot;type&quot;: &quot;Microsoft.Resources/resourceGroups&quot;

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;export ARM_CLIENT_ID=&quot;562ee4ba-6359-4e5d-a4d6-83de64a445f2&quot;&lt;/p&gt;
&lt;p&gt;export ARM_CLIENT_SECRET=&quot;_hvmAThuf7R_41J2hF05HLr.34v-CpFFOg&quot;&lt;/p&gt;
&lt;p&gt;export ARM_SUBSCRIPTION_ID=&quot;bf1dbcea-044c-4e6d-ad6c-d54cecf69616&quot;&lt;/p&gt;
&lt;p&gt;export ARM_TENANT_ID=&quot;0fadfa8b-6e6e-44b1-a381-6203bfe1a199&quot;&lt;/p&gt;
&lt;p&gt;export TF_LOG=&quot;DEBUG&quot;&lt;/p&gt;
&lt;p&gt;subscription_id = &quot;0fadfa8b-6e6e-44b1-a381-6203bfe1a199&quot;&lt;/p&gt;
&lt;p&gt;client_id       = &quot;562ee4ba-6359-4e5d-a4d6-83de64a445f2&quot;&lt;/p&gt;
&lt;p&gt;client_secret   = &quot;_hvmAThuf7R_41J2hF05HLr.34v-CpFFOg&quot;&lt;/p&gt;
&lt;p&gt;tenant_id       = &quot;0fadfa8b-6e6e-44b1-a381-6203bfe1a199&quot;&lt;/p&gt;
&lt;p&gt;terraform import azurerm_resource_group.WE-HCM-RG-POC /subscriptions/bf1dbcea-044c-4e6d-ad6c-d54cecf69616/resourceGroups/WE-HCM-RG-POC&lt;/p&gt;
&lt;p&gt;DB Name - sbwehcmsqldb_poc&lt;/p&gt;
&lt;p&gt;Server Name - sbwehcmsqldbserver_poc&lt;/p&gt;
&lt;p&gt;Region - West Europe&lt;/p&gt;
&lt;p&gt;Compute - Basic, 2 GB storage&lt;/p&gt;
&lt;p&gt;Please update the Firewall of SQL Database with below IP address (TCS ECP Datacenter IP)&lt;/p&gt;
&lt;p&gt;91.232.248.247&lt;/p&gt;
&lt;p&gt;^Dq&amp;amp;eyECA#hnXZT&lt;/p&gt;
&lt;p&gt;terraform destroy -target=azurerm_sql_database.sbwehcmsqldbpoc&lt;/p&gt;
&lt;p&gt;terraform destroy -target=azurerm_sql_server.sbwehcmsqldbserverpoc&lt;/p&gt;
&lt;p&gt;terraform destroy -target=azurerm_sql_firewall_rule.sbwehcmsqldbfw&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>terraform</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Velero command reference</title><link>https://sajalchoudhary.net/til/velero-command-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/velero-command-reference/</guid><pubDate>Wed, 21 Sep 2022 09:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Create backup schedule&lt;/h1&gt;
&lt;p&gt;14 days = 336 hrs&lt;br /&gt;10 days = 240 hrs&lt;br /&gt;07 days = 168 hrs&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;velero schedule create ccs-prod --schedule=&quot;@every 24h&quot; --include-namespaces=cisco --ttl 192h0m0s
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Velero backup list&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;velero backup get
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Velero take backup&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;velero backup create backup-20210819 --include-namespaces=cisco --wait --ttl 48h0m0s
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Delete backup&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;
velero backup delete [backup_name]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>velero</category><category>ccs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS Storage Gateway</title><link>https://sajalchoudhary.net/til/aws-storage-gateway/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-storage-gateway/</guid><pubDate>Thu, 18 Aug 2022 06:49:00 GMT</pubDate><content:encoded>&lt;p&gt;Pre-stage computer object before attempting AD join.&lt;br /&gt;Or,&lt;br /&gt;Grant permission to the service account to create computer object.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://aws.amazon.com/premiumsupport/knowledge-center/storage-gateway-domain-join-error/&quot; title=&quot;https://aws.amazon.com/premiumsupport/knowledge-center/storage-gateway-domain-join-error/&quot;&gt;https://aws.amazon.com/premiumsupport/knowledge-center/storage-gateway-domain-join-error/&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>aws</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell AD recover deleted objects</title><link>https://sajalchoudhary.net/til/powershell-ad-recover-deleted-objects/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-ad-recover-deleted-objects/</guid><pubDate>Wed, 10 Aug 2022 11:05:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;
# Get deleted object
Get-ADObject &amp;lt;userid&amp;gt; -IncludeDeletedObjects

## Restore
Get-ADObject &amp;lt;userid&amp;gt; -IncludeDeletedObjects | Restore-ADObject
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Docker logs for all containers</title><link>https://sajalchoudhary.net/til/docker-logs-for-all-containers/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/docker-logs-for-all-containers/</guid><pubDate>Wed, 10 Aug 2022 09:48:00 GMT</pubDate><content:encoded>&lt;h1&gt;For getting all IPs given on cloud remote&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;docker ps -aq -f status=exited | xargs -L 1 docker logs | grep -i nicIP_0
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>docker</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS IAM</title><link>https://sajalchoudhary.net/til/aws-iam/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-iam/</guid><pubDate>Sun, 07 Aug 2022 10:27:00 GMT</pubDate><content:encoded>&lt;p&gt;![[202208012318 AWS IAM Basics]]&lt;/p&gt;
&lt;h1&gt;IAM Users&lt;/h1&gt;
&lt;p&gt;IAM users are an identity used for long term access to any resource, i.e. people, applications or service accounts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;5000 users per account. User can be member of 10 groups.&lt;br /&gt;IAM Roles and Identity Federation fix this for large orgs or internet orgs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Principal --&amp;gt; Authentication --&amp;gt; Authenticated identity&lt;br /&gt;Authentication done using:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Username and passwor&lt;/li&gt;
&lt;li&gt;Access keys&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;ARN (Amazon Resource Name)&lt;/h2&gt;
&lt;p&gt;Uniquely identify resources within AWS&lt;/p&gt;
&lt;h1&gt;IAM Groups&lt;/h1&gt;
&lt;p&gt;IAM groups are containers for IAM users.&lt;br /&gt;Groups are not a true identity. They can&apos;t be referred as a prinicipal in a policy.&lt;/p&gt;
&lt;h1&gt;IAM Roles&lt;/h1&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware security certificates</title><link>https://sajalchoudhary.net/til/vmware-security-certificates/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-security-certificates/</guid><pubDate>Thu, 04 Aug 2022 18:57:00 GMT</pubDate><content:encoded>&lt;h1&gt;Create template&lt;/h1&gt;
&lt;p&gt;Create template using &lt;a href=&quot;https://kb.vmware.com/s/article/2112009&quot;&gt;Creating a Microsoft Certificate Authority Template for SSL certificate creation in vSphere 6.x/7.x (2112009) (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;VMware does not recommend replacing either solution user certificates or STS certificates, nor using a subordinate CA in place of the VMCA. If you choose either of these options, you might encounter significant complexity and the potential for a negative impact to your security, and an unnecessary increase in your operational risk.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;With the “hybrid” approach, custom certificates are used for the Machine SSL certificates of the Platform Services Controller and vCenter Server VMs and then the VMCA is left to manage the Solution Users and ESXi host certificates.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;NOTE:&lt;br /&gt;HA is disabled during activity, so disable HA manually. And take snapshot.&lt;br /&gt;Certificates must be base64 encoded.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Overview&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Generate a Certificate Signing Request for the externally-facing vSphere Web Client login page (The Machine SSL certificate)&lt;/li&gt;
&lt;li&gt;Submitted the CSR to the Microsoft Certificate Authority and downloaded the newly generated certificate and root CA certificate&lt;/li&gt;
&lt;li&gt;Using the Certificate Manager utility we replaced the Machine SSL certificate with the certificate generated by the Microsoft CA&lt;/li&gt;
&lt;li&gt;Verify  that the vSphere Web Client login page is now using the Microsoft CA-issued certificate&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Steps&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create a folder on appliance which you will be able to download: /tmp/sslcerts&lt;/li&gt;
&lt;li&gt;Generate CSR&lt;ol&gt;
&lt;li&gt;Utility is present at: /usr/lib/vmware-vmca/bin/certificate-manager&lt;/li&gt;
&lt;li&gt;Run the utility and select Option 1&lt;/li&gt;
&lt;li&gt;Select Option 1 again, to generate the CSR and provide the output directory path (created above) to write out the files created&lt;/li&gt;
&lt;li&gt;Download the created csr file and key&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Submit csr to CA&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;certreq -attrib &quot;CertificateTemplate:WebServer&quot; &amp;lt;nameofcert.cer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;If you don’t have an export of the root certificate start a elevated command prompt on the CA server and run this command.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;certutil -ca.cert root_certificate.cer
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy the .cer, key and root.cer to the VCSA.&lt;/li&gt;
&lt;li&gt;Open up the Certificate Manager Utility and select Option 1, Replace Machine SSL certificate with Custom Certificate. Provide the password to your &lt;a href=&quot;mailto:administrator@vsphere.local&quot;&gt;administrator@vsphere.local&lt;/a&gt; account and select Option 2, “Import Custom Certificate(s) and key(s) to replace existing Machine SSL certificate”&lt;/li&gt;
&lt;li&gt;Select “Y” to continue the operation. This may take a few minutes, depending on how your systems are configured.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2112277?lang=en_US&quot;&gt;Replacing a vSphere 6.x /7.x Machine SSL certificate with a Custom Certificate Authority Signed Certificate (2112277) (vmware.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2015/07/custom-certificate-on-the-outside-vmware-ca-vmca-on-the-inside-replacing-vcenter-6-0s-ssl-certificate.html&quot;&gt;Replacing vCenter 6.0’s SSL Certificate (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://virtualblog.nl/2020/10/26/vmware-vcenter-replace-machine-certificate-with-custom-ca/#:~:text=Upload%20the%20Certificate%20and%20the%20Chain%20to%20the,%E2%80%9C1%E2%80%9D%20%E2%80%9CReplace%20Machine%20SSL%20certificate%20with%20custom%20certificate%E2%80%9D&quot;&gt;VMware vCenter Replace Machine Certificate With Custom CA - Virtualblog.nl&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://www.dasher.com/vmware-vcenter-certificate-replacement/&quot;&gt;VMware vCenter Certificate Replacement - Dasher&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.psc.doc/GUID-779A011D-B2DD-49BE-B0B9-6D73ECF99864.html&quot;&gt;vSphere Security Certificates (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogs.vmware.com/vsphere/2017/01/walkthrough-hybrid-ssl-certificate-replacement.html&quot;&gt;New Product Walkthrough - Hybrid vSphere SSL Certificate Replacement - VMware vSphere Blog&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Export configuration of existing Azure AD Connect server</title><link>https://sajalchoudhary.net/til/export-configuration-of-existing-azure-ad-connect-server/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/export-configuration-of-existing-azure-ad-connect-server/</guid><pubDate>Thu, 04 Aug 2022 12:57:00 GMT</pubDate><content:encoded>&lt;p&gt;Open the Azure AD Connect tool, and select the additional task named View or Export Current Configuration.&lt;br /&gt;By default, the settings are exported to %ProgramData%\AADConnect.&lt;br /&gt;Settings are exported by using the JSON file format and should not be hand-created or edited to ensure logical consistency.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-import-export-config&quot;&gt;How to import and export Azure AD Connect configuration settings - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>aadconnect</category><category>azure</category><category>entra</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AD Connect Upgrade from old version to new version</title><link>https://sajalchoudhary.net/til/azure-ad-connect-upgrade-from-old-version-to-new-version/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-ad-connect-upgrade-from-old-version-to-new-version/</guid><pubDate>Thu, 04 Aug 2022 11:39:00 GMT</pubDate><content:encoded>&lt;h1&gt;Methods&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Automatic Upgrade&lt;/li&gt;
&lt;li&gt;In-place upgrade&lt;/li&gt;
&lt;li&gt;Swing migration (Complex deployment/upgrade windows OS)&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Swing Migration&lt;/h1&gt;
&lt;p&gt;Needs at least 2 servers: one active, one staging.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Active server responsible for production load.&lt;/li&gt;
&lt;li&gt;Staging server prepared with new release. When ready this is made active.&lt;/li&gt;
&lt;li&gt;Previous active server becomes staging and is upgraded.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Export configuration of existing server&lt;/li&gt;
&lt;li&gt;Install the new Azure AD Connect server with the imported settings (Staging Mode)&lt;/li&gt;
&lt;li&gt;Verify Staging Sync&lt;/li&gt;
&lt;li&gt;Set the Old Azure AD Connect server to staging mode (Optional)&lt;/li&gt;
&lt;li&gt;Uninstall Old Azure AD Connect server&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/whatis-azure-ad-connect-v2&quot;&gt;What is Azure AD Connect v2.0? - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-upgrade-previous-version&quot;&gt;Azure AD Connect: Upgrade from a previous version - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.azure365pro.com/migrate-azure-ad-connect-to-a-new-server/&quot;&gt;Migrate Azure AD Connect to a New Server - Azure365Pro.com&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>aadconnect</category><category>entra</category><category>entraconnect</category><category>azure</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AD Connect Pre-Reqs</title><link>https://sajalchoudhary.net/til/azure-ad-connect-pre-reqs/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-ad-connect-pre-reqs/</guid><pubDate>Thu, 04 Aug 2022 08:37:00 GMT</pubDate><content:encoded>&lt;h1&gt;Azure AD V2 pre-reqs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;An Azure AD tenant&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;on-premises&lt;/strong&gt; or &lt;strong&gt;cloud-hosted&lt;/strong&gt; (on an Infrastructure as a Service virtual machine) Windows Server running as an AD domain controller (older versions of Windows Server work but some features like password writeback will require 2016 or later)&lt;/li&gt;
&lt;li&gt;Your &lt;strong&gt;domain controller must be writable&lt;/strong&gt;, read-only domain controllers (RODC) are not supported&lt;/li&gt;
&lt;li&gt;Ideally, &lt;strong&gt;Azure AD Connect&lt;/strong&gt; should be installed on a dedicated domain-joined server, but you can also install it on your domain controller (Windows Server 2016 or later with Desktop Experience is required for Azure AD Connect V2)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AD&lt;/strong&gt; and &lt;strong&gt;AAD&lt;/strong&gt; &lt;strong&gt;accounts&lt;/strong&gt; for your Azure AD Connect server. Microsoft differentiates accounts used for operating Azure AD Connect and those used for its installation and configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Install pre-reqs&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;domain-joined Windows Server 2016 or later&lt;/li&gt;
&lt;li&gt;.Net Framework version required is 4.6.2, or newer&lt;/li&gt;
&lt;li&gt;Windows Server standard or better&lt;/li&gt;
&lt;li&gt;Azure AD Connect server must have a full GUI installed&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-prerequisites&quot;&gt;Azure AD Connect: Prerequisites and hardware - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><category>aadconnect</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Azure AD Connect</title><link>https://sajalchoudhary.net/til/azure-ad-connect/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/azure-ad-connect/</guid><pubDate>Thu, 04 Aug 2022 08:36:00 GMT</pubDate><content:encoded>&lt;p&gt;[[202208041137 Azure AD Connect Pre-Reqs]]&lt;br /&gt;[[202208041557 Export configuration of existing Azure AD Connect server]]&lt;br /&gt;[[202208041439 Azure AD Connect Upgrade from old version to new version]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/reference-connect-version-history&quot;&gt;Azure AD Connect: Version release history - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>aadconnect</category><category>entra</category><category>entraconnect</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Entra Connect sync</title><link>https://sajalchoudhary.net/til/entra-connect-sync/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/entra-connect-sync/</guid><pubDate>Thu, 04 Aug 2022 08:36:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;AD is source of truth&lt;/li&gt;
&lt;li&gt;Entra ID instance can sync from only one Entra connect sync&lt;/li&gt;
&lt;li&gt;One AD can sync to multiple Entra IDs&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Types&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Entra connect sync (deployed in Windows VM)&lt;/li&gt;
&lt;li&gt;Entra connect cloud sync (Agents are deployed where needed/runs in cloud)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;License requirements&lt;/h1&gt;
&lt;p&gt;P1&lt;/p&gt;
&lt;h1&gt;Architecture&lt;/h1&gt;
&lt;p&gt;|Entra ID|Azure|&lt;br /&gt;|connector space|Entra objects|&lt;br /&gt;|metaverse|&lt;br /&gt;|connector space|AD objects|&lt;br /&gt;|ADDS|Onprem|&lt;/p&gt;
&lt;p&gt;[[202208041137 Azure AD Connect Pre-Reqs]]&lt;br /&gt;[[202208041557 Export configuration of existing Azure AD Connect server]]&lt;br /&gt;[[202208041439 Azure AD Connect Upgrade from old version to new version]]&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/hybrid/reference-connect-version-history&quot;&gt;Azure AD Connect: Version release history - Microsoft Entra | Microsoft Docs&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sync-technical-concepts&quot;&gt;Technical Concepts&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/plan-connect-topologies&quot;&gt;Topologies for Entra Connect&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>azure</category><category>entra</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Route 53 Basics</title><link>https://sajalchoudhary.net/til/route-53-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/route-53-basics/</guid><pubDate>Tue, 02 Aug 2022 20:31:00 GMT</pubDate><content:encoded>&lt;p&gt;Global service, single database. Globally resilient.&lt;/p&gt;
&lt;p&gt;Two functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Register domain&lt;/li&gt;
&lt;li&gt;Host zones, manage Nameservers&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Hosted Zones&lt;/h2&gt;
&lt;p&gt;Can be public or private (linked to VPCs).&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>High Availability vs Fault Tolerance vs Disaster Recovery</title><link>https://sajalchoudhary.net/til/high-availability-vs-fault-tolerance-vs-disaster-recovery/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/high-availability-vs-fault-tolerance-vs-disaster-recovery/</guid><pubDate>Tue, 02 Aug 2022 19:55:00 GMT</pubDate><content:encoded>&lt;p&gt;HA is about minimizing failure.&lt;br /&gt;FT is about minimizing failure + operating through failures&lt;/p&gt;
&lt;p&gt;High Availability (HA)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Aims to &lt;strong&gt;ensure&lt;/strong&gt; an agreed level of operational &lt;strong&gt;performance&lt;/strong&gt;, usually &lt;strong&gt;uptime&lt;/strong&gt;, for a &lt;strong&gt;higher than normal period&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Instead of diagnosing the issue, if you have a process ready to replace it, it can be fixed quickly and probably in an automated way.&lt;/li&gt;
&lt;li&gt;Spare infrastructure ready to switch customers over to in the event of a disaster to minimize downtime&lt;/li&gt;
&lt;li&gt;User disruption is not ideal, but is allowed&lt;ul&gt;
&lt;li&gt;The user might have a small disruption or might need to log back in.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Maximizing a system&apos;s uptime&lt;ul&gt;
&lt;li&gt;99.9% (Three 9&apos;s) = 8.7 hours downtime per year.&lt;/li&gt;
&lt;li&gt;99.999 (Five 9&apos;s) = 5.26 minutes downtime per year.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Fault-Tolerance (FT)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;System can &lt;strong&gt;continue operating properly&lt;/strong&gt; in the event of the &lt;strong&gt;failure of some&lt;/strong&gt; (one or more faults within) of its&lt;strong&gt;components&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Fault tolerance is much more complicated than high availability and more expensive. Outages must be minimized and the system needs levels of redundancy.&lt;/li&gt;
&lt;li&gt;An airplane is an example of system that needs Fault Tolerance. It has more engines than it needs so it can operate through failure.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: A patient is waiting for a life saving surgery and is under anesthetic. While being monitored, the life support system is dosing medicine. This type of system cannot only be highly available, even a movement of interruption is deadly.&lt;/p&gt;
&lt;h2&gt;Disaster Recovery (DR)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set of policies, tools and procedures to &lt;strong&gt;enable the recovery&lt;/strong&gt; or &lt;strong&gt;continuation&lt;/strong&gt; of &lt;strong&gt;vital&lt;/strong&gt; technology infrastructure and systems &lt;strong&gt;following a natural or human-induced disaster&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;DR can largely be automated to eliminate the time for recovery and errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Shared Responsibility Model</title><link>https://sajalchoudhary.net/til/shared-responsibility-model/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/shared-responsibility-model/</guid><pubDate>Tue, 02 Aug 2022 19:45:00 GMT</pubDate><content:encoded>&lt;p&gt;AWS: Responsible for security &lt;strong&gt;OF&lt;/strong&gt; the cloud&lt;br /&gt;Customer: Responsible for security &lt;strong&gt;IN&lt;/strong&gt; the cloud&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Linux Stress Utility</title><link>https://sajalchoudhary.net/til/linux-stress-utility/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/linux-stress-utility/</guid><pubDate>Tue, 02 Aug 2022 19:42:00 GMT</pubDate><content:encoded>&lt;p&gt;Can be used to artificially stress a system&lt;/p&gt;
&lt;h1&gt;Steps on Amazon Linux&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;sudo amazon-linux-extras install epel -y 
sudo yum install stress -y
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS CloudWatch Basics</title><link>https://sajalchoudhary.net/til/aws-cloudwatch-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-cloudwatch-basics/</guid><pubDate>Tue, 02 Aug 2022 19:22:00 GMT</pubDate><content:encoded>&lt;p&gt;Collects and manages operational data&lt;br /&gt;Three things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Metrics: data relating to AWS products, apps, on-prem solutions&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;li&gt;Events  : AWS services and schedules&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Namespace&lt;/h2&gt;
&lt;p&gt;Container for monitoring data. Naming can be anything so long as it&apos;s not &lt;code&gt;AWS/service&lt;/code&gt; such as &lt;code&gt;AWS/EC2&lt;/code&gt;. This is used for all metric data of that service&lt;/p&gt;
&lt;h2&gt;Metric&lt;/h2&gt;
&lt;p&gt;Time ordered set of data points such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU Usage&lt;/li&gt;
&lt;li&gt;Network IN/OUT&lt;/li&gt;
&lt;li&gt;Disk IO&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not for a specific server. This could get things from different servers.&lt;/p&gt;
&lt;p&gt;Anytime CPU Utilization is reported, the &lt;strong&gt;datapoint&lt;/strong&gt; will report:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Timestamp = 2019-12-03&lt;/li&gt;
&lt;li&gt;Value = 98.3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Dimensions&lt;/strong&gt; could be used to get metrics for a specific instance or type of instance, among others. They separate data points for different &lt;strong&gt;things&lt;/strong&gt; or &lt;strong&gt;perspectives&lt;/strong&gt; within the same metric.&lt;/p&gt;
&lt;h2&gt;Alarms&lt;/h2&gt;
&lt;p&gt;Has two states &lt;code&gt;ok&lt;/code&gt; or &lt;code&gt;alarm&lt;/code&gt;. A notification could be sent to an SNS topic or an action could be performed based on an alarm state. Third state can be insufficient data state. Not a problem, just wait.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>CloudFormation Basics</title><link>https://sajalchoudhary.net/til/cloudformation-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cloudformation-basics/</guid><pubDate>Tue, 02 Aug 2022 18:52:00 GMT</pubDate><content:encoded>&lt;p&gt;IAC product.&lt;br /&gt;Can be written in yaml or json.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html&quot;&gt;https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS S3 Basics</title><link>https://sajalchoudhary.net/til/aws-s3-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-s3-basics/</guid><pubDate>Mon, 01 Aug 2022 20:42:00 GMT</pubDate><content:encoded>&lt;p&gt;Global service, accessible from anywhere.&lt;br /&gt;Public service, unlimited data, multi-user.&lt;/p&gt;
&lt;h1&gt;S3 objects&lt;/h1&gt;
&lt;p&gt;Like file.&lt;br /&gt;Key: koala.jpg (like file name)&lt;br /&gt;value: content being stored (0-5TB)&lt;/p&gt;
&lt;h1&gt;S3 buckets&lt;/h1&gt;
&lt;p&gt;Created in separate region. Needs to be globally unique. 3-63 chars, all lower case, no underscore. starts with number or lower case. can&apos;t be like ip address (1.1.1.1)&lt;br /&gt;Buckets (100 per account/1000 hard limit)&lt;br /&gt;Unlimited objects in bucket.&lt;br /&gt;Bucket created in region never leaves that region. Data sovereignty. Rules/Laws of that particular region apply.&lt;br /&gt;Flat structure (Everything stored at root level)&lt;br /&gt;Folder structure can be named like and S3 shows it like so:&lt;br /&gt;/old/koala.jpg&lt;br /&gt;koala1.jpg&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS IAM Basics</title><link>https://sajalchoudhary.net/til/aws-iam-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-iam-basics/</guid><pubDate>Mon, 01 Aug 2022 20:18:00 GMT</pubDate><content:encoded>&lt;p&gt;Global service/No cost&lt;br /&gt;IAM lets us create three type of identities:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;User&lt;/li&gt;
&lt;li&gt;Group&lt;/li&gt;
&lt;li&gt;Roles&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS VPC Basics</title><link>https://sajalchoudhary.net/til/aws-vpc-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-vpc-basics/</guid><pubDate>Mon, 01 Aug 2022 20:16:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Regional service&lt;/strong&gt;. VPC = virtual network inside AWS.&lt;br /&gt;Private and isolated by default.&lt;/p&gt;
&lt;h2&gt;Default VPC&lt;/h2&gt;
&lt;p&gt;max 1 per region. can be deleted and recreated. 1 per region created automatically.&lt;br /&gt;gets 1 default cidr (172.31.0.0/16)&lt;br /&gt;cidr split into subnets for different azs. (/20 subnets) Subnets assign public IPv4 address.&lt;br /&gt;InternetGW , SG and NACL. Security features SG and NACL.&lt;/p&gt;
&lt;h2&gt;Custom VPCs&lt;/h2&gt;
&lt;p&gt;created manually. more flexible. can have multiple cidrs.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>EC2 Basics</title><link>https://sajalchoudhary.net/til/ec2-basics/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ec2-basics/</guid><pubDate>Mon, 01 Aug 2022 20:14:00 GMT</pubDate><content:encoded>&lt;p&gt;AZ resiliant. Instance fails if AZ fails. IAAS.&lt;br /&gt;Private by default. Instance launched in a VPC.&lt;br /&gt;Pay as you go.&lt;br /&gt;Based on state, billing happens. Pricing based on CPU,Memory,Storage,Networking.&lt;/p&gt;
&lt;h2&gt;Running&lt;/h2&gt;
&lt;p&gt;Charged for all 4.&lt;/p&gt;
&lt;h2&gt;Stopped&lt;/h2&gt;
&lt;p&gt;Only charged for storage.&lt;/p&gt;
&lt;h2&gt;Terminated&lt;/h2&gt;
&lt;p&gt;No charge.&lt;/p&gt;
&lt;h2&gt;AMI&lt;/h2&gt;
&lt;p&gt;Like server image. Can be used to deploy instances.&lt;br /&gt;Contain the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Permissions&lt;ol&gt;
&lt;li&gt;Public - Everyone can use it&lt;/li&gt;
&lt;li&gt;Owner - Implicit &lt;/li&gt;
&lt;li&gt;Explicit - Specific AWS accounts can use it&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Root Volume&lt;/li&gt;
&lt;li&gt;Block Device Mapping (Links volume to device id/ So which is boot, which is data vol)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Connecting to EC2&lt;/h2&gt;
&lt;p&gt;RDP: 3389, SSH: 22&lt;br /&gt;Authenticate using SSH key-pair. Private key can be seen only once. AWS has the public key.&lt;br /&gt;For Windows, use key to get admin password, and with that admin password, you can login.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://github.com/acantril/aws-sa-associate-saac02/blob/master/04-AWS-Fundamentals/00_LearningAids/EC2Basics.pdf&quot;&gt;EC2 basics&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Kubernetes certificate expiry fix</title><link>https://sajalchoudhary.net/til/kubernetes-certificate-expiry-fix/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/kubernetes-certificate-expiry-fix/</guid><pubDate>Mon, 01 Aug 2022 12:18:00 GMT</pubDate><content:encoded>&lt;h1&gt;Check cert status&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;$ sudo kubeadm alpha certs check-expiration
CERTIFICATE                EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
admin.conf                 Aug 01, 2023 11:47 UTC   364d            no
apiserver                  Aug 01, 2023 11:47 UTC   364d            no
apiserver-etcd-client      Aug 01, 2023 11:47 UTC   364d            no
apiserver-kubelet-client   Aug 01, 2023 11:47 UTC   364d            no
controller-manager.conf    Aug 01, 2023 11:47 UTC   364d            no
etcd-healthcheck-client    Aug 01, 2023 11:47 UTC   364d            no
etcd-peer                  Aug 01, 2023 11:47 UTC   364d            no
etcd-server                Aug 01, 2023 11:47 UTC   364d            no
front-proxy-client         Aug 01, 2023 11:47 UTC   364d            no
scheduler.conf             Aug 01, 2023 11:47 UTC   364d            no
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;New Method&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Download ccp-utils-aa166c3.tar to master nodes.&lt;/li&gt;
&lt;li&gt;Untar.&lt;/li&gt;
&lt;li&gt;On all the master nodes, run the following:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;python3 renew_certs.py -s
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Reboot the master nodes one at a time&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;shutdown -r now
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;run the following script: ./renew_kubeconfig_secret.sh. It creates a script in /tmp location (/tmp/update_kubeconf_secret.sh) which needs to be updated with correct secret name.&lt;/li&gt;
&lt;li&gt;Get the secret name using:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;$ kubectl get secret -n ccp | grep kubeconfig
fit-ba52bfdd-4bc5-4307-b788-b4f0620ec7f8-kubeconfig     Opaque                                10     2y19d
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Update the /tmp script with -n ccp and the name of the cert, like so&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;kubectl -n ccp get secret &quot;fit-ba52bfdd-4bc5-4307-b788-b4f0620ec7f8-kubeconfig&quot; -o yaml &amp;gt;  &quot;fit-ba52bfdd-4bc5-4307-b788-b4f0620ec7f8-kubeconfig&quot;.bak
kubectl -n ccp patch secret &quot;fit-ba52bfdd-4bc5-4307-b788-b4f0620ec7f8-kubeconfig&quot; --type=&quot;json&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;After updating it, run the script.&lt;/li&gt;
&lt;li&gt;Verify node status using get nodes, get pods, etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Old Method&lt;/h1&gt;
&lt;p&gt;&lt;a&gt;Cisco documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/&quot;&gt;Kubernetes documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-alpha/&quot;&gt;Kubernetes Alpha Kubeadm Documentation&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Log in to a master node, and sudo su - to become root.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Backup your old certificates and keys. This is not required but recommended. Make a backup directory and copy these files to it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
$ sudo cp -a /etc/kubernetes/ .
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Use kubeadm alpha certs to renew the certificates:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
admin@ccs-52-rcdn-74601e81-d5f0-4178-mg-1-1201e401a1:/etc/kubernetes$ sudo kubeadm alpha certs renew all --v=5
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Regenerate the kubernetes .conf files by kubeadm alpha kubeconfig:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
kubeadm alpha kubeconfig user --org system:masters --client-name kubernetes-admin &amp;gt; /etc/kubernetes/admin.conf

kubeadm alpha kubeconfig user --client-name system:kube-controller-manager &amp;gt; /etc/kubernetes/controller-manager.conf

kubeadm alpha kubeconfig user --client-name system:kube-scheduler &amp;gt; /etc/kubernetes/scheduler.conf

kubeadm alpha kubeconfig user --org system:nodes --client-name system:node:$(hostname) &amp;gt; /etc/kubernetes/kubelet.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;If there is a file /etc/kubernetes/node.conf in the system, replace it with a copy of the new admin.conf file and edit it to replace the VIP with the local IP of the node:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
cp /etc/kubernetes/admin.conf /etc/kubernetes/node.conf

vi node.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Export your new admin.conf file to your host.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

chown $(id -u):$(id -g) $HOME/.kube/config

chmod 777 $HOME/.kube/config

export KUBECONFIG=.kube/config
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reboot the master node via shutdown -r now.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perform above steps for all master nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify kubernetes status using kubectl get nodes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only do steps 19-25 on each worker IF they show as NotReady and having issues. On later clusters you might not have to do this. On one master, generate a new join token via kubeadm token create --print-join-command. Copy that command for later use.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;
[root@cx-ccs-prod-master-d7f34f25-f524-4f90-9037-7286202ed13a1 k8s-mgmt]# kubeadm token create --print-join-command

kubeadm join 192.168.1.14:6443 --token m1ynvj.f4n3et3poki88ry4

 --discovery-token-ca-cert-hash

sha256:4d0c569985c1d460ef74dc01c85740285e4af2c2369ff833eed1ba86e1167575
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>k8s</category><category>ccs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Installing cliqr agent for vmware cloud</title><link>https://sajalchoudhary.net/til/installing-cliqr-agent-for-vmware-cloud/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/installing-cliqr-agent-for-vmware-cloud/</guid><pubDate>Mon, 01 Aug 2022 10:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Linux&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;./worker_installer.bin vmware worker_basic

## fORMAT
./worker_installer.bin &amp;lt;ostype&amp;gt; &amp;lt;cloudtype&amp;gt; worker_basic
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Windows&lt;/h1&gt;
&lt;p&gt;Download the artifacts.zip file from software.cisco.com and unzip it to obtain the installer package (cliqr_installer.exe) Or get it from cloud repo.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cliqr_installer.exe /CLOUDTYPE=vmware /CLOUDREGION=default
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.cisco.com/c/dam/en/us/td/docs/cloud-systems-management/cloudcenter-suite/Workload-Manager/CCS-WM-5-4.pdf&quot;&gt;CCS-WM-5-4 (cisco.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ccs</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Installing cloudcenter agent</title><link>https://sajalchoudhary.net/til/installing-cloudcenter-agent/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/installing-cloudcenter-agent/</guid><pubDate>Mon, 01 Aug 2022 10:07:00 GMT</pubDate><content:encoded>&lt;h1&gt;Linux&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;./worker_installer.bin vmware worker_basic

## fORMAT
./worker_installer.bin &amp;lt;ostype&amp;gt; &amp;lt;cloudtype&amp;gt; worker_basic
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Windows&lt;/h1&gt;
&lt;p&gt;Download the artifacts.zip file from software.cisco.com and unzip it to obtain the installer package (cliqr_installer.exe) Or get it from cloud repo.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cliqr_installer.exe /CLOUDTYPE=vmware /CLOUDREGION=default
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.cisco.com/c/dam/en/us/td/docs/cloud-systems-management/cloudcenter-suite/Workload-Manager/CCS-WM-5-4.pdf&quot;&gt;CCS-WM-5-4 (cisco.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>AWS Fundamentals</title><link>https://sajalchoudhary.net/til/aws-fundamentals/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/aws-fundamentals/</guid><pubDate>Tue, 26 Jul 2022 20:54:00 GMT</pubDate><content:encoded>&lt;h1&gt;AWS Public vs Private services&lt;/h1&gt;
&lt;p&gt;Refers to networking only&lt;br /&gt;Three internet zones:&lt;br /&gt;Public Internet Zone (Open internet)&lt;br /&gt;AWS Public Zone (Things like S3 for AWS public services. Requires access.)&lt;br /&gt;AWS Private zone (VPCs: isolated unless configured otherwise. Stuff can be placed inside VPCs like EC2. Access can be enabled by using things like VPN/Direct Connect for on prem, for public access things like internet gateway)&lt;/p&gt;
&lt;h1&gt;AWS Global Infrastructure&lt;/h1&gt;
&lt;h2&gt;Regions&lt;/h2&gt;
&lt;p&gt;An area AWS says has full deployment of AWS services (Ohio,Mumbai, etc.)&lt;/p&gt;
&lt;h2&gt;Edge locations&lt;/h2&gt;
&lt;p&gt;Edge computing, CDNs, type of things. Allows for fast, efficient data transfer.&lt;br /&gt;Some services are global (IAM/DNS)&lt;br /&gt;Some are regional (EC2, etc)&lt;/p&gt;
&lt;h2&gt;Region benefits&lt;/h2&gt;
&lt;p&gt;Geographical separation (isolated fault domain)&lt;br /&gt;Geopolitcal separation (Different governance)&lt;br /&gt;Location control (Performance)&lt;/p&gt;
&lt;h2&gt;Regions and AZs&lt;/h2&gt;
&lt;p&gt;Each region has between 2 and 6 AZs. Isolated infra inside a region. AZ is not one DC. It can have more than one DC.&lt;/p&gt;
&lt;h2&gt;Service Resilience&lt;/h2&gt;
&lt;p&gt;Globally Resilient (If a region fails, no issues. Examples: IAM, Route 53)&lt;br /&gt;Regionally Resilient (Regionally, data is same. Region fails, service will fail)&lt;br /&gt;AZ Resilient (very prone to failure)&lt;/p&gt;
&lt;h1&gt;AWS CLI&lt;/h1&gt;
&lt;h2&gt;Create profile&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;aws configure --profile iamadmin-general
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;![[202208012318 AWS IAM Basics]]&lt;/p&gt;
&lt;p&gt;![[202208012316 AWS VPC Basics]]&lt;/p&gt;
&lt;p&gt;![[202208012314 EC2 Basics]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cloud Computing Fundamentals</title><link>https://sajalchoudhary.net/til/cloud-computing-fundamentals/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cloud-computing-fundamentals/</guid><pubDate>Tue, 26 Jul 2022 20:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Cloud Computing provides:&lt;/h1&gt;
&lt;h2&gt;1. On-Demand Self-Service&lt;/h2&gt;
&lt;p&gt;Create resources without requiring human interaction&lt;/p&gt;
&lt;h2&gt;2. Broad Network Access&lt;/h2&gt;
&lt;p&gt;Capabilities available over &lt;strong&gt;network&lt;/strong&gt; and &lt;strong&gt;standard mechanisms&lt;/strong&gt; (http/https,ssh,etc.)&lt;/p&gt;
&lt;h2&gt;3. Resource Pooling&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Location independence.. no control or knowledge over exact location of resources&lt;/li&gt;
&lt;li&gt;resources are pooled to serve multiple customers using multi-tenant model&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;4. Rapid Elasticity&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Capabilities can be elastically provisioned and released to scale rapidly&lt;/li&gt;
&lt;li&gt;To the consumer, it looks like unlimited capacity is there&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;5. Measured Service&lt;/h2&gt;
&lt;p&gt;Resources can be monitored, controlled, reported and billed&lt;/p&gt;
&lt;h1&gt;Public vs Private vs Hybrid vs Multi Cloud&lt;/h1&gt;
&lt;p&gt;Multi cloud strategy uses multiple vendors (more than one public clouds)&lt;br /&gt;Private Cloud is basically on-prem. But it still needs to meet the five characteristics we mentioned above. But, dedicated to a single customer.&lt;br /&gt;Private + Public = Hybrid Cloud (Only if both act as a single cloud, i.e. same tools, processes, etc.)&lt;br /&gt;Hybrid Environment/Network (private and public exist separately)&lt;/p&gt;
&lt;h1&gt;Cloud Service Models&lt;/h1&gt;
&lt;p&gt;Infra stack contains of following components:&lt;br /&gt;Application&lt;br /&gt;Data&lt;br /&gt;Runtime&lt;br /&gt;Container&lt;br /&gt;O/S&lt;br /&gt;Virtualization&lt;br /&gt;Servers&lt;br /&gt;Infrastructure&lt;br /&gt;Facilties&lt;/p&gt;
&lt;h2&gt;Different models&lt;/h2&gt;
&lt;p&gt;In Infra stack, some things are managed by you, some by vendor, which leads to different models:&lt;br /&gt;&lt;strong&gt;On-Prem&lt;/strong&gt; controls the entire stack and staff costs.&lt;br /&gt;&lt;strong&gt;DC-Hosted&lt;/strong&gt; vendor controls facilites and staff for the HW.&lt;br /&gt;&lt;strong&gt;IAAS&lt;/strong&gt; you control O/S onward.&lt;br /&gt;&lt;strong&gt;PAAS&lt;/strong&gt; you control Runtime onward.&lt;br /&gt;&lt;strong&gt;SAAS&lt;/strong&gt; you consume application&lt;/p&gt;
&lt;h1&gt;When to use public cloud&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;shift responsibility - focus on what matters most to business&lt;/li&gt;
&lt;li&gt;operate dc cheaper/more efficiently on cloud&lt;/li&gt;
&lt;li&gt;resiliency/proximity requirements&lt;/li&gt;
&lt;li&gt;charged based on usage&lt;ul&gt;
&lt;li&gt;predictable bursting (scale up and down based on time)&lt;/li&gt;
&lt;li&gt;growing fast (new company/app - don&apos;t know how much i need)&lt;/li&gt;
&lt;li&gt;unpredictable bursting&lt;/li&gt;
&lt;li&gt;on and off - stop start as needed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Key scenarios&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;test and dev in cloud&lt;/li&gt;
&lt;li&gt;disaster recovery&lt;/li&gt;
&lt;li&gt;dmz scenarios (public facing things in cloud)&lt;/li&gt;
&lt;li&gt;special projects (initial cost (might be large) vs operating cost in cloud is less)&lt;/li&gt;
&lt;li&gt;many orgs are all in (maybe cheaper/but also provides lots of services/don&apos;t want to be in dc business)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf&quot;&gt;https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=vkM_2vsHWA4&amp;amp;list=PLlVtbbG169nGlGPWs9xaLKT1KfwqREHbs&amp;amp;index=4&quot;&gt;Azure Master Class v2 - Module 1 - Fundamentals of Cloud and Azure&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cloud</category><category>azure</category><category>aws</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cantrill, Adrian - SAAC02_03</title><link>https://sajalchoudhary.net/til/cantrill,-adrian---saac02_03/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cantrill,-adrian---saac02_03/</guid><pubDate>Tue, 26 Jul 2022 20:05:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://learn.cantrill.io/courses/730712/lectures/14040936&quot;&gt;Adrian&apos;s Course&lt;/a&gt;&lt;br /&gt;This note will just act as a placeholder for all the stuff I learn as part of Adrian&apos;s SAA course.&lt;/p&gt;
&lt;h1&gt;Basics&lt;/h1&gt;
&lt;p&gt;[[202207262308 Cloud Computing Fundamentals]]&lt;br /&gt;[[202207262354 AWS Fundamentals]]&lt;br /&gt;[[202208012318 AWS IAM Basics]]&lt;br /&gt;[[202208012316 AWS VPC Basics]]&lt;br /&gt;[[202208012314 EC2 Basics]]&lt;br /&gt;[[202208022152 CloudFormation Basics]]&lt;br /&gt;[[202208022222 AWS CloudWatch Basics]]&lt;br /&gt;[[202208022245 Shared Responsibility Model]]&lt;br /&gt;[[202208022331 Route 53 Basics]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://learn.cantrill.io/courses/730712/lectures/14040936&quot;&gt;https://learn.cantrill.io/courses/730712/lectures/14040936&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell convert Int64 TimeStamp to DateTime</title><link>https://sajalchoudhary.net/til/powershell-convert-int64-timestamp-to-datetime/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-convert-int64-timestamp-to-datetime/</guid><pubDate>Wed, 20 Jul 2022 09:09:00 GMT</pubDate><content:encoded>&lt;p&gt;we can use the .Net function &lt;strong&gt;FromFileTime&lt;/strong&gt; and convert the output to DateTime format.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$timestamp = &quot;131099683087123361&quot;
[DateTime]::FromFileTimeutc($timestamp)
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Example with aduser report&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Get-ADUser -Server $Domain -Properties * | Select DisplayName,DistinguishedName,Description,PasswordNeverExpires,@{n=&quot;PwdLastSet&quot;;e={[datetime]::FromFileTime($_.&quot;PwdLastSet&quot;)}}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware restart ui services</title><link>https://sajalchoudhary.net/til/vmware-restart-ui-services/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-restart-ui-services/</guid><pubDate>Sat, 16 Jul 2022 17:44:00 GMT</pubDate><content:encoded>&lt;p&gt;Done in seconds.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Stop ui
service-control --stop vsphere-ui

# start ui
service-control --start vsphere-ui

# check status
service-control --status --all
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/81792?lang=en_US&quot;&gt;https://kb.vmware.com/s/article/81792?lang=en_US&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform use custom providers</title><link>https://sajalchoudhary.net/til/terraform-use-custom-providers/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-use-custom-providers/</guid><pubDate>Wed, 13 Jul 2022 07:49:00 GMT</pubDate><content:encoded>&lt;p&gt;In .terraformrc file provide the location of the local mirror from where provider should be installed&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;provider_installation {
  filesystem_mirror {
    path    = &quot;/home/c3admin/ipamTest/.terraform.d/plugins/&quot;
    include = [&quot;hashicorp.com/*/*&quot;]
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.terraform.io/cli/config/config-file#provider-installation&quot;&gt;https://www.terraform.io/cli/config/config-file#provider-installation&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VAMI interface on VMWare</title><link>https://sajalchoudhary.net/til/vami-interface-on-vmware/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vami-interface-on-vmware/</guid><pubDate>Fri, 08 Jul 2022 06:12:00 GMT</pubDate><content:encoded>&lt;h1&gt;How to access&lt;/h1&gt;
&lt;p&gt;postfix &lt;em&gt;:5480&lt;/em&gt; to the IP address or URL of your VCSA&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-Adapter-for-SAP-Landscape-Management/2.1.0/Installation-and-Administration-Guide-for-VLA-Administrators/GUID-C3BABC66-2F13-4205-B071-CBFFB383F6BD.html&quot;&gt;Accessing VAMI Web UI (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><category>vami</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>CCS API get</title><link>https://sajalchoudhary.net/til/ccs-api-get/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ccs-api-get/</guid><pubDate>Thu, 23 Jun 2022 07:19:00 GMT</pubDate><content:encoded>&lt;h1&gt;Get instance types&lt;/h1&gt;
&lt;h2&gt;HE5_ECP_VM_OPCloud&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://10.47.19.169/cloudcenter-cloud-setup/api/v1/tenants/2/clouds/8/regions/21/instanceTypes?size=0&quot;&gt;https://10.47.19.169/cloudcenter-cloud-setup/api/v1/tenants/2/clouds/8/regions/21/instanceTypes?size=0&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;HE7_ECP_VM_OPCloud&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://10.47.19.169/cloudcenter-cloud-setup/api/v1/tenants/2/clouds/7/regions/20/instanceTypes?size=0&quot;&gt;https://10.47.19.169/cloudcenter-cloud-setup/api/v1/tenants/2/clouds/7/regions/20/instanceTypes?size=0&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ccs</category><category>api</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Take postgres dump</title><link>https://sajalchoudhary.net/til/take-postgres-dump/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/take-postgres-dump/</guid><pubDate>Wed, 22 Jun 2022 14:37:00 GMT</pubDate><content:encoded>&lt;p&gt;Take a postgres db dump -&lt;br /&gt;Find cloudcenter-shared-postgres pod -&lt;br /&gt;kubectl get pods -n cisco | grep postgres&lt;br /&gt;Get into the pod&apos;s shell -&lt;br /&gt;kubectl exec -it -n cisco cloudcenter-shared-postgres-0 -- bash&lt;br /&gt;#pg_dump -U cliqr cliqrdb | gzip &amp;gt; /tmp/.gz&lt;br /&gt;Exit the pod -&lt;br /&gt;#exit&lt;br /&gt;Copy the dump to the host -&lt;br /&gt;kubectl cp cloudcenter-shared-postgres-0:/tmp/.gz ~/.gz &lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ccs</category><category>postgres</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Add SAN to cert request inf file method</title><link>https://sajalchoudhary.net/til/add-san-to-cert-request-inf-file-method/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/add-san-to-cert-request-inf-file-method/</guid><pubDate>Tue, 21 Jun 2022 10:33:00 GMT</pubDate><content:encoded>&lt;p&gt;Template:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[NewRequest]
Subject = &quot;CN=devname.fi.tcsecp.com&quot;
Exportable = TRUE
KeyLength = 2048
KeySpec = 1
KeyUsage = 0xf0
RequestType = PKCS10

[Extensions]
2.5.29.17 = &quot;{text}&quot;
_continue_ = &quot;dns=devname.fi.tcsecp.com&quot;

[RequestAttributes]
CertificateTemplate = WebServer
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For SAN, tried using the following which did not work. So, use the [Extensions] format mentioned above.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[RequestAttributes] ; If your client operating system is Windows Server 2003, Windows Server 2003 R2, or Windows XP ; and you are using a standalone CA, SANs can be included in the RequestAttributes ; section by using the following text format. SAN=&quot;dns=www01.fabrikam.com&amp;amp;dns=www.fabrikam.com&amp;amp;ipaddress=172.31.10.130&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff625722(v=ws.10)&quot;&gt;How to Request a Certificate With a Custom SAN | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>HCP install</title><link>https://sajalchoudhary.net/til/hcp-install/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/hcp-install/</guid><pubDate>Thu, 16 Jun 2022 15:32:00 GMT</pubDate><content:encoded>&lt;h1&gt;Notes&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Do not provide vlan id when doing os config&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>hcp</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible directory structure</title><link>https://sajalchoudhary.net/til/ansible-directory-structure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-directory-structure/</guid><pubDate>Thu, 16 Jun 2022 06:35:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;production                # inventory file for production servers
staging                   # inventory file for staging environment

group_vars/
   group1                 # here we assign variables to particular groups
   group2                 # &quot;&quot;
host_vars/
   hostname1              # if systems need specific variables, put them here
   hostname2              # &quot;&quot;

library/                  # if any custom modules, put them here (optional)
module_utils/             # if any custom module_utils to support modules, put them here (optional)
filter_plugins/           # if any custom filter plugins, put them here (optional)

site.yml                  # master playbook
webservers.yml            # playbook for webserver tier
dbservers.yml             # playbook for dbserver tier

roles/
    common/               # this hierarchy represents a &quot;role&quot;
        tasks/            #
            main.yml      #  &amp;lt;-- tasks file can include smaller files if warranted
        handlers/         #
            main.yml      #  &amp;lt;-- handlers file
        templates/        #  &amp;lt;-- files for use with the template resource
            ntp.conf.j2   #  &amp;lt;------- templates end in .j2
        files/            #
            bar.txt       #  &amp;lt;-- files for use with the copy resource
            foo.sh        #  &amp;lt;-- script files for use with the script resource
        vars/             #
            main.yml      #  &amp;lt;-- variables associated with this role
        defaults/         #
            main.yml      #  &amp;lt;-- default lower priority variables for this role
        meta/             #
            main.yml      #  &amp;lt;-- role dependencies
        library/          # roles can also include custom modules
        module_utils/     # roles can also include custom module_utils
        lookup_plugins/   # or other types of plugins, like lookup in this case

    webtier/              # same kind of structure as &quot;common&quot; was above, done for the webtier role
    monitoring/           # &quot;&quot;
    fooapp/               # &quot;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/2.3/playbooks_best_practices.html&quot;&gt;Best Practices — Ansible Documentation&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell AD group management</title><link>https://sajalchoudhary.net/til/powershell-ad-group-management/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-ad-group-management/</guid><pubDate>Fri, 10 Jun 2022 07:46:00 GMT</pubDate><content:encoded>&lt;h1&gt;Add custom property&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;$Group = Get-ADGroup &amp;lt;group-name&amp;gt; -Properties * -Server &amp;lt;domain&amp;gt;
$Group | Set-ADGroup -Add @{ gidNumber = &apos;3000999999&apos; }
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Update existing entry&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;$Group = Get-ADGroup &amp;lt;group-name&amp;gt; -Properties * -Server &amp;lt;domain&amp;gt;
$Group | Set-ADGroup -Replace @{ gidNumber = &apos;300099999&apos; }
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Find groups based on a property&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Get-ADGroup -Filter &quot;gidNumber -eq 300099999&quot; -Server &amp;lt;domain&amp;gt; -Properties *
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Add member to group&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Add-ADGroupMember -Server &amp;lt;domain&amp;gt; -Identity &amp;lt;groupname&amp;gt; -Members &amp;lt;userid&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><category>ad</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell numbers</title><link>https://sajalchoudhary.net/til/powershell-numbers/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-numbers/</guid><pubDate>Fri, 10 Jun 2022 07:44:00 GMT</pubDate><content:encoded>&lt;h1&gt;Int32&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Int&lt;/strong&gt; is the default numeric data type in Windows PowerShell. It is a 32-bit signed integer. The .NET Framework class is System.Int32. Because it is the default numeric data type, I can use [int32] or [int].&lt;br /&gt;To get max and min values:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[int]::MaxValue
2147483647
[int]::MinValue
-2147483648
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://devblogs.microsoft.com/scripting/understanding-numbers-in-powershell/#:~:text=%2065535%20Int%20is%20the%20default%20numeric%20data,%5Bint%5D.%20There%20is%20also%20an%20unsigned%2032-bit%20integer.&quot;&gt;Understanding Numbers in PowerShell - Scripting Blog (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows Time service</title><link>https://sajalchoudhary.net/til/windows-time-service/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-time-service/</guid><pubDate>Thu, 09 Jun 2022 08:40:00 GMT</pubDate><content:encoded>&lt;h1&gt;Sync from domain&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;w32tm /config /syncfromflags:domhier /update 
net stop w32time 
net start w32time
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Sync from local&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;w32tm /config /syncfromflags:manual /update 
net stop w32time 
net start w32time
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-time-service-tools-and-settings&quot;&gt;Windows Time service tools and settings | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>time</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Powershell run commands on remote servers</title><link>https://sajalchoudhary.net/til/powershell-run-commands-on-remote-servers/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-run-commands-on-remote-servers/</guid><pubDate>Wed, 08 Jun 2022 08:11:00 GMT</pubDate><content:encoded>&lt;p&gt;Use Invoke-Command to run one off commands, if no output is needed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$Servers | Invoke-Command -ScriptBlock { Get-Service }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Invoke-command can be used with New-PSSession. This can be useful when running multiple commands and you want to use the same session. Like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$s = New-PSSession -ComputerName Server02 
Invoke-Command -Session $s -ScriptBlock {$p = Get-Process PowerShell}
Invoke-Command -Session $s -ScriptBlock {$p.VirtualMemorySize}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.2&quot;&gt;Invoke-Command (Microsoft.PowerShell.Core) - PowerShell | Microsoft Docs&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell set custom properties for AD Users</title><link>https://sajalchoudhary.net/til/powershell-set-custom-properties-for-ad-users/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-set-custom-properties-for-ad-users/</guid><pubDate>Wed, 08 Jun 2022 07:56:00 GMT</pubDate><content:encoded>&lt;p&gt;Set-ADUser can be used to modify AD users.&lt;br /&gt;We can edit values of other user attributes (including extensionAttribute and custom attributes) in AD using these Set-ADUser options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add – adds an attribute value&lt;/li&gt;
&lt;li&gt;Replace – replaces an attribute value&lt;/li&gt;
&lt;li&gt;Clear – clears an attribute value&lt;/li&gt;
&lt;li&gt;Remove — removes one of the attribute values&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Add a custom attribute&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Set-ADUser C.Bob -Add @{extensionAttribute5 = &quot;Test1&quot;}

# Replace
Set-ADUser
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Update AD SamAccountName&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;$NewSAMAccountName = $User.SamAccountName.ToUpper()  
$User | Set-ADUser -Server $Domain -Replace @{samaccountname=$NewSAMAccountName}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Update msds-AllowedToDelegateTo&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;
## Add something
$User | Set-ADUser -Add @{&apos;msDS-AllowedToDelegateTo&apos;=&apos;MSSQLSvc/JTYSQL19C1VS2.jty.okobank.net:1433&apos;}


## Remove something
*## THis removes that particular value only.
$User | Set-ADUser -Remove @{&apos;msDS-AllowedToDelegateTo&apos;=&apos;MSSQLSvc/jtysql10vs4.jty.okobank.net:1663&apos;}*
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Service principalnames&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Set-ADComputer -ServicePrincipalNames @{Add=&apos;WSMAN/Mycomputer&apos;,&apos;WSMAN/Mycomputer.MyDomain.Com&apos;}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Add multiple properties in one go&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;
$Properties = @{
	extensionAttribute2 = $UserData.extensionAttribute2
	extensionAttribute5 = &apos;S;&apos;
	extensionAttribute7 = $UserData.extensionAttribute7
	extensionAttribute11 = &apos;592106&apos;
}
$ADUser | Set-ADUser -Add $Properties -ErrorAction Stop
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://bobcares.com/blog/set-aduser-modify-active-directory-users-with-powershell/&quot;&gt;Set-ADUser Modify Active Directory Users with PowerShell (bobcares.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Snmpwalk</title><link>https://sajalchoudhary.net/til/snmpwalk/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/snmpwalk/</guid><pubDate>Tue, 07 Jun 2022 13:53:00 GMT</pubDate><content:encoded>&lt;h1&gt;Download&lt;/h1&gt;
&lt;p&gt;From solarwinds: &lt;a href=&quot;http://downloads.solarwinds.com/solarwinds/Release/PreRelease/SolarWindsSnmpWalk.zip&quot;&gt;http://downloads.solarwinds.com/solarwinds/Release/PreRelease/SolarWindsSnmpWalk.zip&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.comparitech.com/net-admin/snmpwalk-examples-windows-linux/&quot;&gt;snmpwalk Examples &amp;amp; Commands (Windows &amp;amp; Linux) Step-by-Step Guide (comparitech.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://support.solarwinds.com/SuccessCenter/s/article/Run-SolarWinds-SNMPWALK?language=en_US&quot;&gt;https://support.solarwinds.com/SuccessCenter/s/article/Run-SolarWinds-SNMPWALK?language=en_US&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>snmpwalk</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible parallelism</title><link>https://sajalchoudhary.net/til/ansible-parallelism/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-parallelism/</guid><pubDate>Tue, 07 Jun 2022 11:55:00 GMT</pubDate><content:encoded>&lt;p&gt;By default, Ansible runs each task on all hosts affected by a play before starting the next task on any host, using 5 forks.&lt;/p&gt;
&lt;h1&gt;Batch size( forks )&lt;/h1&gt;
&lt;p&gt;Batch size can be configured using serial.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;serial: 3
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/user_guide/playbooks_strategies.html#:~:text=By%20default%2C%20Ansible%20runs%20in%20parallel%20against%20all,at%20a%20single%20time%20using%20the%20serial%20keyword%3A&quot;&gt;Controlling playbook execution: strategies and more — Ansible Documentation&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>UCS snmp settings</title><link>https://sajalchoudhary.net/til/ucs-snmp-settings/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ucs-snmp-settings/</guid><pubDate>Tue, 07 Jun 2022 08:50:00 GMT</pubDate><content:encoded>&lt;p&gt;Admin &amp;gt; Expand All &amp;gt; Communication Management &amp;gt; Communication Services&lt;/p&gt;
&lt;p&gt;SNMP area has the appropriate settings.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-manager/GUI-User-Guides/System-Monitoring/3-1/b_UCSM_GUI_System_Monitoring_Guide_3_1/b_UCSM_GUI_System_Monitoring_Guide_3_1_chapter_0101.html&quot;&gt;Cisco UCS Manager System Monitoring Guide, Release 3.1 - SNMP Configuration [Cisco UCS Manager] - Cisco&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ucs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Error handling</title><link>https://sajalchoudhary.net/til/ansible-error-handling/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-error-handling/</guid><pubDate>Mon, 06 Jun 2022 14:08:00 GMT</pubDate><content:encoded>&lt;h1&gt;Ignore failed commands&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;ignore_errors&lt;/strong&gt; can be used to continue even in case of failures.&lt;/p&gt;
&lt;h1&gt;Defining failure&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;failed_when&lt;/strong&gt; can be used to specify what causes failure.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- name: Fail task when the command error output prints FAILED
  ansible.builtin.command: /usr/bin/example-command -x -y -z
  register: command_result
  failed_when: &quot;&apos;FAILED&apos; in command_result.stderr&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Aborting a play on all hosts&lt;/h1&gt;
&lt;p&gt;On first error, &lt;strong&gt;any_errors_fatal: true&lt;/strong&gt; will stop play execution.&lt;br /&gt;&lt;strong&gt;max_fail_percentage&lt;/strong&gt; can be used to abort after a percentage has failed &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;any_errors_fatal: true
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Recovering from errors&lt;/h1&gt;
&lt;p&gt;rescue section can be used for error handling.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html&quot;&gt;Error handling in playbooks — Ansible Documentation&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows RDP issue</title><link>https://sajalchoudhary.net/til/windows-rdp-issue/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-rdp-issue/</guid><pubDate>Fri, 03 Jun 2022 06:47:00 GMT</pubDate><content:encoded>&lt;p&gt;Error: No Remote Desktop License Servers available&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
1. Navigate to &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod&quot; as shown in below window and select the GracePeriod Key. If the ‘GracePeriod’ key exists you will need to delete it.
2. Reboot the server or Restart Remote desktop services,
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.blog.devitpl.com/solution-no-remote-desktop-license-servers-available-to-provide-license/&quot;&gt;Solution: No Remote Desktop License Servers Available To Provide License (devitpl.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>errors</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware remove host from inventory</title><link>https://sajalchoudhary.net/til/vmware-remove-host-from-inventory/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-remove-host-from-inventory/</guid><pubDate>Tue, 31 May 2022 14:38:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Put host in maintenance mode.&lt;/li&gt;
&lt;li&gt;Remove the host from distributed switch&lt;/li&gt;
&lt;li&gt;Right-click the appropriate host in the inventory pane, and select Remove from Inventory from the pop-up menu&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Step 2 might cause issues.&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.troubleshooting.doc/GUID-038AC93F-D710-48ED-8E3B-258A23FB2930.html&quot;&gt;Unable to Remove a Host from a vSphere Distributed Switch (vmware.com)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2015435&quot;&gt;The resource &apos;Port-ID&apos; is in use error when removing a host from VDS (2015435) (vmware.com)&lt;/a&gt;&lt;br /&gt;Better to just Right click the ESXi host from the &lt;strong&gt;Inventory&lt;/strong&gt; and select &lt;strong&gt;Connection&lt;/strong&gt; &amp;gt; &lt;strong&gt;Disconnect&lt;/strong&gt;&lt;br /&gt;And after host is disconnected remove from inventory will remove it.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcenterhost.doc/GUID-C88D843A-DB67-4888-9C36-8B72335EF3F8.html&quot;&gt;Remove a Host from vCenter Server (vmware.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware packet capture using pktcap</title><link>https://sajalchoudhary.net/til/vmware-packet-capture-using-pktcap/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-packet-capture-using-pktcap/</guid><pubDate>Tue, 31 May 2022 12:38:00 GMT</pubDate><content:encoded>&lt;h2&gt;Confirm port details using command below, grep the port details for the vm we need to run it for.&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;$ net-stats -l
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Get list of datastores, and select one which has space to store the network capture.&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage vmfs extent list
ls /vmfs/volumes
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Double ssh to the esxi which has the server and run commands for incoming and outgoing over 2 sessions (see example below)&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;pktcap-uw --switchport &amp;lt;portnumber&amp;gt; --dir {0|1|2} --tcpport &amp;lt;TCP_port&amp;gt; -o &amp;lt;capture_location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;dir {0|1|2} 0 stands for incoming traffic, 1 for outgoing traffic, and 2 for bidirectional traffic.&lt;/p&gt;
&lt;h2&gt;Use following command to kill the process on all servers once spike is observed&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;kill $(lsof |grep pktcap-uw |awk &apos;{print $1}&apos;| sort -u)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To list:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;lsof |grep pktcap-uw |awk &apos;{print $1}&apos;| sort -u
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Example&lt;/h2&gt;
&lt;h3&gt;VM1: 25903-web-ryd&lt;/h3&gt;
&lt;p&gt;Host: fiesopprdesx03.fi.tcsecp.com&lt;/p&gt;
&lt;p&gt;net-stats -l | grep 25903-web-ryd&lt;br /&gt;50331688            5       9 DvsPortset-0     fa:16:3e:74:9b:20  25903-web-ryd (68c5b741-1ce4-4637-8186-41d3c7352403).eth1&lt;br /&gt;50331689            5       9 DvsPortset-0     fa:16:3e:f9:2a:94  25903-web-ryd (68c5b741-1ce4-4637-8186-41d3c7352403).eth0 (Prod)&lt;/p&gt;
&lt;p&gt;/vmfs/volumes/5f6388f0-300d4730-0a0c-0025b501014f/pktcap&lt;/p&gt;
&lt;p&gt;pktcap-uw --switchport 50331689 --dir 0 --tcpport 2036 -o /vmfs/volumes/5f6388f0-300d4730-0a0c-0025b501014f/pktcap/capin14.pcap&lt;br /&gt;pktcap-uw --switchport 50331689 --dir 1 --tcpport 2036 -o /vmfs/volumes/5f6388f0-300d4730-0a0c-0025b501014f/pktcap/capout14.pcap&lt;/p&gt;
&lt;h3&gt;VM2: 25903-lptl-epm&lt;/h3&gt;
&lt;p&gt;Host: fiespalaprtesx08.fi.tcsecp.com&lt;/p&gt;
&lt;p&gt;net-stats -l | grep 25903-lptl-epm&lt;br /&gt;50331694            5       9 DvsPortset-0     fa:16:3e:01:ec:7f  25903-lptl-epm (66fbb177-2dd2-4d06-91fb-df119945cb81).eth1&lt;br /&gt;50331695            5       9 DvsPortset-0     fa:16:3e:b8:75:65  25903-lptl-epm (66fbb177-2dd2-4d06-91fb-df119945cb81).eth0 (Prod)&lt;/p&gt;
&lt;p&gt;esxcli storage vmfs extent list&lt;/p&gt;
&lt;p&gt;/vmfs/volumes/620a7fad-ea2a095e-bc75-0025b50502cf&lt;/p&gt;
&lt;p&gt;pktcap-uw --switchport 50331695 --dir 0 --tcpport 2036 -o /vmfs/volumes/620a7fad-ea2a095e-bc75-0025b50502cf/pktcap/capin14.pcap&lt;br /&gt;pktcap-uw --switchport 50331695 --dir 1 --tcpport 2036 -o /vmfs/volumes/620a7fad-ea2a095e-bc75-0025b50502cf/pktcap/capout14.pcap&lt;/p&gt;
&lt;hr /&gt;
&lt;h1&gt;references:&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.networking.doc/GUID-5CE50870-81A9-457E-BE56-C3FCEEF3D0D5.html&quot;&gt;Capturing and Tracing Network Packets by Using the pktcap-uw Utility (vmware.com)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2051814&quot;&gt;Using the pktcap-uw tool in ESXi 5.5 and later (2051814) (vmware.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VMware unable to unmount datastore</title><link>https://sajalchoudhary.net/til/vmware-unable-to-unmount-datastore/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmware-unable-to-unmount-datastore/</guid><pubDate>Tue, 31 May 2022 11:53:00 GMT</pubDate><content:encoded>&lt;p&gt;Error&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The resource &apos;0200fe0000624a9370f25b6296a38b4191000d2851466c61736841&apos; is in use.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;logdir is present&lt;/h1&gt;
&lt;p&gt;Go to Manage -&amp;gt; Settings -&amp;gt; Advanced System Settings. Find ScratchConfig.CurrentScratchLocation and Syslog.global.logDir&lt;br /&gt;If these mention datastores, change that.&lt;/p&gt;
&lt;h1&gt;vCLS VMs are present&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Go to the cluster&lt;/li&gt;
&lt;li&gt;Under Configure &amp;gt;  &lt;strong&gt;vSphere Cluster Services&lt;/strong&gt;, select &lt;strong&gt;General&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;click on &lt;strong&gt;EDIT VCLS MODE&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;In the Edit vCLS Mode pop up window, click on the second radio option &lt;strong&gt;Retreat Mode&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Through CLI&lt;/h2&gt;
&lt;h3&gt;Find the UUID for datastore to be removed.&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage filesystem list
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Unmount&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage filesystem unmount [-u _UUID_ | -l _label_ | -p _path_ ]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If the VMFS filesystem you are attempting to unmount has active I/O or has not fulfilled the prerequisites to unmount the VMFS datastore, you see an error in the VMkernel logs similar to:  &lt;/p&gt;
&lt;p&gt;WARNING: VC: 637: unmounting opened volume (&apos;4e414917-a8d75514-6bae-0019b9f1ecf4&apos; &apos;LUN01&apos;) is not allowed.&lt;br /&gt;VC: 802: Unmount VMFS volume f530 28 2 4e414917a8d7551419006bae f4ecf19b 4 1 0 0 0 0 0 : Busy&lt;/p&gt;
&lt;h2&gt;verify that the datastore is unmounted, run this command:&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;esxcli storage filesystem list
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/2004605&quot;&gt;How to detach a LUN device from ESXi hosts (2004605) (vmware.com)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bobcares.com/blog/steps-to-fix-unable-to-unmount-delete-vmfs-datastore-the-resource-is-in-use/&quot;&gt;Steps to fix unable to unmount/delete VMFS Datastore: the resource is in use (bobcares.com)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kb.vmware.com/s/article/91890&quot;&gt;How to Disable vCLS on a Cluster via Retreat Mode (91890) (vmware.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Convert a dynamic dns record to static</title><link>https://sajalchoudhary.net/til/convert-a-dynamic-dns-record-to-static/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/convert-a-dynamic-dns-record-to-static/</guid><pubDate>Wed, 25 May 2022 11:14:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;dnsmgmt.msc&lt;/li&gt;
&lt;li&gt;Enable advanced view.&lt;/li&gt;
&lt;li&gt;Find the record. Right click &amp;gt; Properties. Disable &lt;strong&gt;Delete this record when it becomes stale&lt;/strong&gt; check box and then click on &lt;strong&gt;OK&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/wiki/contents/articles/21726.how-to-convert-a-dynamic-resource-record-to-a-static-one-without-re-creating-it-in-dns.aspx#:~:text=To%20convert%20a%20dynamic%20resource%20record%20to%20a,stale%20check%20box%20and%20then%20click%20on%20OK&quot;&gt;How to Convert a Dynamic Resource Record to a Static One Without Re-Creating it in DNS - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>dns</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Install go</title><link>https://sajalchoudhary.net/til/install-go/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/install-go/</guid><pubDate>Wed, 25 May 2022 10:06:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Download tar file from &lt;a href=&quot;https://go.dev/doc/install&quot;&gt;https://go.dev/doc/install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create /usr/local/go if fresh install.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remove any previous Go installation&lt;/strong&gt; by deleting the /usr/local/go folder (if it exists), then extract the archive you just downloaded into /usr/local, creating a fresh Go tree in /usr/local/go:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;## Existing install
$ sudo rm -rf /usr/local/go &amp;amp;&amp;amp; tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz

## New install
$ sudo tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Add /usr/local/go/bin to the &lt;code&gt;PATH&lt;/code&gt; environment variable.Both /etc/profile and /etc/bashrc&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;export PATH=$PATH:/usr/local/go/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Verify that you&apos;ve installed Go by opening a command prompt and typing the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;$ go version
go version go1.18.2 linux/amd64
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://go.dev/doc/install&quot;&gt;go install&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>go</category><category>linux</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Linux Add path to $path</title><link>https://sajalchoudhary.net/til/linux-add-path-to-$path/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/linux-add-path-to-$path/</guid><pubDate>Wed, 25 May 2022 08:25:00 GMT</pubDate><content:encoded>&lt;h1&gt;Gotcha&lt;/h1&gt;
&lt;p&gt;The &lt;code&gt;/etc/profile&lt;/code&gt; is executed only for interactive shells and the &lt;code&gt;/etc/bashrc&lt;/code&gt; is executed for both interactive and non-interactive shells. In fact in Ubuntu the &lt;code&gt;/etc/profile&lt;/code&gt; calls the &lt;code&gt;/etc/bashrc&lt;/code&gt; directly.&lt;/p&gt;
&lt;h1&gt;Temporarily&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;export PATH=/home/dave/work:$PATH
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;For your self only&lt;/h1&gt;
&lt;p&gt;Add the export command above to .bashrc or .profile&lt;/p&gt;
&lt;h1&gt;Permanent for all users&lt;/h1&gt;
&lt;p&gt;Add export to /etc/profile file and /etc/bashrc&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export PATH=$PATH:/usr/local/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://bencane.com/2013/09/16/understanding-a-little-more-about-etcprofile-and-etcbashrc/#:~:text=The%20%2Fetc%2Fprofile%20file%20is%20not%20very%20different%20however,PS1%20for%20all%20shell%20users%20of%20the%20system.&quot;&gt;Understanding a little more about /etc/profile and /etc/bashrc - Benjamin Cane (bencane.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>linux</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows Force logoff users</title><link>https://sajalchoudhary.net/til/windows-force-logoff-users/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-force-logoff-users/</guid><pubDate>Tue, 24 May 2022 07:48:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;query session
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;logoff &amp;lt;id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://social.technet.microsoft.com/Forums/Lync/en-US/54657ae0-c192-4a0a-ae92-a53b3203ae16/how-to-force-logoff-local-users-with-status-disconnected&quot;&gt;How to force logoff local users with status disconnected (microsoft.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform bundle</title><link>https://sajalchoudhary.net/til/terraform-bundle/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-bundle/</guid><pubDate>Mon, 23 May 2022 09:58:00 GMT</pubDate><content:encoded>&lt;h1&gt;Terraform bundle tool install&lt;/h1&gt;
&lt;h2&gt;Pre-requisites&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;go / [[202205251306 Install go]]&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Install&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;# Clone v0.15 branch
$ git clone --single-branch --branch=v0.15 --depth=1 https://github.com/hashicorp/terraform.git

$ cd terraform

$ go build -o ../terraform-bundle ./tools/terraform-bundle
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Terrform bundle creation&lt;/h1&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/hashicorp/terraform/blob/v0.15/tools/terraform-bundle/README.md&quot;&gt;terraform/README.md at v0.15 · hashicorp/terraform · GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://go.dev/doc/install&quot;&gt;Download and install - The Go Programming Language&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Raise a certificate request on Windows</title><link>https://sajalchoudhary.net/til/raise-a-certificate-request-on-windows/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/raise-a-certificate-request-on-windows/</guid><pubDate>Fri, 20 May 2022 06:55:00 GMT</pubDate><content:encoded>&lt;h1&gt;Script&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Ensure that you have the configuration name correct. Just run &lt;strong&gt;certutil&lt;/strong&gt; and copy the CA Config name from the output.&lt;/li&gt;
&lt;li&gt;Multi cert script developed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Manual&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Open mmc. File &amp;gt; Add/Remove Snapin. Add Certificates. Select Computer Account.&lt;/li&gt;
&lt;li&gt;Go to Certificates &amp;gt; Personal.&lt;/li&gt;
&lt;li&gt;Right Click &amp;gt; All Tasks &amp;gt; Advanced Operations &amp;gt; Create Custom Request.&lt;/li&gt;
&lt;li&gt;Next. Next.&lt;/li&gt;
&lt;li&gt;On Custom Request page, Select Web Server as template. Next.&lt;/li&gt;
&lt;li&gt;On Certificate Information page, expand by clicking icon next to Details. Click on Properties.&lt;/li&gt;
&lt;li&gt;In Subject tab. Subject Name: select type as Common Name. In value field, put the required DNS value (fitcs.fi.tcsecp.com). Click Add.&lt;/li&gt;
&lt;li&gt;In Alternative Name, select DNS and as value put the same thing as above (fitcs.fi.tcsecp.com). Click Add.&lt;/li&gt;
&lt;li&gt;In General tab, put Friendly name, and description.&lt;/li&gt;
&lt;li&gt;In Private key tab, expand Key options, select &quot;Make Private key exportable&quot; option. Click apply. Click OK.&lt;/li&gt;
&lt;li&gt;Click Next. Select a location for the generated file. Name the file. Click Save. Click Finish. File will be generated at the location you selected.&lt;/li&gt;
&lt;li&gt;If you need private key as well, go to Certificate Enrollment Requests &amp;gt; Certificates. You will find the cert here.&lt;/li&gt;
&lt;li&gt;Right click on the cert. All Tasks &amp;gt; Export. Next.&lt;/li&gt;
&lt;li&gt;Select Yes, Export the private key. Next.&lt;/li&gt;
&lt;li&gt;Click on the Password option, provide the password. Click Next.&lt;/li&gt;
&lt;li&gt;Select the location for the private key and press next.&lt;/li&gt;
&lt;li&gt;Verify the details on the page and click finish. Key will be generate at the mentioned location.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://www.entrust.com/knowledgebase/ssl/how-to-generate-certificate-signing-request-using-microsoft-management-console-mmc-on-windows-2012&quot;&gt;How to generate Certificate Signing Request using Microsoft Management Console (MMC) on Windows 2012 (entrust.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform custom worker image</title><link>https://sajalchoudhary.net/til/terraform-custom-worker-image/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-custom-worker-image/</guid><pubDate>Tue, 17 May 2022 12:19:00 GMT</pubDate><content:encoded>&lt;h1&gt;Commands&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;# To build image from dockerfile
docker build -t tcs/customworker:1.0.1 . 

# To build from existing image
# Run an ephemeral container and bash into it
docker run --rm -it hashicorp/build-worker:now /bin/bash
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Directory&lt;/h1&gt;
&lt;p&gt;Directory must contain dockerfile, and anyother files that need to be part of the image (certs, provider files,etc.)&lt;/p&gt;
&lt;h1&gt;Dockerfile&lt;/h1&gt;
&lt;p&gt;Idea is to use the existing terraform worker image and then copy the required files to it and then that&apos;s it.&lt;br /&gt;Terraform default worker image is based on ubuntu.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
FROM hashicorp/build-worker:now

# Include all necessary CA certificates.
ADD chain.crt /usr/local/share/ca-certificates/

# Create provider directory
RUN mkdir /usr/share/terraform
RUN mkdir /usr/share/terraform/providers
RUN mkdir /usr/share/terraform/providers/registry.terraform.io

# Add providers to the image
ADD providers/* /usr/share/terraform/providers/registry.terraform.io

# Add init script
ADD init_custom_worker.sh /usr/local/bin/init_custom_worker.sh

# Update the CA certificates bundle to include newly added CA certificates.
RUN update-ca-certificates
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Initialization script&lt;/h1&gt;
&lt;p&gt;Script must be kept at /usr/local/bin/init_custom_worker.sh&lt;br /&gt;This basically adds the custom provider location.&lt;br /&gt;To do testing add a sleep command to the end of init script and run docker exec to use bash.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash

cat &amp;gt;&amp;gt; /tmp/cli.tfrc &amp;lt;&amp;lt;EOF
provider_installation {
 filesystem_mirror {
   path    = &quot;/usr/share/terraform/providers&quot;
   include = [&quot;*/*&quot;]
 }
}
EOF
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Configure TFE to use custom worker&lt;/h1&gt;
&lt;p&gt;Make sure that Terraform Enterprise is configured to use the custom worker image by opening the installer dashboard at port 8800 of the installation and choosing &lt;strong&gt;Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Terraform Build Worker Image&lt;/strong&gt; &amp;gt; &lt;strong&gt;Provide the location of a custom image&lt;/strong&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://support.hashicorp.com/hc/en-us/articles/1500001875182-How-To-Set-Up-Provider-Installation-in-Terraform-Enterprise#:~:text=%20Procedure%20%201%20In%20order%20to%20add,Please%20note%20that%20there%20are%20strict...%20More%20&quot;&gt;How To Set Up Provider Installation in Terraform Enterprise – HashiCorp Help Center&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.terraform.io/enterprise/install/interactive/installer#alternative-terraform-worker-image&quot;&gt;Interactive Installation - Install and Config - Terraform Enterprise | Terraform by HashiCorp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/straubt1/tfe-alternative-worker&quot;&gt;TFE alternative worker git&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>CloudRemote add user</title><link>https://sajalchoudhary.net/til/cloudremote-add-user/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cloudremote-add-user/</guid><pubDate>Mon, 16 May 2022 14:21:00 GMT</pubDate><content:encoded>&lt;ul&gt;
&lt;li&gt;First we needed to access the remote MQ by browsing the IP and to port 15672 on the CloudRemote VM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: &lt;a href=&quot;http://10.45.99.206:15672/#/users&quot;&gt;http://10.45.99.206:15672/#/users&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Next login using &quot;cliqr&quot; user and find the password in the content of /etc/rabbitmq/password in the rabbitmq container found in the docker running in the same MQ server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next proceeded to add the cliqr_worker with password cliqr_worker in the users&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next we added full permissions on the vhost root for the cliqr_worker user (for both / and ).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;VMW cloud remotes&lt;/p&gt;
&lt;p&gt;![[Pasted image 20220517092204.png]]&lt;/p&gt;
&lt;p&gt;![[Pasted image 20220517092234.png]]&lt;/p&gt;
&lt;p&gt;![[Pasted image 20220517092240.png]]&lt;/p&gt;
&lt;h2&gt;![[Pasted image 20220517092250.png]]&lt;/h2&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ccs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Cloud Remote bootstrap procedure</title><link>https://sajalchoudhary.net/til/cloud-remote-bootstrap-procedure/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/cloud-remote-bootstrap-procedure/</guid><pubDate>Mon, 16 May 2022 14:11:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Go to path: /opt/cisco/pilot/builds/pilot_release-5.5.2/bin&lt;/li&gt;
&lt;li&gt;Run bootstrap.sh&lt;/li&gt;
&lt;li&gt;Update the user settings according to:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;![[202205161721 CloudRemote add user]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ccs</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform scaling VMs</title><link>https://sajalchoudhary.net/til/terraform-scaling-vms/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-scaling-vms/</guid><pubDate>Wed, 04 May 2022 17:02:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;Define a var file with a list of objects, e.g. VMname, cpu, etc.&lt;/li&gt;
&lt;li&gt;Define resource block for VM.&lt;/li&gt;
&lt;li&gt;Upon apply, VMs are deployed in an order like : web[0], web[1], web[2]&lt;br /&gt;![[Pasted image 20220504200506.png]]&lt;/li&gt;
&lt;li&gt;You can scale up/down from the end, i.e. specify web[3], web[4]. But removal will be LIFO, so web[4], web[3] and so on.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Certificate reference</title><link>https://sajalchoudhary.net/til/certificate-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/certificate-reference/</guid><pubDate>Mon, 02 May 2022 08:47:00 GMT</pubDate><content:encoded>&lt;p&gt;![[202205021140 openssl convert pkcs to pem]]&lt;br /&gt;![[202204281255 Compare private key and ssl]]&lt;br /&gt;![[202204291221 Openssl generate csr]]&lt;br /&gt;![[202204291133 Certificate output in plaintext]]&lt;br /&gt;![[202204281257 Certificate remove password from private key]]&lt;br /&gt;![[202204281255 Compare private key and ssl]]&lt;br /&gt;![[202204271226 How to create stacked certificates]]&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>openssl convert pkcs to pem</title><link>https://sajalchoudhary.net/til/openssl-convert-pkcs-to-pem/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openssl-convert-pkcs-to-pem/</guid><pubDate>Mon, 02 May 2022 08:40:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://knowledge.digicert.com/solution/SO21448.html&quot;&gt;How to convert PKCS #7 (.p7b) to PEM certificate format using OpenSSL (digicert.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Openssl generate csr</title><link>https://sajalchoudhary.net/til/openssl-generate-csr/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/openssl-generate-csr/</guid><pubDate>Fri, 29 Apr 2022 09:21:00 GMT</pubDate><content:encoded>&lt;h1&gt;Command&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;openssl req -out fitcsecp.csr -new -newkey rsa:2048 -nodes -keyout fitcsecp_private_key.key -addext &quot;subjectAltName = DNS:domain-name.com&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Fill out details&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;Country Name (2 letter code) [XX]:
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server&apos;s hostname) []:
Email Address []:

Please enter the following &apos;extra&apos; attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ibm.com/support/pages/how-create-certificate-signing-request-openssl?msclkid=9f588ce2c79e11ec800c3933be9dff51&quot;&gt;How to create Certificate Signing Request with OpenSSL (ibm.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Certificate output in plaintext</title><link>https://sajalchoudhary.net/til/certificate-output-in-plaintext/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/certificate-output-in-plaintext/</guid><pubDate>Fri, 29 Apr 2022 08:33:00 GMT</pubDate><content:encoded>&lt;h1&gt;Issue&lt;/h1&gt;
&lt;p&gt;“x509: certificate relies on legacy Common Name field” error&lt;/p&gt;
&lt;h2&gt;Fix&lt;/h2&gt;
&lt;p&gt; cert needs to be reissued to include the subjectAltName property, and should be added directly when creating an SSL self-signed certificate using openssl command, by specifying an -addext flag.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-addext &quot;subjectAltName = DNS:domain-name.com&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;openssl x509 -in server.crt -noout -text
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://jfrog.com/knowledge-base/general-what-should-i-do-if-i-get-an-x509-certificate-relies-on-legacy-common-name-field-error/?msclkid=88df7800c79611ecac9b1f57c6d766d7&quot;&gt;GENERAL: What should I do if I get an &quot;x509: certificate relies on legacy Common Name field&quot; error? (jfrog.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Three-tier CA setup</title><link>https://sajalchoudhary.net/til/three-tier-ca-setup/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/three-tier-ca-setup/</guid><pubDate>Thu, 28 Apr 2022 11:21:00 GMT</pubDate><content:encoded>&lt;h1&gt;Architecture&lt;/h1&gt;
&lt;p&gt;Root CA (1 | offline | workgroup)&lt;br /&gt;Intermediary CA (1 | offline | workgroup)&lt;br /&gt;Issuers (2 | In domain | clustered)&lt;/p&gt;
&lt;h1&gt;PowerShell Commands&lt;/h1&gt;
&lt;h2&gt;Install&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Install-WindowsFeature ADCS-Cert-Authority
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Install-AdcsCertificationAuthority -CAType &quot;EnterpriseSubordinateCA&quot; -CACommonName &quot;vKernelRO Issuing Certification Authority 01&quot; -CADistinguishedNameSuffix &quot;DC=vKernelRO,DC=RO&quot; -KeyLength 4096 -HashAlgorithmName SHA256 -CryptoProviderName &quot;RSA#Microsoft Software Key Storage Provider&quot;  -DatabaseDirectory &quot;D:\CAdb&quot;  -LogDirectory &quot;D:\CALogs&quot;Implementing a three-tier CA Hierarchy
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Uninstall&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;Uninstall-WindowsFeature ADCS-Cert-Authority
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Uninstall-AdcsCertificationAuthority
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Create &lt;strong&gt;CAPolicy.inf&lt;/strong&gt; in C:\Windows&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[Version]
Signature=$Windows NT$&quot;

[certsrv_server]
Renewalkeylength=2048
RenewalvalidityPeriodUnits=20
RenewalvalidityPeriod=years

CRLPeriod=Years
CRLPeriodUnits=2
CRLOverlapPeriod=Years
CRLOverlapUnits=1
CRLDeltaPeriodUnits=0
CRLDeltaPeriod=days

DiscreteSignatureAlgorithm=1
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install AD Certificate services role.&lt;/p&gt;
&lt;p&gt; ![[Pasted image 20220428143118.png]]&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;![[Pasted image 20220428143029.png]]&lt;/p&gt;
&lt;h1&gt;Root CA&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create CAPolicy.inf under C:\Windows&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[Version]
Signature=$Windows NT$&quot;

[certsrv_server]
Renewalkeylength=2048
RenewalvalidityPeriodUnits=20
RenewalvalidityPeriod=years

CRLPeriod=Years
CRLPeriodUnits=2
CRLOverlapPeriod=Years
CRLOverlapUnits=1
CRLDeltaPeriodUnits=0
CRLDeltaPeriod=days

DiscreteSignatureAlgorithm=1
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Install AD CS role.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Configure ADCS .&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-AdcsCertificationAuthority -CAType &quot;StandaloneRootCA&quot; -CACommonName &quot;Finland TCSECP RootCA&quot; -CADistinguishedNameSuffix &quot;DC=fi,DC=tcsecp,DC=com&quot; -KeyLength 2048 -HashAlgorithmName SHA256 -CryptoProviderName &quot;RSA#Microsoft Software Key Storage Provider&quot;  -DatabaseDirectory &quot;D:\CA\CertDB&quot;  -LogDirectory &quot;D:\CA\CertLogs&quot;  -ValidityPeriod Years  -ValidityPeriodUnits 20
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Configure publication points and certificates validity period for the Root CA.&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right-click the CA name and choose &lt;strong&gt;Properties&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Once the &lt;strong&gt;Properties&lt;/strong&gt; window opens, go to the &lt;strong&gt;Extensions&lt;/strong&gt; tab and remove all the locations from the list except the first one, by selecting them one by one and clicking the &lt;strong&gt;Remove&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Then add the url (&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/RootCA.crl&quot;&gt;http://pki.fi.tcsecp.com/crl/RootCA.crl&lt;/a&gt;) for the web server as publication point. Never use the HTTPS protocol for CRT/CRL file retrieval because is not going to work. CryptoAPI will permanently fail to fetch HTTPS URLs. check the box &lt;strong&gt;Include in the CDP extension of issued certificates&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Move to the AIA extension by clicking the &lt;strong&gt;Select extension&lt;/strong&gt; drop-down box. As before, remove all the locations in the list except the first one, then hit the &lt;strong&gt;Add&lt;/strong&gt; button to add the new location (&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/RootCA.crt&quot;&gt;http://pki.fi.tcsecp.com/crl/RootCA.crt&lt;/a&gt;) for the root CA certificate. Once added, don’t forget to check the box &lt;strong&gt;Include in the AIA extension of issued certificates&lt;/strong&gt;. Click &lt;strong&gt;OK&lt;/strong&gt; then &lt;strong&gt;Yes&lt;/strong&gt; to restart the &lt;strong&gt;Certificate Services&lt;/strong&gt; service.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Make our root CA issue certificates valid for 10 years&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;certutil -setreg ca\ValidityPeriodUnits 10
certutil -setreg ca\ValidityPeriod &quot;Years&quot;
net stop certsvc
net start certsvc
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy certs from &lt;strong&gt;%Windir%\System32\Certsrv\Certenroll&lt;/strong&gt; to the Webserver path mentioned in the step above. Rename as needed to Root.crl and Root.crt.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Policy CA&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Create CAPolicy.inf under C:\Windows&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[Version]
Signature=$Windows NT$&quot;
 
[certsrv_server]
Renewalkeylength=2048
RenewalvalidityPeriodUnits=10
RenewalvalidityPeriod=years
 
CRLPeriod=Years
CRLPeriodUnits=2
CRLOverlapPeriod=Years
CRLOverlapUnits=1
CRLDeltaPeriodUnits=0
CRLDeltaPeriod=days
 
DiscreteSignatureAlgorithm=1
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;copy the root CA certificate in the policy CA server certificates store. This needs to be imported in the &lt;strong&gt;Trusted Root Certification Authorities&lt;/strong&gt; folder. Verify the same via mmc&amp;gt;certificates.&lt;/li&gt;
&lt;li&gt;Install AD CS role.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Configure ADCS .&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-AdcsCertificationAuthority -CAType &quot;StandaloneSubordinateCA&quot; -CACommonName &quot;Finland TCSECP PolicyCA&quot; -CADistinguishedNameSuffix &quot;DC=fi,DC=tcsecp,DC=com&quot; -KeyLength 2048 -HashAlgorithmName SHA256 -CryptoProviderName &quot;RSA#Microsoft Software Key Storage Provider&quot;  -DatabaseDirectory &quot;D:\CA\CertDB&quot;  -LogDirectory &quot;D:\CA\CertLogs&quot;  -ValidityPeriod Years
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy the .req file created in step a to the root ca.&lt;/li&gt;
&lt;li&gt;open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right-click the CA name and choose &lt;strong&gt;All Tasks &amp;gt; Submit New Request&lt;/strong&gt;. Select the .req file.&lt;/li&gt;
&lt;li&gt;Inside the &lt;strong&gt;Pending Request&lt;/strong&gt; folder we should have a certificate request in a pending state. Right-click it and choose &lt;strong&gt;All Tasks &amp;gt; Issue&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now click the &lt;strong&gt;Issued Certificates&lt;/strong&gt; folder and open the certificate we just issued. Go to the &lt;strong&gt;Details&lt;/strong&gt; tab and click the &lt;strong&gt;Copy to File&lt;/strong&gt; button. Export the certificate by following the wizard.&lt;/li&gt;
&lt;li&gt;Back on the policy CA server, open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right -click the CA name and choose &lt;strong&gt;All Tasks &amp;gt; Install CA Certificate&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Search for the certificate we just exported from the root CA, select it and click &lt;strong&gt;Open&lt;/strong&gt;. The certificate installation will take a few seconds to complete and once it’s done click the green arrow button from the &lt;strong&gt;Tools&lt;/strong&gt; menu to start the Certificate Services service; which should start successfully.&lt;/li&gt;
&lt;li&gt;Configure publication points and certificates validity period for the Root CA.&lt;ol&gt;
&lt;li&gt;Open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right-click the CA name and choose &lt;strong&gt;Properties&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Once the &lt;strong&gt;Properties&lt;/strong&gt; window opens, go to the &lt;strong&gt;Extensions&lt;/strong&gt; tab and remove all the locations from the list except the first one, by selecting them one by one and clicking the &lt;strong&gt;Remove&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Then add the url (&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/InterCA.crl&quot;&gt;http://pki.fi.tcsecp.com/crl/InterCA.crl&lt;/a&gt;) for the web server as publication point. Never use the HTTPS protocol for CRT/CRL file retrieval because is not going to work. CryptoAPI will permanently fail to fetch HTTPS URLs. check the box &lt;strong&gt;Include in the CDP extension of issued certificates&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Move to the AIA extension by clicking the &lt;strong&gt;Select extension&lt;/strong&gt; drop-down box. As before, remove all the locations in the list except the first one, then hit the &lt;strong&gt;Add&lt;/strong&gt; button to add the new location (&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/InterCA.crt&quot;&gt;http://pki.fi.tcsecp.com/crl/InterCA.crt&lt;/a&gt;) for the root CA certificate. Once added, don’t forget to check the box &lt;strong&gt;Include in the AIA extension of issued certificates&lt;/strong&gt;. Click &lt;strong&gt;OK&lt;/strong&gt; then &lt;strong&gt;Yes&lt;/strong&gt; to restart the &lt;strong&gt;Certificate Services&lt;/strong&gt; service.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Set cert duration to 5 years.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;certutil -setreg ca\ValidityPeriodUnits 5
certutil -setreg ca\ValidityPeriod &quot;Years&quot;
net stop certsvc
net start certsvc
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy certs from &lt;strong&gt;%Windir%\System32\Certsrv\Certenroll&lt;/strong&gt; to the Webserver path mentioned in the step above. Rename as needed to InterCA.crl and InterCA.crt.&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Issuer CA&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Add gpo to enable root and inter ca certs for all machines.&lt;/li&gt;
&lt;li&gt;Go to issuer vms and run gpupdate /force. Verify in mmc&amp;gt;certs.&lt;/li&gt;
&lt;li&gt;Create CAPolicy.inf under C:\Windows&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[Version]
Signature=$Windows NT$&quot;
 
[certsrv_server]
Renewalkeylength=2048
RenewalvalidityPeriodUnits=5
RenewalvalidityPeriod=years
 
CRLPeriod=Days
CRLPeriodUnits=7
CRLDeltaPeriod=Hours
CRLDeltaPeriodUnits=24
CRLOverlapUnits=2
CRLOverlapPeriod=Days
CRLDeltaOverlapUnits=Hours
DeltaOverlapPeriod=6
 
DiscreteSignatureAlgorithm=1
LoadDefaultTemplates=0
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Install AD CS role.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;User should be enterprise admin. Configure ADCS .&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-AdcsCertificationAuthority -CAType &quot;StandaloneSubordinateCA&quot; -CACommonName &quot;Finland TCSECP PolicyCA&quot; -CADistinguishedNameSuffix &quot;DC=fi,DC=tcsecp,DC=com&quot; -KeyLength 2048 -HashAlgorithmName SHA256 -CryptoProviderName &quot;RSA#Microsoft Software Key Storage Provider&quot;  -DatabaseDirectory &quot;D:\CA\CertDB&quot;  -LogDirectory &quot;D:\CA\CertLogs&quot;  -ValidityPeriod Years
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Copy the .req file to intermediary ca.&lt;/li&gt;
&lt;li&gt;open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right-click the CA name and choose &lt;strong&gt;All Tasks &amp;gt; Submit New Request&lt;/strong&gt;. Select the .req file.&lt;/li&gt;
&lt;li&gt;Inside the &lt;strong&gt;Pending Request&lt;/strong&gt; folder we should have a certificate request in a pending state. Right-click it and choose &lt;strong&gt;All Tasks &amp;gt; Issue&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now click the &lt;strong&gt;Issued Certificates&lt;/strong&gt; folder and open the certificate we just issued. Go to the &lt;strong&gt;Details&lt;/strong&gt; tab and click the &lt;strong&gt;Copy to File&lt;/strong&gt; button. Export the certificate by following the wizard.&lt;/li&gt;
&lt;li&gt;Copy the file to the issuer node. open the &lt;strong&gt;Certification Authority&lt;/strong&gt; console, right -click the CA name and choose &lt;strong&gt;All Tasks &amp;gt; Install CA Certificate&lt;/strong&gt;. Start after install is completed.&lt;/li&gt;
&lt;li&gt;Backup the CA&lt;ol&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;On the &lt;strong&gt;Action&lt;/strong&gt; menu, click &lt;strong&gt;All Tasks&lt;/strong&gt;, and then click &lt;strong&gt;Backup CA&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt; On the Welcome page of the CA backup wizard, click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Select &lt;strong&gt;Private key and CA certificate&lt;/strong&gt; and provide a directory name where you want to temporarily store the CA certificate and optionally the key. Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Provide a password to protect the CA key and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Finish.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Shutdown the CA to release disk.&lt;ol&gt;
&lt;li&gt;While the CA is selected in the left pane, on the &lt;strong&gt;Action&lt;/strong&gt; menu, click &lt;strong&gt;All Tasks&lt;/strong&gt;, and then click &lt;strong&gt;Stop Service&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Copy the backup created to the second node.&lt;/li&gt;
&lt;li&gt;Open mmc --&amp;gt; certificates. expand the &lt;strong&gt;Certificates (Local Computer)&lt;/strong&gt; node and select the &lt;strong&gt;Personal&lt;/strong&gt; store.&lt;/li&gt;
&lt;li&gt;Create CAPolicy.inf under C:\Windows&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;[Version]
Signature=$Windows NT$&quot;
 
[certsrv_server]
Renewalkeylength=2048
RenewalvalidityPeriodUnits=5
RenewalvalidityPeriod=years
 
CRLPeriod=Days
CRLPeriodUnits=7
CRLDeltaPeriod=Hours
CRLDeltaPeriodUnits=24
CRLOverlapUnits=2
CRLOverlapPeriod=Days
CRLDeltaOverlapUnits=Hours
DeltaOverlapPeriod=6
 
DiscreteSignatureAlgorithm=1
LoadDefaultTemplates=0
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;Install AD CS role.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;User should be enterprise admin. Configure ADCS .&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;Use existing private key&lt;/strong&gt;, choose &lt;strong&gt;Select a certificate and use its associated private key&lt;/strong&gt;, then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the CA certificate that was generated on the first node and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Change the default paths for the database. In the dialog box stating that an existing database was found, select &lt;strong&gt;Yes&lt;/strong&gt; to overwrite it.&lt;/li&gt;
&lt;li&gt;Logoff from the node.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Setting up the failover cluster.&lt;ol&gt;
&lt;li&gt;Create cluster&lt;/li&gt;
&lt;li&gt;Configure cluster as generic service, and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the list of services and applications, select &lt;strong&gt;Generic Service&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the list of services, select &lt;strong&gt;Active Directory Certificate Services&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Mark the disk storage that is still mounted to the node and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To configure a shared registry hive, click &lt;strong&gt;Add&lt;/strong&gt;, type &lt;strong&gt;SYSTEM\CurrentControlSet\Services\CertSvc&lt;/strong&gt; and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Next&lt;/strong&gt; twice.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;Finish&lt;/strong&gt; to complete the failover configuration for certificate services.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;Configuring publication points and certificates validity period for the Root CA&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;http://pki.fi.tcsecp.com/RootCA.crl&quot;&gt;http://pki.fi.tcsecp.com/RootCA.crl&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Root server&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/RootCA.crl&quot;&gt;http://pki.fi.tcsecp.com/crl/RootCA.crl&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://pki.fi.tcsecp.com/crl/RootCA.crt&quot;&gt;http://pki.fi.tcsecp.com/crl/RootCA.crt&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Install clustered issuing CAs&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;User should be enterprise admin&lt;/li&gt;
&lt;li&gt;root and inter certs applied as gpo&lt;/li&gt;
&lt;li&gt;gpupdate /force&lt;/li&gt;
&lt;li&gt;install ca role and configure.&lt;ol&gt;
&lt;li&gt;Install-WindowsFeature ADCS-Cert-Authority&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Configuration:&lt;ol&gt;
&lt;li&gt;FITCSECP-IssuerCA&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;DN to use&lt;br /&gt;CN = FITCSECP-RootCA&lt;br /&gt;CN = FITCSECP-InterCA&lt;br /&gt;CN=FITCSECP-IssuerCA&lt;br /&gt;    DC=fi&lt;br /&gt;    DC=tcsecp&lt;br /&gt;    DC=com&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://social.technet.microsoft.com/wiki/contents/articles/9256.active-directory-certificate-services-ad-cs-clustering.aspx#Understanding_Names_Used_in_a_Cluster_Configuration&quot;&gt;TechNet Wiki (microsoft.com)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.vkernel.ro/blog/building-a-three-tire-windows-certification-authority-hierarchy&quot;&gt;Building a three-tier Windows Certification Authority Hierarchy (vkernel.ro)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cert</category><category>internalca</category><category>powershell</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Certificate remove password from private key</title><link>https://sajalchoudhary.net/til/certificate-remove-password-from-private-key/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/certificate-remove-password-from-private-key/</guid><pubDate>Thu, 28 Apr 2022 09:57:00 GMT</pubDate><content:encoded>&lt;h1&gt;Remove Private key&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;openssl rsa -in [file1.key] -out [file2.key]
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://haythamsalhi.wordpress.com/2018/07/04/remove-private-key-password-using-openssl/?msclkid=531a8789c6d611ecbc82b9fce9010b6c&quot;&gt;Remove private key password using openSSL – Tricks and Picks (wordpress.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Compare private key and ssl</title><link>https://sajalchoudhary.net/til/compare-private-key-and-ssl/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/compare-private-key-and-ssl/</guid><pubDate>Thu, 28 Apr 2022 09:55:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;openssl x509 -noout -modulus -in cert.crt | openssl md5  
openssl rsa -noout -modulus -in privkey.txt | openssl md5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where:&lt;br /&gt;cert.crt is your certificate&lt;br /&gt;privkey.txt is your private key.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ibm.com/support/pages/how-verify-if-private-key-matches-certificate?msclkid=56b4d493c6d411ecbe736b12e8e5e572&quot;&gt;How to verify if a Private Key Matches a Certificate? (ibm.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Jinja2 reference</title><link>https://sajalchoudhary.net/til/ansible-jinja2-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-jinja2-reference/</guid><pubDate>Thu, 28 Apr 2022 07:49:00 GMT</pubDate><content:encoded>&lt;h1&gt;Filters - file&lt;/h1&gt;
&lt;p&gt;basename&lt;/p&gt;
&lt;p&gt;win_basename&lt;/p&gt;
&lt;p&gt;win_splitdrive&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html?msclkid=0f1d143ec6c811ec8fcd74fde84f1fef&quot;&gt;Using filters to manipulate data — Ansible Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://palletsprojects.com/p/jinja/&quot;&gt;Jinja | The Pallets Projects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://jinja.palletsprojects.com/en/3.1.x/&quot;&gt;Jinja — Jinja Documentation (3.1.x) (palletsprojects.com)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>ansible</category><category>jinja</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Jinja2 Reference</title><link>https://sajalchoudhary.net/til/jinja2-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/jinja2-reference/</guid><pubDate>Wed, 27 Apr 2022 13:56:00 GMT</pubDate><content:encoded>&lt;p&gt;Jinja2 is used for templating.&lt;/p&gt;
&lt;h1&gt;String manipulation&lt;/h1&gt;
&lt;h2&gt;Substitution&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;The name is {{ name }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Upper case&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;The name is {{ name|upper }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Title Case&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ book_name|title }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Replace&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ dialogue | replace(&quot;Bourne&quot;,&quot;Bond&quot;) }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Array&lt;/h1&gt;
&lt;h2&gt;Highest number in an array&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ numbers | max }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Last number in an array&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ numbers | last }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Join&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ words | join(&apos; &apos;) }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Number of words&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{{ words | wordcount }}
&lt;/code&gt;&lt;/pre&gt;
&lt;h1&gt;Loops&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;{% for name_server in name_servers -%}
nameserver {{ name_server }}
{% endfor %}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Input:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;hosts&quot;: [
    {
      &quot;name&quot;: &quot;web1&quot;,
      &quot;ip_address&quot;: &quot;192.168.5.4&quot;
    },
    {
      &quot;name&quot;: &quot;web2&quot;,
      &quot;ip_address&quot;: &quot;192.168.5.5&quot;
    },
    {
      &quot;name&quot;: &quot;web3&quot;,
      &quot;ip_address&quot;: &quot;192.168.5.8&quot;
    },
    {
      &quot;name&quot;: &quot;db1&quot;,
      &quot;ip_address&quot;: &quot;192.168.5.9&quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;{% for host in hosts -%}
{{ host.name }} {{ host.ip_address }}
{% endfor %}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;IF&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;{% for host in hosts -%}
  {% if &quot;web&quot; in host.name %}
{{ host.name }} {{ host.ip_address }}
  {% endif %}
{% endfor %}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;br /&gt;&lt;a href=&quot;https://palletsprojects.com/p/jinja/&quot;&gt;Jinja | The Pallets Projects&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://jinja.palletsprojects.com/en/3.1.x/&quot;&gt;Jinja — Jinja Documentation (3.1.x) (palletsprojects.com)&lt;/a&gt;&lt;/p&gt;
</content:encoded><category>til</category><category>jinja</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows unable to take RDP</title><link>https://sajalchoudhary.net/til/windows-unable-to-take-rdp/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-unable-to-take-rdp/</guid><pubDate>Wed, 27 Apr 2022 09:32:00 GMT</pubDate><content:encoded>&lt;h1&gt;Server 2003 The RPC server is unavailable while trying to take RDP&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server&lt;/li&gt;
&lt;li&gt;Create a new key selecting Dword and name it as IgnoreRegUserConfigErrors&lt;/li&gt;
&lt;li&gt;now double click it and give a value as 1&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>vmdk based migration</title><link>https://sajalchoudhary.net/til/vmdk-based-migration/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vmdk-based-migration/</guid><pubDate>Wed, 27 Apr 2022 09:29:00 GMT</pubDate><content:encoded>&lt;p&gt;If NFS only RO&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upload vmdk/vmx files to datastore, based on free space. Create the folder with VMNAME.&lt;/li&gt;
&lt;li&gt;Register the vmx file. Specify all the disks.&lt;/li&gt;
&lt;li&gt;We can look at the vmx file to view all the paths. No need to edit anything.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If NFS has RW access&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Map the NFS to VMware.&lt;/li&gt;
&lt;li&gt;Register the VM using the .vmx file.&lt;/li&gt;
&lt;li&gt;After registration, update the vmdetails (network should exist on target)&lt;/li&gt;
&lt;li&gt;Perform storage migration.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>vmware</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>How to create stacked certificates</title><link>https://sajalchoudhary.net/til/how-to-create-stacked-certificates/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/how-to-create-stacked-certificates/</guid><pubDate>Wed, 27 Apr 2022 09:26:00 GMT</pubDate><content:encoded>&lt;p&gt;Stacked cert should be in this order:&lt;/p&gt;
&lt;p&gt;Server --&amp;gt;  intermediary --&amp;gt; root&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>cert</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Windows Event ID reference</title><link>https://sajalchoudhary.net/til/windows-event-id-reference/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/windows-event-id-reference/</guid><pubDate>Tue, 26 Apr 2022 13:12:00 GMT</pubDate><content:encoded>&lt;h1&gt;Member removed from local group&lt;/h1&gt;
&lt;p&gt;Event ID: 4733&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4733?msclkid=c429d91bc56111ec9e905acaaf9c6a27&quot;&gt;4733(S) A member was removed from a security-enabled local group. (Windows 10) - Windows security | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>windows</category><category>events</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Ansible Variable Precedence</title><link>https://sajalchoudhary.net/til/ansible-variable-precedence/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/ansible-variable-precedence/</guid><pubDate>Mon, 25 Apr 2022 14:17:00 GMT</pubDate><content:encoded>&lt;p&gt;In the order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extra vars&lt;/li&gt;
&lt;li&gt;Play vars&lt;/li&gt;
&lt;li&gt;Host vars&lt;/li&gt;
&lt;li&gt;Group vars&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>ansible</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Setup password less ssh</title><link>https://sajalchoudhary.net/til/setup-password-less-ssh/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/setup-password-less-ssh/</guid><pubDate>Mon, 25 Apr 2022 12:55:00 GMT</pubDate><content:encoded>&lt;p&gt;Create SSH pair&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh-keygen -f /home/thor/.ssh/maria
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copy public key to remote server&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh-copy-id -i ~/.ssh/tatu-key-ecdsa user@host
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://linuxize.com/post/how-to-setup-passwordless-ssh-login/#:~:text=In%20this%20tutorial%2C%20we%20will%20show%20you%20how,append%20it%20to%20the%20remote%20hosts%20~%2F.ssh%2Fauthorized_keys%20file.?msclkid=ce1c0729c49611ecb43110f2d85327ac&quot;&gt;How to Setup Passwordless SSH Login | Linuxize&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ssh.com/academy/ssh/keygen?msclkid=5c158a38c49711ec91acb0aebd4f9f18&quot;&gt;Ssh-keygen is a tool for creating new authentication key pairs for SSH. This is a tutorial on its use, and covers several special use cases.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>linux</category><category>ssh</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VM deployment to VMware</title><link>https://sajalchoudhary.net/til/vm-deployment-to-vmware/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vm-deployment-to-vmware/</guid><pubDate>Mon, 25 Apr 2022 11:31:00 GMT</pubDate><content:encoded>&lt;h1&gt;Disk&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;One of &lt;code&gt;datastore_id&lt;/code&gt; or &lt;code&gt;datastore_cluster_id&lt;/code&gt; must be specified.&lt;/li&gt;
&lt;li&gt;Use of &lt;code&gt;datastore_cluster_id&lt;/code&gt; requires vSphere Storage DRS to be enabled on the specified datastore cluster.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;datastore_cluster_id&lt;/code&gt; setting applies to the entire virtual machine resource. You cannot assign individual individual disks to datastore clusters. In addition, you cannot use the &lt;a href=&quot;https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine#attach&quot;&gt;&lt;code&gt;attach&lt;/code&gt;&lt;/a&gt; setting to attach external disks on virtual machines that are assigned to datastore clusters.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs/resources/virtual_machine&quot;&gt;vsphere_virtual_machine | Resources | hashicorp/vsphere | Terraform Registry&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>vmware</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>kubectl cheat sheet</title><link>https://sajalchoudhary.net/til/kubectl-cheat-sheet/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/kubectl-cheat-sheet/</guid><pubDate>Fri, 22 Apr 2022 08:32:00 GMT</pubDate><content:encoded>&lt;h1&gt;Get nodes and IP details&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;kubectl get nodes -o wide --no-headers | awk &apos;{ print $1 ,$7}&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>k8s</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Terraform variables</title><link>https://sajalchoudhary.net/til/terraform-variables/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/terraform-variables/</guid><pubDate>Fri, 22 Apr 2022 08:19:00 GMT</pubDate><content:encoded>&lt;h1&gt;Precedence&lt;/h1&gt;
&lt;p&gt;Terraform loads variables in the following order, with later sources taking precedence over earlier ones:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;terraform.tfvars&lt;/code&gt; file, if present.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;terraform.tfvars.json&lt;/code&gt; file, if present.&lt;/li&gt;
&lt;li&gt;Any &lt;code&gt;*.auto.tfvars&lt;/code&gt; or &lt;code&gt;*.auto.tfvars.json&lt;/code&gt; files, processed in lexical order of their filenames.&lt;/li&gt;
&lt;li&gt;Any &lt;code&gt;-var&lt;/code&gt; and &lt;code&gt;-var-file&lt;/code&gt; options on the command line, in the order they are provided. (This includes variables set by a Terraform Cloud workspace.)&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.terraform.io/language/values/variables&quot;&gt;Input Variables - Configuration Language | Terraform by HashiCorp&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>terraform</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>Linux ping multiple ips</title><link>https://sajalchoudhary.net/til/linux-ping-multiple-ips/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/linux-ping-multiple-ips/</guid><pubDate>Thu, 21 Apr 2022 11:58:00 GMT</pubDate><content:encoded>&lt;pre&gt;&lt;code&gt;for i in `cat ips.txt`; do if [ &quot;`ping -c 1 $i`&quot; ]; then echo $i,pinging; else echo $i,failed; fi; done &amp;gt;&amp;gt; output.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash  
for ips in $(cat ip-list.txt); do  
if ping -c 1 $ips &amp;amp;&amp;gt; /dev/null  
then  
echo $ips&quot;,pinging&quot;  
else  
echo $ips&quot;,notpinging&quot;  
fi  
done
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
</content:encoded><category>til</category><category>linux</category><category>bash</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>PowerShell Arrays</title><link>https://sajalchoudhary.net/til/powershell-arrays/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/powershell-arrays/</guid><pubDate>Tue, 12 Apr 2022 12:31:00 GMT</pubDate><content:encoded>&lt;h1&gt;How to create arrays&lt;/h1&gt;
&lt;p&gt;An empty array can be created by using &lt;code&gt;@()&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Example array:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ExampleArray = @(
	&quot;C:\test&quot;,
	&quot;C:\test2&quot;
)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-arrays?view=powershell-7.2&quot;&gt;Everything you wanted to know about arrays - PowerShell | Microsoft Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>powershell</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item><item><title>VB script run</title><link>https://sajalchoudhary.net/til/vb-script-run/</link><guid isPermaLink="true">https://sajalchoudhary.net/til/vb-script-run/</guid><pubDate>Tue, 12 Apr 2022 06:53:00 GMT</pubDate><content:encoded>&lt;h1&gt;Issues&lt;/h1&gt;
&lt;h2&gt;Cscript.exe is not recognised&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Open regedit.&lt;/li&gt;
&lt;li&gt;Go to HKCR\CLSID{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32&lt;/li&gt;
&lt;li&gt;Within it, there is a registry value called (Default) which should carry a Data value of:&lt;blockquote&gt;
&lt;p&gt;C:\Windows\system32\vbscript.dll&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If it&apos;s anything else, we need to change it to the above.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;references:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://triplescomputers.com/blog/casestudies/solution-cant-find-script-engine-vbscript-for-script/&quot;&gt;cscript.exe not recognised&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content:encoded><category>til</category><category>windows</category><author>sajal@sajalchoudhary.net (Sajal Choudhary)</author></item></channel></rss>