<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PowerShell &#8211; Miroslav Šraga</title>
	<atom:link href="https://www.sraga.cz/tag/powershell/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sraga.cz</link>
	<description>Sdílím své zkušenosti s Microsoft 365 a Azure</description>
	<lastBuildDate>Sun, 25 Jan 2026 13:03:12 +0000</lastBuildDate>
	<language>cs</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Azure Communication Services od A po Z</title>
		<link>https://www.sraga.cz/azure-communication-services-od-a-po-z/</link>
					<comments>https://www.sraga.cz/azure-communication-services-od-a-po-z/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sun, 25 Jan 2026 13:03:12 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure AD / Entra ID]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[Správa IT]]></category>
		<category><![CDATA[Azure Communication Services]]></category>
		<category><![CDATA[Basic Authentication]]></category>
		<category><![CDATA[Entra ID]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[PowerShell]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=1465</guid>

					<description><![CDATA[Azure Communication Services (ACS) je cloudová platforma, která umožňuje integrovat e‑mail, SMS, chat, hlas i video do vlastních aplikací přes jednoduchá API a SDK. Využívá zabezpečení a identitu Microsoft Entra ID (OAuth 2.0), nabízí škálování, telemetrii a řízení nákladů, takže se hodí pro zasílání základních notifikací až po komplexní komunikační kanály. Pro zasílání e‑mailů je ... <a title="Azure Communication Services od A po Z" class="read-more" href="https://www.sraga.cz/azure-communication-services-od-a-po-z/" aria-label="Číst více o Azure Communication Services od A po Z">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="1465" class="elementor elementor-1465" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-bbdcef0 e-flex e-con-boxed e-con e-parent" data-id="bbdcef0" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-2c44e8c elementor-widget elementor-widget-text-editor" data-id="2c44e8c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Azure Communication Services (ACS) je <strong>cloudová</strong> platforma, která umožňuje <strong>integrovat e‑mail, SMS, chat, hlas i video do vlastních aplikací</strong> přes jednoduchá API a SDK.</p><p>Využívá zabezpečení a identitu Microsoft Entra ID (<strong>OAuth</strong> 2.0), nabízí škálování, telemetrii a řízení nákladů, takže se hodí pro zasílání základních notifikací až po komplexní komunikační kanály.</p><p>Pro zasílání e‑mailů je zde komponenta <strong>Azure Communication Services Email</strong>, která umožňuje programově <strong>odesílat</strong> například transakční <strong>zprávy</strong>, <strong>maily</strong> z <strong>multifunkčních</strong> zařízení, z internetových <strong>formulářů</strong>, <strong>skriptů</strong>, <strong>Logic Apps</strong>, Microsoft <strong>Sentinel</strong> a podobně.</p><p>Díky tomu může sloužit jako <strong><a href="https://www.sraga.cz/exchange-online-microsoft-vypne-basic-autentizaci-pro-client-submission-smtp-auth/" target="_blank" rel="noopener">náhrada za končící SMTP Basic Authentication</a></strong>. Klíč je v tom, že namísto běžných přihlašovacích údajů se v zařízení či aplikaci použije moderní ověřování přes Entra ID a zprávy se odesílají přes Communication Srvices Email standardním SMTP protokolem na portu 25 nebo 587.</p><p>Výsledkem je spolehlivější doručování, lepší audit a governance a výrazně bezpečnější model než přímé posílání přes SMTP s Basic autentizací ale při zachování naprosto totožné funkcionality.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6d7587d elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="6d7587d" data-element_type="widget" data-settings="{&quot;exclude_headings_by_selector&quot;:[],&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="table-of-contents.default">
				<div class="elementor-widget-container">
									<div class="elementor-toc__header">
						<h4 class="elementor-toc__header-title">
				Obsah			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__6d7587d" aria-expanded="true" aria-label="Open table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-down" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path></svg></div>
				<div class="elementor-toc__toggle-button elementor-toc__toggle-button--collapse" role="button" tabindex="0" aria-controls="elementor-toc__6d7587d" aria-expanded="true" aria-label="Close table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-up" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"></path></svg></div>
					</div>
				<div id="elementor-toc__6d7587d" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-d8ce7e1 e-flex e-con-boxed e-con e-parent" data-id="d8ce7e1" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-9212d06 elementor-widget elementor-widget-heading" data-id="9212d06" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Azure Communication Services - Email Comminication - celý postup</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-6be27a8 elementor-widget elementor-widget-video" data-id="6be27a8" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/snOQQRrmeEw&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-8488f8d elementor-widget elementor-widget-text-editor" data-id="8488f8d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Tento návod je mixem níže uvedených video-návodu, které jsem vydal již dříve. Videa jsem spojil tak, aby dávala ucelený postup od A až po Z.</p><p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3ac.png" alt="🎬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Obsah:</strong></p><p>00:00 &#8211; Úvod &#8211; Představení Azure Communication Services<br />02:50 &#8211; Základní limity služby<br />03:40 &#8211; Ceny (Azure Calculator)<br />06:39 &#8211; Důležité úkony, postup nasazení<br />09:05 &#8211; Vytvoření prostředku Azure Communication Service<br />11:00 &#8211; Vytvoření prostředku Email Communication Services<br />13:25 &#8211; Domain provisioning<br />&#8211; Free Azure subdomain<br />&#8211; Custom domain<br />17:45 &#8211; Propojení Azure Communication Service a Email Communication Services<br />19:00 &#8211; TEST: Odeslání e-mailu z Email Communication Services (Azure portál) &#8211; Free Azure subdomain<br />21:35 &#8211; Keys &amp; Connection strings &#8211; pro použití v Logic Apps a prostředí Azure<br />22:15 &#8211; Přidání vlastní domény do Email Communication Services (DNS: SPF, DKIM)<br />29:05 &#8211; TEST: Odeslání e-mailu z Email Communication Services (Azure portál) &#8211; vlastní doména / custom domain<br />30:10 &#8211; SMTP RELAY: Řízení přístupu IAM, Entra ID &#8211; Registrovaná aplikace &#8211; Communication and Email service Owner<br />&#8211; Udělení oprávnění<br />&#8211; Vytvoření Client secret pro Registrovanou aplikaci<br />&#8211; Vytvoření SMTP Username (uživatelské jméno pro SMTP)<br />37:24 &#8211; TEST: Odeslání emailu pomocí PowerShell scriptu přes Email Communication Services &#8211; ověření SMTP jméno + heslo (přes Registrovanou aplikaci a Client Secret / OAuth)<br />39:37 &#8211; TEST: Odeslání emailu pomocí PHP scriptu přes Email Communication Services &#8211; ověření SMTP jméno + heslo (přes Registrovanou aplikaci a Client Secret / OAuth)<br />40:45 &#8211; Nastavení vlastní identifikace odesílatele (MailFrom) namísto DoNotReply<br />46:15 &#8211; TEST &#8211; Odeslání e-mailu pomocí PowerShell skriptu s vlastní identifikací odesílatele (MailFrom)<br />46:20 &#8211; TEST &#8211; Odeslání e-mailu pomocí PHP skriptu s vlastní identifikací odesílatele (MailFrom)<br />50:08 &#8211; Azure Logic App &#8211; napojení na Communication Services, odeslání e-mailu<br />55:50 &#8211; Microsoft Sentinel &#8211; napojení na Communication Services, odeslání e-mailu<br />1:09:35 &#8211; Závěrečné shrnutí</p>								</div>
				</div>
				<div class="elementor-element elementor-element-984259f elementor-widget elementor-widget-heading" data-id="984259f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Azure Communication Services - odesílání e-mailu bez identity uživatele (Sentinel, Logic App)</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ce85202 elementor-widget elementor-widget-video" data-id="ce85202" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/iOPTcYNzg3w&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-6d2e6f8 elementor-widget elementor-widget-text-editor" data-id="6d2e6f8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V tomto videu se dozvíte, jakým způsobem <strong>odeslat e-mail ze služby Microsoft Sentinel</strong> nebo z jakékoliv <strong>Logic App</strong>, aniž by bylo potřeba použít identitu uživatele &#8211; tedy bez nutnosti použití identity uživatele s licencí Exchange Online. K odeslání e-mailů tedy nebudeme používat napojení na účet uživatele, ale použijeme službu Azure Communication Services a konkrétně komponentu Email Communication Service.</p><p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3ac.png" alt="🎬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Obsah:</strong><br />00:00 &#8211; Úvod<br />01:33 &#8211; Základní limity služby<br />02:30 &#8211; Ceny<br />05:33 &#8211; Vytvoření prostředku Azure Communication Service<br />07:35 &#8211; Vytvoření prostředku Email Communication Services<br />&#8211; Free Azure subdomain<br />&#8211; Custom domain<br />14:30 &#8211; Propojení Azure Communication Service a Email Communication Services<br />18:04 &#8211; Odeslání e-mailu z Logic App<br />24:40 &#8211; Nastavení vlastní domény (Custom domain)<br />32:17 &#8211; Azure Sentinel &#8211; jak odeslat e-mail s upozorněním na nový incident pomocí Email Communication Services<br />46:50 &#8211; Dodatečné informace:<br />&#8211; User Engagement Tracking<br />&#8211; MailFrom Addresses (vlastní adresy odesílatele)</p>								</div>
				</div>
				<div class="elementor-element elementor-element-ba07b65 elementor-widget elementor-widget-heading" data-id="ba07b65" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Odesílání emailů přes SMTP relay pomocí Microsoft Azure Communication Services</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-941694e elementor-widget elementor-widget-video" data-id="941694e" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/9BYnSXbL71c&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-d6b500b elementor-widget elementor-widget-text-editor" data-id="d6b500b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>ACS Email může sloužit jako <strong>náhrada za končící SMTP Basic Authentication</strong>. Klíč je v tom, že namísto běžných přihlašovacích údajů se v zařízení či aplikaci použije <strong>moderní ověřování přes Entra ID</strong> a zprávy se odesílají přes <strong>Communication Services Email</strong> standardním SMTP protokolem na portu 25 nebo 587.</p><p>Výsledkem je spolehlivější doručování, lepší audit a governance a výrazně bezpečnější model než přímé posílání přes SMTP s Basic autentizací ale při zachování naprosto totožné funkcionality.</p><p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3ac.png" alt="🎬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Obsah:</strong><br />00:00 &#8211; Úvod<br />01:50 &#8211; Důležité úkony<br />04:45 &#8211; Konfigurace Azure Communication Services &amp;&amp; Email Communication Services<br />06:45 &#8211; Entra ID &#8211; Registrovaná aplikace<br />09:05 &#8211; Udělení oprávnění<br />09:45 &#8211; Vytvoření Client secret pro Registrovanou aplikaci<br />12:30 &#8211; Vytvoření SMTP Username (uživatelské jméno pro SMTP)<br />13:50 &#8211; TEST &#8211; Odeslání e-mailu pomocí PowerShell skriptu<br />15:47 &#8211; TEST &#8211; Odeslání e-mailu pomocí PHP skriptu<br />16:57 &#8211; Nastavenní vlastní identifikace odesílatele (MailFrom) namísto DoNotReply<br />21:53 &#8211; TEST &#8211; Odeslání e-mailu pomocí PowerShell skriptu s vlastní identifikací odesílatele (MailFrom)<br />22:32 &#8211; TEST &#8211; Odeslání e-mailu pomocí PHP skriptu s vlastní identifikací odesílatele (MailFrom)<br />23:35 &#8211; Tipy na závěr, doporučení, ošetření chyb<br />25:25 &#8211; Zjištění aktuálních kvót<br />26:24 &#8211; Shrnutí, závěr</p><p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" />Postup:</strong><br />Microsoft Azure (Subscription)<br />Azure Communication Service (ACS)<br />Email Communication Service (ECS)<br />Internet Domain<br />Domain verification<br />Domain connection to ECS<br />Entra ID Registred App + Generated secret<br />SMTP Accounts<br />Mail From addresses<br />Test</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7abb089 elementor-widget elementor-widget-heading" data-id="7abb089" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">AZURE CLI: Přidání vlastního mailFrom</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ae140b0 elementor-widget elementor-widget-code-block-for-elementor" data-id="ae140b0" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># az communication email domain sender-username create --domain-name domena.cz --email-service-name 365lab-1-cs-ecs --resource-group &quot;security-rg&quot; --sender-username &quot;UserName&quot; --username &quot;UserName&quot; --display-name &quot;DisplayName&quot;

az communication email domain sender-username create --domain-name domena.cz --email-service-name 365lab-1-cs-ecs --resource-group &quot;security-rg&quot; --sender-username printer --username printer --display-name Printer</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-55a739a elementor-widget elementor-widget-heading" data-id="55a739a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">SCRIPT: Odeslání e-mailu pomocí PowerShell a ACS Email</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-5c8ff64 elementor-widget elementor-widget-code-block-for-elementor" data-id="5c8ff64" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># SmtpSend.ps1
# PowerShell script to send an email via SMTP
# www.sraga.cz

# Define SMTP server settings and email parameters
$SmtpServer = &quot;smtp.azurecomm.net&quot; # Azure Communication Services Email server
$SmtpPort = 587
$SmtpUser = &quot;userName@domena.cz&quot;
$SmtpPass = &quot;clientSecretValue&quot; # Entra ID Registreed Application
$SmtpFrom = &quot;mailFromAddress@domena.cz&quot;
$SmtpTo = &quot;test@domena.cz&quot;
$SmtpSubject = &quot;Test email from PowerShell&quot;
$SmtpBody = &quot;This is a test email sent from PowerShell script.&quot;

# Create secure credentials
$SmtpSecurePwd = ConvertTo-SecureString $SmtpPass -AsPlainText -Force
$SmtpCreds = New-Object System.Management.Automation.PSCredential ($SmtpUser, $SmtpSecurePwd)

# Send the email
Send-MailMessage -From $SmtpFrom -To $SmtpTo -Subject $SmtpSubject -Body $SmtpBody -SmtpServer $SmtpServer -Port $SmtpPort -Credential $SmtpCreds -UseSsl</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-99e1041 elementor-widget elementor-widget-heading" data-id="99e1041" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">SCRIPT: Odeslání e-mailu pomocí PHP a ACS E-mail</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b7dd87b elementor-widget elementor-widget-code-block-for-elementor" data-id="b7dd87b" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-php'>&lt;?php
/**
 * Minimal SMTP sender (STARTTLS + AUTH LOGIN) without Composer.
 * Tested with Azure Communication Service SMTP: smtp.azurecomm.net:587
 * Author: www.sraga.cz
 */


// ---------------- Example usage ----------------
try {
    smtp_send([
        &#039;host&#039;      =&gt; &#039;smtp.azurecomm.net&#039;,
        &#039;port&#039;      =&gt; 587,
        &#039;username&#039;  =&gt; &#039;userName@domena.cz&#039;,
        &#039;password&#039;  =&gt; &#039;clientSecretValue&#039;,                 // &larr; store securely (env/secret)
        &#039;from&#039;      =&gt; &#039;mailFromAddress@domena.cz&#039;,
        &#039;from_name&#039; =&gt; &#039;mailFromAddress@domena.cz&#039;,
        &#039;to&#039;        =&gt; &#039;test@domena.cz&#039;,
        &#039;subject&#039;   =&gt; &#039;Test email from PHP&#039;,
        &#039;body&#039;      =&gt; &quot;This is a test email sent from a pure-PHP SMTP client.&quot;,
        &#039;debug&#039;     =&gt; true,                 // set true to see SMTP I/O to STDERR
    ]);
    echo &quot;Email sent OK\n&quot;;
} catch (Throwable $e) {
    // Print a clear error if something goes wrong
    fwrite(STDERR, &quot;SMTP error: &quot; . $e-&gt;getMessage() . &quot;\n&quot;);
    exit(1);
}


// ---------------- Functions ----------------

function smtp_send(array $cfg): void
{
    $host        = $cfg[&#039;host&#039;];          // e.g. smtp.azurecomm.net
    $port        = $cfg[&#039;port&#039;] ?? 587;   // 587 for STARTTLS
    $username    = $cfg[&#039;username&#039;];      // SMTP user (e.g. web@domain.cz)
    $password    = $cfg[&#039;password&#039;];      // SMTP password
    $from        = $cfg[&#039;from&#039;];          // RFC5322 From: email address
    $fromName    = $cfg[&#039;from_name&#039;] ?? &#039;&#039;;   // Display name (optional)
    $to          = $cfg[&#039;to&#039;];            // recipient email
    $subject     = $cfg[&#039;subject&#039;];       // subject (UTF-8 ok)
    $body        = $cfg[&#039;body&#039;];          // plain text body
    $timeout     = $cfg[&#039;timeout&#039;] ?? 30;
    $debug       = $cfg[&#039;debug&#039;] ?? false;

    $peerName = $cfg[&#039;peer_name&#039;] ?? $host; // SNI name for TLS

    $context = stream_context_create([
        &#039;ssl&#039; =&gt; [
            &#039;crypto_method&#039;        =&gt; STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT,
            &#039;verify_peer&#039;          =&gt; true,
            &#039;verify_peer_name&#039;     =&gt; true,
            &#039;peer_name&#039;            =&gt; $peerName,
            // If your OS trust store is standard, no need to set cafile/capath.
            // &#039;cafile&#039;            =&gt; &#039;/etc/ssl/certs/ca-certificates.crt&#039;,
            &#039;SNI_enabled&#039;          =&gt; true,
            &#039;disable_compression&#039;  =&gt; true,
        ],
    ]);

    $fp = stream_socket_client(
        &quot;tcp://$host:$port&quot;,
        $errno,
        $errstr,
        $timeout,
        STREAM_CLIENT_CONNECT,
        $context
    );

    if (!$fp) {
        throw new RuntimeException(&quot;Connect failed: $errno $errstr&quot;);
    }
    stream_set_timeout($fp, $timeout);

    // --- Helpers -------------------------------------------------------------
    $read = function() use ($fp, $debug): array {
        $lines = [];
        while (($line = fgets($fp, 2048)) !== false) {
            $lines[] = rtrim($line, &quot;\r\n&quot;);
            if ($debug) { fwrite(STDERR, &quot;S: $line&quot;); }
            // Multi-line replies have format &quot;123-...&quot; and end on &quot;123 ...&quot; (space)
            if (preg_match(&#039;/^\d{3} /&#039;, $line)) break;
        }
        if (empty($lines)) throw new RuntimeException(&quot;No response from server&quot;);
        $code = (int)substr($lines[count($lines)-1], 0, 3);
        return [$code, $lines];
    };

    $send = function(string $cmd) use ($fp, $debug) {
        if ($debug) { fwrite(STDERR, &quot;C: $cmd\n&quot;); }
        fwrite($fp, $cmd . &quot;\r\n&quot;);
    };

    $expect = function(int $want) use ($read) {
        [$code, $lines] = $read();
        if ($code !== $want) {
            $msg = implode(&quot;\n&quot;, $lines);
            throw new RuntimeException(&quot;Expected $want, got $code\n$msg&quot;);
        }
        return $lines;
    };

    // --- SMTP dialogue -------------------------------------------------------
    $expect(220);                                // 220 greeting
    $ehloName = gethostname() ?: &#039;localhost&#039;;
    $send(&quot;EHLO $ehloName&quot;);
    $expect(250);

    // STARTTLS
    $send(&quot;STARTTLS&quot;);
    $expect(220);                                // Ready to start TLS
    if (!stream_socket_enable_crypto($fp, true, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT)) {
        throw new RuntimeException(&quot;TLS handshake failed&quot;);
    }

    // Re‑EHLO after STARTTLS
    $send(&quot;EHLO $ehloName&quot;);
    $expect(250);

    // AUTH LOGIN
    $send(&quot;AUTH LOGIN&quot;);
    $expect(334);                                // &quot;VXNlcm5hbWU6&quot; (Username:)
    $send(base64_encode($username));
    $expect(334);                                // &quot;UGFzc3dvcmQ6&quot; (Password:)
    $send(base64_encode($password));
    $expect(235);                                // Auth OK

    // MAIL/RCPT
    $send(&quot;MAIL FROM:&lt;$from&gt;&quot;);
    $expect(250);
    $send(&quot;RCPT TO:&lt;$to&gt;&quot;);
    $expect(250);

    // DATA &ndash; headers + body with dot‑stuffing
    $send(&quot;DATA&quot;);
    $expect(354);

    // Headers
    $headers = [];
    $fromHeader = $fromName !== &#039;&#039;
        ? sprintf(&#039;From: %s &lt;%s&gt;&#039;, encodeDisplayName($fromName), $from)
        : sprintf(&#039;From: &lt;%s&gt;&#039;, $from);
    $headers[] = $fromHeader;
    $headers[] = &quot;To: &lt;$to&gt;&quot;;
    $headers[] = &quot;Subject: &quot; . encodeSubject($subject);
    $headers[] = &quot;Date: &quot; . date(&#039;r&#039;);
    $headers[] = &quot;Message-ID: &lt;&quot; . bin2hex(random_bytes(16)) . &#039;@&#039; . (parse_url(&quot;https://$peerName&quot;, PHP_URL_HOST) ?: &#039;localhost&#039;) . &quot;&gt;&quot;;
    $headers[] = &quot;MIME-Version: 1.0&quot;;
    $headers[] = &quot;Content-Type: text/plain; charset=UTF-8&quot;;
    $headers[] = &quot;Content-Transfer-Encoding: 8bit&quot;;
    $headers[] = &quot;X-Mailer: PHP-SMTP/1.0&quot;;

    $data  = implode(&quot;\r\n&quot;, $headers) . &quot;\r\n\r\n&quot; . $body;

    // Dot‑stuffing per RFC5321 &sect;4.5.2
    $data = preg_replace(&#039;/\r\n\./&#039;, &quot;\r\n..&quot;, $data);
    // Ensure ends with CRLF.CRLF
    if (!str_ends_with($data, &quot;\r\n&quot;)) $data .= &quot;\r\n&quot;;

    fwrite($fp, $data . &quot;.\r\n&quot;);
    $expect(250);                                // accepted

    // QUIT
    $send(&quot;QUIT&quot;);
    $read();                                     // 221
    fclose($fp);
}

/** Encode UTF‑8 display name safely for headers */
function encodeDisplayName(string $name): string {
    // Quote if contains specials; also provide RFC2047 when needed
    if (preg_match(&#039;/[^\x20-\x7E]/&#039;, $name)) {
        return &#039;=?UTF-8?B?&#039; . base64_encode($name) . &#039;?=&#039;;
    }
    if (preg_match(&#039;/[&quot;,]/&#039;, $name)) {
        return &#039;&quot;&#039; . addcslashes($name, &#039;\\&quot;&#039;) . &#039;&quot;&#039;;
    }
    return $name;
}

/** RFC2047 encode UTF‑8 Subject if needed */
function encodeSubject(string $subject): string {
    return preg_match(&#039;/[^\x20-\x7E]/&#039;, $subject)
        ? &#039;=?UTF-8?B?&#039; . base64_encode($subject) . &#039;?=&#039;
        : $subject;
}</code></pre>				</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/azure-communication-services-od-a-po-z/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sharepoint Online: Jak najít a smazat prázdné složky &#8211; tuned</title>
		<link>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky-tuned/</link>
					<comments>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky-tuned/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 25 Apr 2024 17:24:01 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=597</guid>

					<description><![CDATA[V předchozím článku Sharepoint Online: Jak najít a smazat prázdné složky jsem popisoval, jak lze pomocí knihovny PnP PowerShell vytvořit report prázdných složek a tyto smazat z knihovny dokumentů. Skripty, které jsem použil tak jsou plně funkční, ale narazil jsem na jednu dost podstatnou věc: potřebuji smazat prázdné složky z knihovny dokumentů, ale nikoliv z ... <a title="Sharepoint Online: Jak najít a smazat prázdné složky &#8211; tuned" class="read-more" href="https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky-tuned/" aria-label="Číst více o Sharepoint Online: Jak najít a smazat prázdné složky &#8211; tuned">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="597" class="elementor elementor-597" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-ad8f440 e-flex e-con-boxed e-con e-parent" data-id="ad8f440" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-55b5cd7 elementor-widget elementor-widget-text-editor" data-id="55b5cd7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V předchozím článku <a href="https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/" target="_blank" rel="noopener">Sharepoint Online: Jak najít a smazat prázdné složky</a> jsem popisoval, jak lze pomocí knihovny <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">PnP PowerShell</a> vytvořit report prázdných složek a tyto smazat z knihovny dokumentů.</p><p>Skripty, které jsem použil tak jsou plně funkční, ale narazil jsem na jednu dost podstatnou věc: potřebuji smazat prázdné složky z knihovny dokumentů, ale nikoliv z celé knihovny ale z <strong>konkrétní podsložky </strong>a to ty původní skripty neumí. Ale protože jsem tuto funkcionalitu opravdu potřeboval (procházím knihovnu, kde jsou tisíce složek), tak jsem si k tomu sednul a vyplodil jsem tento vytuněný skript:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c1bde0e elementor-widget elementor-widget-code-block-for-elementor" data-id="c1bde0e" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>#Parametery
$SiteURL = &quot;https://vas-tenant.sharepoint.com/sites/Site&quot;

# $DocumentLibraryName = &quot;Documents&quot;
$DocumentLibraryName = &quot;Sdilene dokumenty&quot;

$FolderSiteRelativeURL = &quot;$DocumentLibraryName/Slozka/Slozka/Archiv_Slozka/Nejnizsi slozka&quot;

# Testovaci rezim - pokud je true, neprovede vymaz ale jen vypis
$reportOnly = $true

# Zda exportovat do CSV
$timestamp = Get-Date -Format &quot;yyyy-MM-dd-HHmm&quot;
$CSVExport = $true
$CSVFile = &quot;C:\Temp\DeletedFolderReport-$timestamp.csv&quot;

# Nastavte na $true pouze, pokud mate plne otestovano; $true = nepta se na smazani, $false = zepta se pred smazanim
$force = $false
Connect-PnPOnline -Url $SiteURL  -Interactive

Function Delete-FolderContent($Folder){

    $EmptyFolderArray = @()

    $Subfolders = Get-PnPFolderItem -FolderSiteRelativeUrl $Folder  -ItemType Folder

    ForEach ($Subfolder in $Subfolders)
    {
        $folderPath = $Folder+&quot;/&quot;+$Subfolder.Name
        Write-host $folderPath -ForegroundColor Yellow 
        # Remdddove-PnPListItem -List $ListName -Identity $Item.Id -Recycle -Force
        Write-host &quot;Folder name:&quot;$Subfolder.Name&quot; - Items:&quot;$Subfolder.ItemCount

        #Get all files &amp; Reload Sub-folders from the given Folder
        $CountFiles = Get-PnPFolderItem -FolderSiteRelativeUrl $folderPath  -ItemType File
        $CountSubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $folderPath -ItemType Folder

        Write-host &quot; Files: &quot;$CountFiles.Count&quot;  Folders: &quot;$CountSubFolders.Count -ForegroundColor Cyan

        If ($CountFiles.Count -eq 0 -and $CountSubFolders.Count -eq 0)
        {
            Write-host &quot; Folder name: [&quot;$Subfolder.Name&quot;] - folder is empty - DELETE&quot; -ForegroundColor Green

            if ($reportOnly -ne $true){
                Write-Host &quot; Deleted folder:&quot; $Subfolder.Name &quot;in&quot; $Folder -ForegroundColor Red
                Remove-PnPFolder -Name $Subfolder.Name -Folder $Folder -force:$force -Recycle
            }
            else{
                Write-Host &quot; Report only: Deleted folder:&quot; $Subfolder.Name &quot;in&quot; $Folder -ForegroundColor Red
            }


            # Export do CSV

            If($CSVExport -eq $true){

                #Add the Data to Object
                $EmptyFolderData = New-Object PSObject
                $EmptyFolderData | Add-Member NoteProperty FolderName($Subfolder.Name)
                $EmptyFolderData | Add-Member NoteProperty RelativeURL($Folder)
                $EmptyFolderArray += $EmptyFolderData

                #Export to CSV File
                #$EmptyFolderArray | Export-CSV $CSVFile -NoTypeInformation -Append
            }
        }
        Else{
            
            Write-host &quot; Folder name: [&quot;$Subfolder.Name&quot;] - contains data - keep&quot; -ForegroundColor Red          

        }

        Write-host &quot;`n&quot;
        
        Delete-FolderContent($folderPath)
        
    }

    If($CSVExport -eq $true){

        #Export to CSV File
        $EmptyFolderArray | Export-CSV $CSVFile -NoTypeInformation -Append
    }

}

Delete-FolderContent($FolderSiteRelativeURL)</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-4e1a7d1 elementor-widget elementor-widget-text-editor" data-id="4e1a7d1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výše uvedený skript má několik základních parametrů:</p><div><p><strong>$SiteURL</strong> &#8211; adresa sharepoint webu</p><div><div><strong>$DocumentLibraryName</strong> &#8211; název knihovny dokumentů, většinou nabývá hodnoty &#8222;Documents&#8220; nebo &#8222;Sdilene Dokumenty&#8220; viz popisek <a href="https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/" target="_blank" rel="noopener">v předchozím článku</a></div><div> </div><div><div><div><strong>$FolderSiteRelativeURL</strong> &#8211; relativní cesta ke složce, nad kterou chcete report a výmaz prázdných složek provést. Výmaz se provede rekurzivně.</div><div><div><div> </div><div><strong>$reportOnly</strong> &#8211; pokud je $true, simuluje se výmaz prázdné složky, ale reálně se neprovede</div></div></div><div><div><div> </div><div><strong>$CSVExport</strong> &#8211; pokud je $true, všechny složky, které neobsahují data a jsou určeny k výmazu, budou exportovány do CSV souboru <strong>$CSVFile</strong></div><div><div><div> </div><div><strong>$force</strong> &#8211; pokud je nastaveno na $true, systém se neptá, zda složku smazat, ale rovnou ji maže, pokud je nastaveno na $false, každý výmaz je potřeba potvrdit.</div></div></div></div></div></div></div></div></div>								</div>
				</div>
				<div class="elementor-element elementor-element-8720d71 elementor-widget elementor-widget-image" data-id="8720d71" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp-delete-folder-confirm" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NjAyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG5wLWRlbGV0ZS1mb2xkZXItY29uZmlybS5wbmcifQ%3D%3D">
							<img fetchpriority="high" decoding="async" width="768" height="118" src="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm-768x118.png" class="attachment-medium_large size-medium_large wp-image-602" alt="Potvrdit vymaz slozky" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm-768x118.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm-300x46.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm-1024x158.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm.png 1076w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-12c5104 elementor-widget elementor-widget-text-editor" data-id="12c5104" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Skript také pamatuje na to, že některé složky můžete smazat omylem, pokud tak učiníte, přesune smazaná data do koše. </p>								</div>
				</div>
				<div class="elementor-element elementor-element-5855bb3 elementor-widget elementor-widget-image" data-id="5855bb3" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp-delete-folder-confirm2" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NjE2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG5wLWRlbGV0ZS1mb2xkZXItY29uZmlybTIucG5nIn0%3D">
							<img decoding="async" width="768" height="213" src="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm2-768x213.png" class="attachment-medium_large size-medium_large wp-image-616" alt="Potvrdit vymaz slozky" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm2-768x213.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm2-300x83.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-confirm2.png 842w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-a93b3b5 elementor-widget elementor-widget-text-editor" data-id="a93b3b5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jednou z dalších vychytávek, zejména pro zpětnou kontrolu, je výpis aktuální zpracovávané pozice včetně informace o počtu souborů a složek v dané složce</p>								</div>
				</div>
				<div class="elementor-element elementor-element-677c514 elementor-widget elementor-widget-image" data-id="677c514" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-keep.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp-delete-folder-keep" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NjA2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG5wLWRlbGV0ZS1mb2xkZXIta2VlcC5wbmcifQ%3D%3D">
							<img decoding="async" width="768" height="73" src="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-keep-768x73.png" class="attachment-medium_large size-medium_large wp-image-606" alt="Report prazdne slozky SharePoint Online" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-keep-768x73.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-keep-300x28.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/pnp-delete-folder-keep.png 823w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-8996927 elementor-widget elementor-widget-heading" data-id="8996927" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Závěrem</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-f86cf3c elementor-widget elementor-widget-text-editor" data-id="f86cf3c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud potřebujete ve vaší organizaci pomoct s migrací do Microsoft 365 nebo Azure, vyřešit zabezpečení nebo proškolit uživatele, <a href="https://www.sraga.cz/kontakt/">ozvěte se mi</a>, určitě něco vymyslíme.</p>								</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky-tuned/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Automatizace skriptů PnP PowerShell &#8211; Azure Automation</title>
		<link>https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/</link>
					<comments>https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Mon, 22 Apr 2024 15:04:50 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Automation Account]]></category>
		<category><![CDATA[Entra ID]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[Managed Identity]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=387</guid>

					<description><![CDATA[Dnes mám pro vás kompletní návod, jak zprovoznit automatické spouštění skriptů v rámci PnP PowerShellu (PnP.PowerShell module), bez nutnosti přihlašování konkrétního uživatele. Co k tomu bude potřeba? Předplatné Microsoft Azure Automation Account Managed Identity PnP PowerShell nainstalovaný lokálně ve vašem počítači Obsah &#160; Proč Azure Automation a ne lokální skripty Dovedu si představit, že nikdo ... <a title="Automatizace skriptů PnP PowerShell &#8211; Azure Automation" class="read-more" href="https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/" aria-label="Číst více o Automatizace skriptů PnP PowerShell &#8211; Azure Automation">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="387" class="elementor elementor-387" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-b939194 e-flex e-con-boxed e-con e-parent" data-id="b939194" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-f008972 elementor-widget elementor-widget-text-editor" data-id="f008972" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dnes mám pro vás kompletní návod, jak zprovoznit automatické spouštění skriptů v rámci PnP PowerShellu (PnP.PowerShell module), bez nutnosti přihlašování konkrétního uživatele. Co k tomu bude potřeba?</p><ul><li>Předplatné Microsoft Azure</li><li>Automation Account</li><li>Managed Identity</li><li>PnP PowerShell nainstalovaný lokálně ve vašem počítači</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-35cfe69 elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="35cfe69" data-element_type="widget" data-settings="{&quot;exclude_headings_by_selector&quot;:[],&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="table-of-contents.default">
				<div class="elementor-widget-container">
									<div class="elementor-toc__header">
						<h4 class="elementor-toc__header-title">
				Obsah			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__35cfe69" aria-expanded="true" aria-label="Open table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-down" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path></svg></div>
				<div class="elementor-toc__toggle-button elementor-toc__toggle-button--collapse" role="button" tabindex="0" aria-controls="elementor-toc__35cfe69" aria-expanded="true" aria-label="Close table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-up" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"></path></svg></div>
					</div>
				<div id="elementor-toc__35cfe69" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-45f24a1 elementor-widget elementor-widget-heading" data-id="45f24a1" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Proč Azure Automation a ne lokální skripty</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-9421bb5 elementor-widget elementor-widget-text-editor" data-id="9421bb5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><span data-contrast="auto">Dovedu si představit, že nikdo nechce provádět reporty ručně. Důvodů, proč takovou věc automatizovat vidím hned několik:</span> </p><ol><li data-aria-posinset="1" data-aria-level="2"><span data-contrast="auto"><strong>Nechci se</strong> o spouštění reportů <strong>starat</strong> a nebo delegovat to na jiné uživatele</span> </li><li data-aria-posinset="2" data-aria-level="2"><span data-contrast="auto">Nechci uživatelům udělovat oprávnění a vytvářet prostor pro chybu nebo zneužití</span> </li><li data-aria-posinset="3" data-aria-level="2"><span data-contrast="auto"><strong>Chci si hlídat úroveň oprávnění</strong>, kteoru jednotlivým úkonům uděluji, pokud skript pracuje jen se SharePointem, nechci udělovat oprávnění na jinou komponentu systému, třeba na Planner a podobně</span> </li><li data-aria-posinset="4" data-aria-level="2"><span data-contrast="auto">Chci <strong>mít nad systémem kontrolu</strong> a chci mít přehled o tom, jak jednotlivé úlohy dopadly. Nechci spoléhat na to, že delegovaný uživatel daný úkon provede</span></li><li data-aria-posinset="5" data-aria-level="2"><span data-contrast="auto">S ohledem na přechozí body, nechci takovou věc obecně vůbec <strong>spouštět v kontextu uživatele</strong>, který má uživatelské jméno a heslo a lze se k němu jednouše přihásit, chci nějakou <strong>formu systémového účtu</strong></span></li></ol><p>Ruční spouštění skriptů je dobré tam, kde potřebujete jednorázový export nebo report. Pokud ale potřebujete reporty pravidelně, dříve či později se budete snažit skripty automatizovat. První, o co se budete pokoušet, jak skript spustit pomocí plánovače, třeba Task Scheduleru a jak jej spustit pod oprávněním konkrétního uživatele, nejprve to budete zkoušet pod svým účtem, později možná, v lepším případě, vytvoříte servisní účet, kterému třeba i budete muset pořídit licenci. A když nemáte rozpočet, skončí to tak, že skrip, pokud se to vůbec podaří nasadit, bude běžet pod vaším účtem do doby, než z organizace odejdete a možná i po té.</p><p>Z výše uvedeného plyne, že daleko rozumnější je použít &#8222;nějakou formu&#8220; účtu, který není uživatelem. Ve světe Microsoftu se tomu říká <strong>Managed Identity</strong>. A pokud se tato identita dá rovnou zkombinovat s procesem, který bude skritpy pravidelně spouštět (<strong>Automation Accounts</strong>), tak máte pohodlné a bezpečené řešení.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-e1be934 elementor-alert-info elementor-widget elementor-widget-alert" data-id="e1be934" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Azure Automation Account</span>
			
						<span class="elementor-alert-description"> je služba, poskytovaná prostřednictvím Microsot Azure, která umožňuje automatizovat a plánovat různé úkoly a procesy v rámci vašeho prostředí Azure a ale mimo něj. </span>
			
						<button type="button" class="elementor-alert-dismiss" aria-label="Zavřít toto upozornění.">
									<span aria-hidden="true">&times;</span>
							</button>
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-e8cc9e9 elementor-widget elementor-widget-heading" data-id="e8cc9e9" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Vytvoření Azure Automation Account</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-34ed57c elementor-widget elementor-widget-text-editor" data-id="34ed57c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Na <a href="https://portal.azure.com" target="_blank" rel="noopener">portále pro správu Microsoft Azure</a> si najděte <strong>(1)</strong> službu Automation Accounts <strong>(2)</strong> a zvolte vytvořit nový účet <strong>(3)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7836e09 elementor-widget elementor-widget-image" data-id="7836e09" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czEucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="372" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1-768x372.png" class="attachment-medium_large size-medium_large wp-image-419" alt="Azure portal - Automation Accounts" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1-768x372.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1-300x145.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1-1024x496.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1-1536x744.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts1.png 1913w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-67ff30a elementor-widget elementor-widget-image" data-id="67ff30a" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts2" data-elementor-lightbox-description="Azure portal - Automation Accounts" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czIucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="223" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts2-768x223.png" class="attachment-medium_large size-medium_large wp-image-418" alt="Azure portal - Automation Accounts" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts2-768x223.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts2-300x87.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts2.png 915w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-37e47ef elementor-widget elementor-widget-text-editor" data-id="37e47ef" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>(4)</strong> Vyberte, do kterého <strong>předplatného</strong> chcete automatizaci nasadit. Toto je důležité, protože se jedná o sice levnou, ale zpoplatněnou službu.</p><p><strong>(5)</strong> Zvolte, do jaké <strong>skupiny prostředků</strong> chcete službu přiřadit nebo vytvořte novou Resource group. Já vytvářím novou Resource Group s názvem &#8222;automation-rg&#8220; a do této skupiny budu do budoucna dávat všechny prostředky, které se týkají automatizace.</p><p><strong>(6)</strong> Zvolte <strong>název</strong> pro automatizační účet. Tady pozor, budeme vytvářed také takzvadnou Spravovanou Identitu, která je v Entra ID reprezetována jako <strong>Enteprise aplikace</strong> s tímto názvem, tak zvolte takový název, abyste se v tom potom vyznali. Já dávám na konec názvu suffix &#8222;aa&#8220; jako automation account.</p><p><strong>(7)</strong> Jako <strong>region</strong> vyberu West Europe, ale vy si samozřejmě zvolte region dle vašich preferencí. Teď je hodně populární třeba Polsko.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-b056bac elementor-widget elementor-widget-image" data-id="b056bac" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts3.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts3" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE3LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czMucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="513" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts3-768x513.png" class="attachment-medium_large size-medium_large wp-image-417" alt="Azure portal - Automation Accounts" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts3-768x513.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts3-300x200.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts3.png 803w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-99976ef elementor-widget elementor-widget-text-editor" data-id="99976ef" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokračujte kliknutím na tlačítko <strong>Next</strong>.</p><p>V dalším kroku se průvodce ptá, za chci vytvořit Managed Identity a mám na výběr System assigned a User Assigned.</p><p>V tomto případě zvolím <strong>System assigned (8)</strong> a jdu na další kroky.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-e6c0537 elementor-widget elementor-widget-image" data-id="e6c0537" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts4.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts4" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czQucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="387" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts4-768x387.png" class="attachment-medium_large size-medium_large wp-image-416" alt="Portal Azure - Automation Accounts - Managed Identity" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts4-768x387.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts4-300x151.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts4.png 816w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-d720124 elementor-alert-info elementor-widget elementor-widget-alert" data-id="d720124" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Azure Managed Identity</span>
			
						<span class="elementor-alert-description">je služba, která poskytuje automaticky (systémem) spravovanou identitu v Microsoft Entra ID pro aplikace, které se používají pro připojení k prostředkům, které podporují autentizaci vůči Microsoft Entra. Výhodou je, že nemusíte nijak spravovat hesla, pověření, certifikáty nebo klíče, které se jinak používají k zabezpečení komunikace mezi službami. Funguje to tak, že Aplikace využije tuto Managed Identity k získání tokenu Microsoft Entra bez nutnosti řešit jakékoliv pověření. Velmi jednoduše řečeno, jedná se o systémový účet. </span>
			
						<button type="button" class="elementor-alert-dismiss" aria-label="Zavřít toto upozornění.">
									<span aria-hidden="true">&times;</span>
							</button>
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-51f3fdf elementor-widget elementor-widget-text-editor" data-id="51f3fdf" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Následující krok se týká <a href="https://learn.microsoft.com/en-us/azure/automation/quickstarts/create-azure-automation-account-portal?WT.mc_id=Portal-Microsoft_Azure_Automation#networking" target="_blank" rel="noopener">Networkingu</a>. Máte možnost zvolit si, zda li chcete k prostředkům přistupovat privátně (z vnitřní sítě) nebo pomocí veřejného internetu.</p><p><strong>Privátní přístup</strong> &#8211; tato možnost poskytuje Automation Accountu privátní koncový bod (Private endpoint),  který používá <strong>privátní IP adresu z vaší virtuální sítě</strong>. Povolením privátního koncového bodu <strong>přenesete službu do <span style="text-decoration: underline;">své virtuální</span> sítě</strong>. Jedná se o doporučenou konfiguraci z hlediska zabezpečení; vyžaduje však konfiguraci Hybrid Runbook Worker připojeného k virtuální síti Azure a v současné době nepodporuje cloudové úlohy.</p><p>V mém případš tedy zvolím <strong>Public access</strong> a přejdu na další krok.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-abd9e7f elementor-widget elementor-widget-image" data-id="abd9e7f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE1LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="758" height="446" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts5.png" class="attachment-medium_large size-medium_large wp-image-415" alt="Azure Portal - Automation Account" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts5.png 758w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts5-300x177.png 300w" sizes="(max-width: 758px) 100vw, 758px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-a097afb elementor-widget elementor-widget-text-editor" data-id="a097afb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V produkčním prostředí doporučuju věnovat pozornout Tagům a pro přeheldnost tagy používat. Já osobně do tagů běžně dávám tyto informace:</p><ul><li>Prostředí: produkční / testovací</li><li>Business owner &#8211; kdo konzumuje výslednou službu</li><li>Technical owner &#8211; kdo se o službu stará technicky</li><li>Nekdy případně ještě třeba středisko, oddělení, nákladové středisko apod.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-1bbbc86 elementor-widget elementor-widget-image" data-id="1bbbc86" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts6.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts6" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDE0LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czYucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="497" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts6-768x497.png" class="attachment-medium_large size-medium_large wp-image-414" alt="Portal Azutr - Automation Accounts - tags" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts6-768x497.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts6-300x194.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts6.png 807w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-dc6b4ce elementor-widget elementor-widget-text-editor" data-id="dc6b4ce" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokračuji dál na poslední část průvodce a to je <strong>Validace</strong>.</p><p>Pokud validace prošla, klikněte na tlačítko Vytvořit, pokud neprošla, opravte chyby.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-8dd0aba elementor-widget elementor-widget-image" data-id="8dd0aba" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts7.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts7" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDEzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czcucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="195" height="300" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts7-195x300.png" class="attachment-medium size-medium wp-image-413" alt="Azure Portal - Automation Accounts" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts7-195x300.png 195w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts7.png 600w" sizes="(max-width: 195px) 100vw, 195px" />								</a>
															</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-4f3d156 e-flex e-con-boxed e-con e-parent" data-id="4f3d156" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-619dff4 elementor-widget elementor-widget-text-editor" data-id="619dff4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Je potřeba počkat, než se celá služba nasadí. Až bude hotovo, lze <strong>přejít na detail služby</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-e591543 elementor-widget elementor-widget-image" data-id="e591543" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts8" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDEyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czgucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="251" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8-768x251.png" class="attachment-medium_large size-medium_large wp-image-412" alt="Azure Automation Accounts" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8-768x251.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8-300x98.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8-1024x334.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts8.png 1394w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-a236495 elementor-widget elementor-widget-heading" data-id="a236495" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Instalace PowerShell modulu: Pnp.PowerShell</h2>				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-4511e21 e-flex e-con-boxed e-con e-parent" data-id="4511e21" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-b678f2a elementor-widget elementor-widget-text-editor" data-id="b678f2a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Protože potřebujeme pracovat s PnP Powershell Modulem, musíme jej do automatizace nejprve přidat, protože není její nativní součástí.</p><p>V levém menu přejděte do sekce <strong>Modules (9)</strong> a klikněte na tlačítko <strong>Přidat modul (10)</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-5157f8f elementor-widget elementor-widget-image" data-id="5157f8f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts9" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDU0LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czkucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="275" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9-768x275.png" class="attachment-medium_large size-medium_large wp-image-454" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9-768x275.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9-300x107.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9-1024x366.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9-1536x549.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts9.png 1880w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-d61e8aa elementor-widget elementor-widget-text-editor" data-id="d61e8aa" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>PnP.Powershell</strong> sice není nativní součástí Automation Accounts, ale je k dispozici v Galerii, takže vyberte <strong>Browse fom gallery (11)</strong> a otevřete galerii pomocí odkazu <strong>Click here to browse from gallery (12)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-9f4ce6e elementor-widget elementor-widget-image" data-id="9f4ce6e" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts10.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts10" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDUzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czEwLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="464" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts10-768x464.png" class="attachment-medium_large size-medium_large wp-image-453" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts10-768x464.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts10-300x181.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts10.png 903w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ab8cb1f elementor-widget elementor-widget-text-editor" data-id="ab8cb1f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Do vyhledávcího okna zadejte &#8222;<strong>PnP</strong>&#8222;. Těch modulů, které se nabízí je hned několik.</p><p>Klikněte na ten s názvem <strong>PnP.PowerShell (13)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6715f27 elementor-widget elementor-widget-image" data-id="6715f27" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts11" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDUyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czExLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="312" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11-768x312.png" class="attachment-medium_large size-medium_large wp-image-452" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11-768x312.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11-300x122.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11-1024x416.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11-1536x624.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts11.png 1617w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-7f278dd elementor-widget elementor-widget-text-editor" data-id="7f278dd" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V dalším okně jen potvrďte výběr modulu, kliknutím na tlačítko <strong>Select (14)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-759f6dc elementor-widget elementor-widget-image" data-id="759f6dc" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts12" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDUxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czEyLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="451" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12-768x451.png" class="attachment-medium_large size-medium_large wp-image-451" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12-768x451.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12-300x176.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12-1024x601.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12-1536x902.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts12.png 1564w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-3c1cb51 elementor-widget elementor-widget-text-editor" data-id="3c1cb51" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Systém vás vrátí do původního okna. Pro správný chod modulu, zvolte <strong>Runtime version: 7.2 (15)</strong>.</p><p>Pokračujte kliknutím na tlačítko <strong>Import (16)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6f39e18 elementor-widget elementor-widget-image" data-id="6f39e18" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="913" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts13.png" class="attachment-large size-large wp-image-450" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts13.png 905w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts13-296x300.png 296w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts13-768x779.png 768w" sizes="(max-width: 900px) 100vw, 900px" />															</div>
				</div>
				<div class="elementor-element elementor-element-621f11f elementor-widget elementor-widget-text-editor" data-id="621f11f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Teď nastává chvíle čekání, protože je potřeba počkat, až se modul naimportuje, což může trvat klidně i 10 minut. Tento proces nejde urychlit a musí se vyčekat.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-823587c elementor-widget elementor-widget-image" data-id="823587c" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts14.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts14" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDQ5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE0LnBuZyJ9">
							<img loading="lazy" decoding="async" width="463" height="183" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts14.png" class="attachment-medium_large size-medium_large wp-image-449" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts14.png 463w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts14-300x119.png 300w" sizes="(max-width: 463px) 100vw, 463px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-dba525c elementor-widget elementor-widget-text-editor" data-id="dba525c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ze začátku ten modul vůbec nebude vidět v seznamu, pak se objeví se stavem Importing a nakonec se jeho stav změní na Available.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c762244 elementor-widget elementor-widget-image" data-id="c762244" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts15" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDQ4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE1LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="186" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15-768x186.png" class="attachment-medium_large size-medium_large wp-image-448" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15-768x186.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15-300x73.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15-1024x248.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15-1536x372.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts15.png 1914w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-d96bdf7 elementor-widget elementor-widget-image" data-id="d96bdf7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts16" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDQ3LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE2LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="279" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16-768x279.png" class="attachment-medium_large size-medium_large wp-image-447" alt="Azure Automation Accounts - Modules" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16-768x279.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16-300x109.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16-1024x373.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts16.png 1094w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-2b5df69 elementor-widget elementor-widget-heading" data-id="2b5df69" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Managed Identity / Entra ID Enterprise application</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-7599132 elementor-widget elementor-widget-text-editor" data-id="7599132" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Když je PowerShell modul naimportovaný, lze přejít do sekce <strong>Identity</strong>.</p><p>Zkontrolujte, že je u System Assigned identity stav &#8222;Zapnuto&#8220; a rovnou si můžete zkopírovat <strong>Object ID</strong>, což je zároveň <strong>Client ID Enterprise aplikace</strong>, které se zaregistrovala v Entře.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-69ffc36 elementor-widget elementor-widget-image" data-id="69ffc36" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts17" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDcxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE3LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="427" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17-768x427.png" class="attachment-medium_large size-medium_large wp-image-471" alt="Azure - Automation Accounts - Identity" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17-768x427.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17-300x167.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17-1024x569.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts17.png 1093w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-27e59a0 elementor-widget elementor-widget-text-editor" data-id="27e59a0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ještě si pro kontrolu otevřete <a href="https://entra.microsoft.com/#view/Microsoft_AAD_IAM/StartboardApplicationsMenuBlade/~/AppAppsPreview" target="_blank" rel="noopener">entra.microsoft.com</a> a přejděte do <strong>Enterpeise Applications (19)</strong> a upravte si filtr zobrazení, případně použijte <strong>vyhledávání (20)</strong>.</p><p>Měla by se nabídnout aplikace, kterí bude mít stejný název, jako nově vytvořený Automation Account. </p><p>Pokud jste instalovali také lokální modul PnP PowerShellu a udělili jste této aplikaci  tzv. Consent, tak uvidíte v seznamui také aplikaci, která se jmenuje <strong>PnP Management Shell.</strong> To je aplikace, kterou jsem zaregistroval automaticky při instalaci PnP modulu do svého počítače.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-dcea862 elementor-widget elementor-widget-image" data-id="dcea862" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts18" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDcwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE4LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="296" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18-768x296.png" class="attachment-medium_large size-medium_large wp-image-470" alt="Entra ID - Enterprise Applications" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18-768x296.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18-300x116.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18-1024x395.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts18.png 1483w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ac680f8 elementor-widget elementor-widget-text-editor" data-id="ac680f8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Když aplikaci otevřete a přejdete do sekce<strong> Permissions (21)</strong>, uvidíte, že aplikace zatím nemá žádná oprávnění. Stránka s přidělenými oprávněními, je prázdná.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-87834b1 elementor-widget elementor-widget-image" data-id="87834b1" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts19" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDc1LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czE5LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="292" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19-768x292.png" class="attachment-medium_large size-medium_large wp-image-475" alt="Entra ID - Enterprise Applications - Permissions" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19-768x292.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19-300x114.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19-1024x390.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19-1536x584.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts19.png 1887w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-e7fcbc8 elementor-widget elementor-widget-heading" data-id="e7fcbc8" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Udělení oprávnění pro Managed Identity (Enterprise application)</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-99b42d6 elementor-widget elementor-widget-text-editor" data-id="99b42d6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><a href="https://portal.azure.com/" target="_blank" rel="noopener">Azure Portál</a> a <a href="https://entra.microsoft.com/" target="_blank" rel="noopener">Entra ID</a> necháme chvíli stranou.</p><p>Teď je potřeba <strong>vytvořené identitě</strong>, která je reprezentovaná v Entra ID prostřednictvím Enterprise aplikace, <strong>přidělit oprávnění</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-aa98f17 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="aa98f17" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">K zamyšlení</span>
			
						<span class="elementor-alert-description">doporučuji, se nejprve zamyslet, jaká práva je potřeba té aplikaci udělit.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-a9ba85f elementor-widget elementor-widget-text-editor" data-id="a9ba85f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud registrujete aplikace na svém počítačí při instalaci PnP modulu, tak tento modul si udělí sám veškerá potřebná oprávnění (po schválení Globálním správcem). My jsme ale v situaci, kdy nechceme, aby náš automatizovaný skript, měl práva úplně na vše, ale jen na konkrétní úkony. Třeba jen pro práci s Plannerem, nebo s Entrou nebo se SharePointem a třeba jen ke čtení.</p><p><strong>Abych mohl práva přidělit, musím vědět, co má skript dělat, kam potřebuje sahat a také, jak ta oprávnění identifikovat v systému.</strong></p><p>Nyní je tedy potřeba se přesunout do lokálního prostředí a spustit si prostředí <a href="https://www.sraga.cz/instalace-powershell-7/" target="_blank" rel="noopener">PowerShell verze 7</a>.</p><p><em>Předpokládejme, že víte, co má Váš automatizovaný skript dělat a jaká potřebuje oprávnění, ale nevíte, jak oprávnění fakticky přidělit.</em></p><p>K tomu zde mám sadu několika příkazů, kterými si lze trochu pomoci.</p><p>1. Nejprve se připojde k PnP pomocí příkazu <a href="https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html" target="_blank" rel="noopener">Connect-PnPOnline</a></p><p>Já už rovnou přidávám i parametru -Url, protože se chci připojik ke konkrétní knihovně, nad kterou mohu dělat další testy.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-b4b7aba elementor-widget elementor-widget-code-block-for-elementor" data-id="b4b7aba" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Connect-PnPOnline -Url &quot;https://sragacz.sharepoint.com/sites/Kvalitaabazpenost&quot; -Interactive</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-1212544 elementor-widget elementor-widget-text-editor" data-id="1212544" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>2. Pomocí příkazů níže, lze <strong>identifikovat, jaká konkrétní oprávnění lze Enteprise Aplikaci udělit</strong>. Parametr -BuiltInType identifikuje, o jakou komponentu nebo službu se jedná, například MicrosoftGraph nebo SharePointOnline. Analogicky si lze vypsat dostupná oprávnění pro jakoukoliv komponentu ekosystému Microsoft 365.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-1e633e1 elementor-widget elementor-widget-code-block-for-elementor" data-id="1e633e1" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-PnPAzureADServicePrincipal -BuiltInType MicrosoftGraph | Get-PnPAzureADServicePrincipalAvailableAppRole
Get-PnPAzureADServicePrincipal -BuiltInType SharePointOnline | Get-PnPAzureADServicePrincipalAvailableAppRole</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-c64f7bc elementor-widget elementor-widget-text-editor" data-id="c64f7bc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výstupem z uvedených příkazů je seznam dostupných oprávnění pro danou komponentu. Přičemž důležité jsou tyto hodnoty:</p><ul><li><strong>Value</strong> &#8211; identifikátor daného oprávnění. Tato hodnota se používá v dalších příkazech</li><li><strong>DisplayName</strong> &#8211; název oprávnění, který je reprezentován zejména v Entra ID v sekci Permissions</li><li><strong>Description</strong> &#8211; popis toho, co dané oprávnění umožňuje</li></ul><p> </p>								</div>
				</div>
				<div class="elementor-element elementor-element-aa8af04 elementor-widget elementor-widget-image" data-id="aa8af04" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts20.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts20" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDg4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czIwLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="157" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts20-768x157.png" class="attachment-medium_large size-medium_large wp-image-488" alt="Get-PnPAzureADServicePrincipal" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts20-768x157.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts20-300x61.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts20.png 792w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-c9df097 elementor-widget elementor-widget-text-editor" data-id="c9df097" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud umíte identifikovat všechna potřebná oprávnění, je na čase oprávnění udělit.</p><p>Budete potřebovat <strong>Object ID</strong> vytvořené Enterprise aplikace. Toto získáte v sekci Identity v detailu Automation Accountu (krok 18) a nebo v detailu Enterprise aplikace.</p><p>Pro udělení oprávnění požijte příkaz <a href="https://pnp.github.io/powershell/cmdlets/Add-PnPAzureADServicePrincipalAppRole.html" target="_blank" rel="noopener">Add-PnPAzureADServicePrincipalAppRole</a></p>								</div>
				</div>
				<div class="elementor-element elementor-element-a2c470c elementor-widget elementor-widget-code-block-for-elementor" data-id="a2c470c" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Add-PnPAzureADServicePrincipalAppRole -Principal &quot;4e9d609b-f963-xxxx-xxxx-f03bf038ec4d&quot; -AppRole &quot;User.ReadWrite.All&quot; -BuiltInType MicrosoftGraph
Add-PnPAzureADServicePrincipalAppRole -Principal &quot;4e9d609b-f963-xxxx-xxxx-f03bf038ec4d&quot; -AppRole &quot;Sites.FullControl.All&quot; -BuiltInType SharePointOnline</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-119faa1 elementor-widget elementor-widget-text-editor" data-id="119faa1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Parametr <strong>AppRole</strong> obsahuje hodnotu Value, kterou jsme získali pomocí předchozího příkazu (identifikátor oprávnění)</p><p>Parametr <strong>BuiltInType</strong> identifikute danou komponentu / službu.</p><p>Parametr <strong>Principal</strong> obsahuje Object ID Enterprise aplikace, nebo její název, doporučuji ale používat Object ID.</p><p>Výsledek operace lze snadno zkontrolovat v Entra ID, konkrétně v detailu Enterprise aplikace, v sekci Permissions. V detailu aplikace by měla být vidět jen tak oprávnění, která byla udělena v předchozích krocích.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-deb0286 elementor-widget elementor-widget-image" data-id="deb0286" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts21" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDkyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czIxLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="154" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21-768x154.png" class="attachment-medium_large size-medium_large wp-image-492" alt="Entra ID - Enterprise Applications - Permissions" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21-768x154.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21-300x60.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21-1024x205.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21-1536x308.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts21.png 1568w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-7a42fd4 elementor-widget elementor-widget-heading" data-id="7a42fd4" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Vytvoření skriptu [Runbooks]</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b73c7d6 elementor-widget elementor-widget-text-editor" data-id="b73c7d6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Řekněme, že máme rámcově přidělená oprávnění, která pro skript potřebjeme. Zbývá tedy vůbec ten skript vytvořit. A k tomu použijeme tzv. <a href="https://learn.microsoft.com/en-us/azure/automation/automation-runbook-types?tabs=lps72%2Cpy10#powershell-runbooks" target="_blank" rel="noopener">Runbook</a>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-91532e4 elementor-alert-info elementor-widget elementor-widget-alert" data-id="91532e4" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Runbooks</span>
			
						<span class="elementor-alert-description">Rubbooky jsou knihovny, založené na prostředí Windows PowerShell (nebo Python, ale o tom jindy). Kód runbooku můžete upravovat přímo pomocí textového editoru na Azure portálu. Můžete také použít libovolný offline textový editor a skripty do Azure Automation importovat.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-4a58628 elementor-widget elementor-widget-text-editor" data-id="4a58628" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Vraťte se na Azure portál a v detailu Automation Accountu přejděte do nabídky <strong>Runbooks (22)</strong>. Pro vytvoření nového Runbooku klikněte na tlačítko &#8222;<strong>Create a Rubnook</strong>&#8220; <strong>(23)</strong>.</p><p><em>Runbooky jsou vlastně skripty, nebo knihovy skriptů, které chci spouštět, ať už ručně nebo automaticky.</em></p>								</div>
				</div>
				<div class="elementor-element elementor-element-8b7cdab elementor-widget elementor-widget-image" data-id="8b7cdab" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts22" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTAwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czIyLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="245" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22-768x245.png" class="attachment-medium_large size-medium_large wp-image-500" alt="Azure - Automation Accounts - Runbooks" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22-768x245.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22-300x96.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22-1024x327.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22-1536x491.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts22.png 1543w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-a0fe87c elementor-widget elementor-widget-text-editor" data-id="a0fe87c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V následující kroku vyplňte všechna povinná pole <strong>(24)</strong>.</p><ul><li>Jako typ zvolte: Powershell</li><li>Runtive version: 7.2</li><li>Description: doporučuji používat popisy, aby se ve skriptech vyznali i ti, kteří přijdou po vás.</li></ul><p>Pokud jste vše vyplnili správně, <strong>Vytvořte runbook (25)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-d45a2e9 elementor-widget elementor-widget-image" data-id="d45a2e9" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts23.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts23" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NDk5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czIzLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="827" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts23-768x827.png" class="attachment-medium_large size-medium_large wp-image-499" alt="Azure - Automation Accounts - Runbooks" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts23-768x827.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts23-279x300.png 279w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts23.png 850w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-cfaabb0 elementor-widget elementor-widget-image" data-id="cfaabb0" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts24.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts24" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTA0LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czI0LnBuZyJ9">
							<img loading="lazy" decoding="async" width="639" height="929" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts24.png" class="attachment-medium_large size-medium_large wp-image-504" alt="Azure - Automation Accounts - Runbooks" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts24.png 639w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts24-206x300.png 206w" sizes="(max-width: 639px) 100vw, 639px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-e7c14e8 elementor-widget elementor-widget-text-editor" data-id="e7c14e8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Runbook je vytvořený. Nyní můžete <strong>vytvořit Váš skript (24)</strong>. </p><p>Jakmile máte skript připravený, můžete jej otestovat kliknutím na tlačítko <strong>Test pane (25)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-0648d9e elementor-widget elementor-widget-image" data-id="0648d9e" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts25" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTA4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czI1LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="280" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25-768x280.png" class="attachment-medium_large size-medium_large wp-image-508" alt="Edit PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25-768x280.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25-300x109.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25-1024x374.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts25.png 1458w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-4c28a74 elementor-widget elementor-widget-text-editor" data-id="4c28a74" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V následující okně je potřeba skript ještě spustit pomocí tlačítka<strong> Start (26)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-bcc8291 elementor-widget elementor-widget-image" data-id="bcc8291" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts26" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTA5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czI2LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="410" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26-768x410.png" class="attachment-medium_large size-medium_large wp-image-509" alt="Test PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26-768x410.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26-300x160.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26-1024x546.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts26.png 1076w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-a9a2d37 elementor-widget elementor-widget-text-editor" data-id="a9a2d37" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po té, co sktipt doběhne, zobrazí se informace &#8222;Completed&#8220; a v okne budou zobrazeny výstupy skriptu. Pokud skript žádné výstupy nemá, bude okno prázdné.</p><p>Po dokončení testování je možné okno zavřít křížkem v pravé horní části okna.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-04e18e1 elementor-widget elementor-widget-image" data-id="04e18e1" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts27" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTEwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czI3LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="343" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27-768x343.png" class="attachment-medium_large size-medium_large wp-image-510" alt="Test PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27-768x343.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27-300x134.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27-1024x457.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27-1536x686.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts27.png 1928w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-b0b2fcc elementor-widget elementor-widget-text-editor" data-id="b0b2fcc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Všechny úpravy je potřeba vždy uložit kliknutím na tlačítko Publish</strong>. Pokud změny tzv. nepublikujete, bude platná vždy předchozí verze skriptu.<br /></p>								</div>
				</div>
				<div class="elementor-element elementor-element-e667b2c elementor-widget elementor-widget-image" data-id="e667b2c" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="329" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts28-1024x374.png" class="attachment-large size-large wp-image-514" alt="Publish PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts28-1024x374.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts28-300x109.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts28-768x280.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts28.png 1458w" sizes="(max-width: 900px) 100vw, 900px" />															</div>
				</div>
				<div class="elementor-element elementor-element-3a13b18 elementor-widget elementor-widget-text-editor" data-id="3a13b18" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud se s prostředím Azure a PnP teprve seznamujete, chcete si výstupy vyzkoušet a ještě nemáte vlastní skripty, můžete použít příkazy níže, které jsou zcela nezávadné. </p><p>První příkaz načte informace o SharePoint webu a další dva se postarají o výpis administrátorů Site Collection. Pro ověření funkčnosti Automation Accountu a pochopení principů to stačí.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-1d8c131 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="1d8c131" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Upozornění</span>
			
						<span class="elementor-alert-description">Všimněte si, že u příkazi Connect-PnPOnline je použit parametr -ManagedIdentity, ktežto když spouštíte stejný příkaz lokálně z počítače, používáte parametr -Interactive</span>
			
						<button type="button" class="elementor-alert-dismiss" aria-label="Zavřít toto upozornění.">
									<span aria-hidden="true">&times;</span>
							</button>
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-4cd1115 elementor-widget elementor-widget-code-block-for-elementor" data-id="4cd1115" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Connect-PnPOnline -Url &quot;https://sragacz.sharepoint.com/sites/Kvalitaabazpenost&quot; -ManagedIdentity

$Web = Get-PnPWeb 
$Web 

$SiteAdmins = Get-PnPSiteCollectionAdmin 
$SiteAdmins 

$SiteCollectionAdmins = ($SiteAdmins | Select -ExpandProperty Title) -join &quot;,&quot; 
$SiteCollectionAdmins</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-29f9bad elementor-widget elementor-widget-heading" data-id="29f9bad" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Pravidelné spouštění skriptů (runbooků)</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-42ff7b1 elementor-widget elementor-widget-text-editor" data-id="42ff7b1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Když jsou skripty funkční, zbývý poslední fáze. Určitě chcete, aby se <strong>skript spouštěl pravidělně</strong>. Takže v levém menu přejděte na <strong>Schedules (27)</strong> a přidejte <strong>nový časový plán (28)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-52acb08 elementor-widget elementor-widget-image" data-id="52acb08" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts29" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTIzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czI5LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="354" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29-768x354.png" class="attachment-medium_large size-medium_large wp-image-523" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29-768x354.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29-300x138.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29-1024x472.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts29.png 1205w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-3fc9e5d elementor-widget elementor-widget-text-editor" data-id="3fc9e5d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V dalším okně je potřeba &#8222;napárovat&#8220; daný Rubnook na časový plán. Klikněte na <strong>Link a schedule to your runbook (29).</strong></p><p><em>Pozn.: Lze jít také cestou, že si nejprve vytvoříte časové plány na úrovni Automation Accountu a nikoliv zde v detailu Rubnooku.</em></p>								</div>
				</div>
				<div class="elementor-element elementor-element-248d066 elementor-widget elementor-widget-image" data-id="248d066" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts30.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts30" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTIyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czMwLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="246" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts30-768x246.png" class="attachment-medium_large size-medium_large wp-image-522" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts30-768x246.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts30-300x96.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts30.png 938w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-6bf66ee elementor-widget elementor-widget-text-editor" data-id="6bf66ee" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Přidejte nový časový plán (30)<br /></strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-bd7549e elementor-widget elementor-widget-image" data-id="bd7549e" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts31.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts31" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTIxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czMxLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="299" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts31-768x299.png" class="attachment-medium_large size-medium_large wp-image-521" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts31-768x299.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts31-300x117.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts31.png 861w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-c764ec2 elementor-widget elementor-widget-text-editor" data-id="c764ec2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V pravém okně vyplňte <strong>(31)</strong> název časového plánu, já mám v příkladu &#8222;Denně&#8220;, protože pro ukázku nastavím opakující se denní spouštění skriptu. Určitě opět doporučuji vyplňit také <strong>popis</strong>.</p><p>Zvolte <strong>datum a čas</strong> prvního spuštění a také <strong>časovou zónu</strong>, pro kterou jsou časy platné.</p><p>Pro <strong>pravidelné opakování</strong> přepněte přepínač <strong>Recurrence (32)</strong> do polohy Recurring.</p><p>Následně zvolte četnost opakování a případný konec opakování (Set expiration).</p><p>Pokud jsou všechny údaje v pořádku, klikněte na tlačítko <strong>Vytvořit (33)</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6e24af9 elementor-widget elementor-widget-image" data-id="6e24af9" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts32" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTIwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czMyLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="372" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32-768x372.png" class="attachment-medium_large size-medium_large wp-image-520" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32-768x372.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32-300x145.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32-1024x495.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32-1536x743.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts32.png 1914w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-f88b86f elementor-widget elementor-widget-text-editor" data-id="f88b86f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Systém na pozadí vytvoří časový plán. V tomto kroku stačí potvrdit napárování Rubnooku na právě vytvořený časový plán, kliknutím na tlačítko <strong>OK</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-9cf0c8c elementor-widget elementor-widget-image" data-id="9cf0c8c" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts33" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTE5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czMzLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="372" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33-768x372.png" class="attachment-medium_large size-medium_large wp-image-519" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33-768x372.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33-300x145.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33-1024x496.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33-1536x744.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts33.png 1915w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-305ea2c elementor-widget elementor-widget-text-editor" data-id="305ea2c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Vytvořený časový plán se zobrazí v seznamu <strong>Schedules</strong> v detailu Runbooku.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7525a4d elementor-widget elementor-widget-image" data-id="7525a4d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts34" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTE4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czM0LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="199" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34-768x199.png" class="attachment-medium_large size-medium_large wp-image-518" alt="Schedule PowerShell Runbook" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34-768x199.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34-300x78.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34-1024x266.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34-1536x398.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts34.png 1700w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-263d9f9 elementor-widget elementor-widget-text-editor" data-id="263d9f9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud si chcete prohlédnout historii spuštění rubnooku, přejděte v levém menu do sekce <strong>Jobs</strong>. Zobrazí se seznam všech spuštění, jejich stav a poslední aktivita. Po rozkliknutí konkrétního jobu jsou také k dispozici servisní informace, výstupy sktiptu a logy.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-b616978 elementor-widget elementor-widget-image" data-id="b616978" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="azure-automation-accounts35" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTMwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvYXp1cmUtYXV0b21hdGlvbi1hY2NvdW50czM1LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="195" src="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35-768x195.png" class="attachment-medium_large size-medium_large wp-image-530" alt="PowerShell Runbook - Jobs" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35-768x195.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35-300x76.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35-1024x260.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35-1536x391.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/04/azure-automation-accounts35.png 1884w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-1fa4ae8 elementor-widget elementor-widget-heading" data-id="1fa4ae8" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Videonávod</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-cbd8cc4 elementor-widget elementor-widget-video" data-id="cbd8cc4" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/www.youtube.com\/watch?v=uxZMmLxU3og&amp;t=634s&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Instalace PnP PowerShell</title>
		<link>https://www.sraga.cz/instalace-pnp-powershell/</link>
					<comments>https://www.sraga.cz/instalace-pnp-powershell/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 18 Apr 2024 15:55:39 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[Report]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=570</guid>

					<description><![CDATA[Dnes vám ukážu, jak nainstalovat PowerShell modul PnP PnP PowerShell je multiplatformní modul pro PowerShell, který poskytuje více než 650 rutin, které pracují s prostředími a produkty Microsoft 365, jako jsou SharePoint Online, Microsoft Teams, Microsoft Planner, Microsoft Flow a další. Funguje v systémech Windows, Linux a MacOS. Obsah PnP.PowerShell vs Sharepoint Online Management Shell Než se podíváme na to, jak ... <a title="Instalace PnP PowerShell" class="read-more" href="https://www.sraga.cz/instalace-pnp-powershell/" aria-label="Číst více o Instalace PnP PowerShell">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="570" class="elementor elementor-570" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-d868f49 e-flex e-con-boxed e-con e-parent" data-id="d868f49" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-aaf3786 elementor-widget elementor-widget-text-editor" data-id="aaf3786" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><span data-contrast="auto">Dnes vám ukážu, jak nainstalovat PowerShell modul PnP</span></p><p><span data-contrast="auto"><a href="/?s=pnp+powershell" target="_blank" rel="noopener">PnP PowerShell</a> je multiplatformní modul pro PowerShell, který poskytuje více než 650 rutin, které pracují s prostředími a produkty Microsoft 365, jako jsou SharePoint Online, Microsoft Teams, Microsoft Planner, Microsoft Flow a další. Funguje v systémech Windows, Linux a MacOS.</span></p>								</div>
				</div>
				<div class="elementor-element elementor-element-58e5c7e elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="58e5c7e" data-element_type="widget" data-settings="{&quot;exclude_headings_by_selector&quot;:[],&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="table-of-contents.default">
				<div class="elementor-widget-container">
									<div class="elementor-toc__header">
						<h4 class="elementor-toc__header-title">
				Obsah			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__58e5c7e" aria-expanded="true" aria-label="Open table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-down" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path></svg></div>
				<div class="elementor-toc__toggle-button elementor-toc__toggle-button--collapse" role="button" tabindex="0" aria-controls="elementor-toc__58e5c7e" aria-expanded="true" aria-label="Close table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-up" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"></path></svg></div>
					</div>
				<div id="elementor-toc__58e5c7e" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-5eb3cdd elementor-widget elementor-widget-heading" data-id="5eb3cdd" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">PnP.PowerShell vs Sharepoint Online Management Shell</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-629d686 elementor-widget elementor-widget-text-editor" data-id="629d686" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Než se podíváme na to, jak <a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbEJpVXZUZDRiRGJ0RWpLNWlaUE5sMEphX0FDQXxBQ3Jtc0trRHB2VDRxd2ViaTdBR2tQZ2NleklkYWhzVVF6b1NkN041VWV3WkpBekgzZlFrS2lSM0xJTFpoTzNJM1VhS3ZoRzBUb1FHN2FjMko5SDVaSlIyRG8wMVZ5NkRJYW1aeGxGbDd2Ym0wdXhraGVLaXAzcw&amp;q=https%3A%2F%2Fpnp.github.io%2Fpowershell%2Findex.html&amp;v=f4yGD1pnxZY" target="_blank" rel="noopener">PnP PowerShell</a> nainstalovat, je dobré vědět, že existuje také modul PowerShell od společnosti Microsoft. Jedná se o <a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqa3EtaGxMRHVKcEN0cWhjb19vZzNsNkdZTDgzd3xBQ3Jtc0trRUtIMThScDQ4QTI3Ty1OOF9jVHhqb3F4Tnh1cnFMTVRPblNIckZDUlF4TWxZYTJvZW4zcUdvUDY5b0tSSVU4eWl5bTZjVlFwTENpb1ljQUxhUTJVLTJVYkUtQ00zNXJkV25HWGFWbzF4T2lTdlU0UQ&amp;q=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fpowershell%2Fsharepoint%2Fsharepoint-online%2Fconnect-sharepoint-online&amp;v=f4yGD1pnxZY" target="_blank" rel="noopener"><strong>SharePoint Online Management Shell (SPO)</strong></a> a jedná se o oficiální PowerShell modul, který je určený právě pro správu prostředí <a href="/category/sharepoint/" target="_blank" rel="noopener">SharePoint Online</a>.</p><p>Ještě si pojďme říct, jaké jsou mezi SPO a PnP <strong>hlavní rozdíly</strong>.</p><ul><li>SPO slouží ke správě SharePointu na <strong>úrovni tenantu</strong>, zatímco PnP PowerShell umožňuje připojit se ke <strong>konkrétnímu webu</strong> SharePointu.</li><li>Rutiny prostředí PnP PowerShell obsahují více parametrů, což umožňuje realizovat složitější úlohy ve srovnání s ekvivalentními rutinami prostředí SPO.</li><li>SPO cmdlety se spouštějí v kontextu práv správce tenantu, zatímco PnP PowerShell se spouští v kontextu aktuálního uživatele (můžete se samozřejmě připojit s přihlašovacími údaji správce)</li></ul><p>Každý z nich má své výhody. Pokud chcete spouštět příkazy na konkrétním webu SharePointu nebo v kontextu aktuálního uživatele, použijte PnP PowerShell. Potřebujete-li změnit nastavení na úrovni tenantu, použijte rutiny SPO.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-664c963 elementor-widget elementor-widget-heading" data-id="664c963" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Instalace PnP PowerShell</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-9039c92 elementor-widget elementor-widget-text-editor" data-id="9039c92" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Aby bylo možné PnP modul nainstalovat, je nutné mít <a href="https://www.sraga.cz/instalace-powershell-7/" target="_blank" rel="noopener">PowerShell prostředí verze 7</a>.</p><p>Dále je potřeba odinstalovat starou verzi modulu, která se jmenovala <strong>SharePointPnPPowerShellOnline.</strong></p><p>Zda máte nainstalovanou verzi tzv. legacy modulu zjistíte příkazem:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-0e2548d elementor-widget elementor-widget-code-block-for-elementor" data-id="0e2548d" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-Module SharePointPnPPowerShellOnline -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-1e15fe1 elementor-widget elementor-widget-text-editor" data-id="1e15fe1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud je modul přítomen, příkaz vypíše jeho název a verzi. Každopádně, tuto verzi je potřeba <strong>odinstalovat</strong> pomocí příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-4e6cb84 elementor-widget elementor-widget-code-block-for-elementor" data-id="4e6cb84" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Uninstall-Module SharePointPnPPowerShellOnline -Force -AllVersions</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-3f7ba60 elementor-widget elementor-widget-text-editor" data-id="3f7ba60" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Samotnou <strong>instalaci</strong> provedete pomocí příkazu</p>								</div>
				</div>
				<div class="elementor-element elementor-element-adb5d2e elementor-widget elementor-widget-code-block-for-elementor" data-id="adb5d2e" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Install-Module PnP.PowerShell</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-98c69a0 elementor-widget elementor-widget-text-editor" data-id="98c69a0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Tím se stáhne a nainstaluje modul PnP prostředí PowerShell z PowerShell Galerie.</p><p>Posledním krokem je udělení souhlasu (Consent) pro udělení oprávnění k tenantu pro Entra ID (Azure AD) Enterprise aplikaci. Po spuštění níže uvedenho příkazu budete vyzváni k udělení souhlasu s řidělením oprávnění k tenantu. V tomto kroku se musíte přihlásit účtem oprávněním Global Admin (nebo Tenant Administrator) a tento krok dokončit.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-ce26a09 elementor-widget elementor-widget-code-block-for-elementor" data-id="ce26a09" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Register-PnPManagementShellAccess</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-c80e2c1 elementor-alert-info elementor-widget elementor-widget-alert" data-id="c80e2c1" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Upozornění</span>
			
						<span class="elementor-alert-description">Pokud příkaz Register-PnPManagementShellAccess skončí chybou, pravděpodobně nepracujete v kontextu PowerShellu verze 7.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-240437e elementor-widget elementor-widget-text-editor" data-id="240437e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud nedisponujete oprávněním Global Admin nebo Tenant Admin, použijte výše uvedený příkaz s parametrem <strong>-ShowConsentUrl</strong> a po vyzvání se ověřte svým uživatelským účtem. Příkaz vygeneruje URL, kterou si zkopírujte, zašlete vašemu IT správci, který disponuje patřičným oprávněním a požádejte jej o udělení souhlasu.</p><p>To je vše, PnP PowerShell je nainstalován. Přihlásit se můžete prostřednictvím následujících příkazů:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-304dbc0 elementor-widget elementor-widget-text-editor" data-id="304dbc0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong><em>EDIT:</em></strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-be67fa5 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="be67fa5" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">WARNING:</span>
			
						<span class="elementor-alert-description"> Creating PnP Management Shell multi-tenant App for authentication is not supported as of September 9th, 2024.
 Please use Register-PnPEntraIDApp or Register-PnPEntraIDAppForInteractiveLogin. Refer to https://pnp.github.
 io/powershell/articles/registerapplication.html on how to register your own application.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-d953a44 elementor-widget elementor-widget-text-editor" data-id="d953a44" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Od září 2024 není metoda Register-PnPManageemntShellAccess dostupná. Při jejím volání se zobrazí chybové hlášení:</p><p><strong>Register-PnPManagementShellAccess: Specified method is not supported.</strong></p><p>Alternativnou je použití následujícího příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-3ca660a elementor-widget elementor-widget-code-block-for-elementor" data-id="3ca660a" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Register-PnPEntraIDAppForInteractiveLogin -ApplicationName &quot;PnP PowerShell&quot; -SharePointDelegatePermissions &quot;AllSites.FullControl&quot; -Tenant vas_tenant.onmicrosoft.com</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d9a2c20 elementor-widget elementor-widget-text-editor" data-id="d9a2c20" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud by při registraci aplikace PnP PowerShell vznikly nějaké problémy, <a href="https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/" target="_blank" rel="noopener">návod na jejich řešení je zde</a>.</p><p>Pokud příkaz skončí hlášením </p><p>App created. You can now connect to your tenant using Connect-PnPOnline -Url &lt;yourtenanturl&gt; ClientId 56996953-612a-4d0f-b42d-a2d71b1f71dc</p><p>Můžete pokračovat dál.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-fb0e08d elementor-widget elementor-widget-code-block-for-elementor" data-id="fb0e08d" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># Ulozeni ClientID do promenne
$ClientID = &quot;56996953-612a-4d0f-b42d-a2d71b1f71dc&quot;

# Prihlaseni pomoci ClientID
Connect-PnPOnline -Url &quot;https://vas_tenant.sharepoint.com&quot;  -Interactive -ClientId $ClientID

# Prihlaseni pomoci PnP PowerShell
Connect-PnPOnline -Url &quot;https://vas_tenant.sharepoint.com&quot; -Interactive

# Prihlaseni ke konkretni Sharepoint Site
Connect-PnPOnline -Url &quot;https://vas_tenant.sharepoint.com/sites/Site&quot; -Interactive

# Odhlaseni
Disconnect-PnPOnline</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-bee6c43 elementor-widget elementor-widget-text-editor" data-id="bee6c43" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Další základní příkazy, díky kterým si můžete otestovat, že PnP PowerShell funguje správně:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-32eb988 elementor-widget elementor-widget-code-block-for-elementor" data-id="32eb988" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># Ziska vsechny seznamy
Get-PnPList

# Ziska informace o Sharepoint webu
$Web = Get-PnPWeb 
$Web 

# Ziska Site Administratory
$SiteAdmins = Get-PnPSiteCollectionAdmin 
$SiteAdmins 

# Ziska Site Collection Administratory a oddeli je carkou
$SiteCollectionAdmins = ($SiteAdmins | Select -ExpandProperty Title) -join &quot;,&quot; 
$SiteCollectionAdmins

# Vypise vsechny podporovane cmdlety
Get-Command -Module PnP.Powershell</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-156c97a elementor-widget elementor-widget-heading" data-id="156c97a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">PnP PowerShell skript jako Azure Runbook</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-225c2a8 elementor-widget elementor-widget-text-editor" data-id="225c2a8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud chcete pouštět skripty automatizovaně a <strong>bezpečně</strong> bez nutnosti řešit hesla a poveření, koukněte na článek <a href="https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/" target="_blank" rel="noopener">Automatizace skriptů PnP PowerShell – Azure Automation</a>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-f9cb4c6 elementor-widget elementor-widget-heading" data-id="f9cb4c6" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Videonávod</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-2188c68 elementor-widget elementor-widget-video" data-id="2188c68" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/www.youtube.com\/watch?v=f4yGD1pnxZY&amp;t=20s&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-7494a9e elementor-widget elementor-widget-heading" data-id="7494a9e" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Závěrem</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-6bdeb41 elementor-widget elementor-widget-text-editor" data-id="6bdeb41" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud potřebujete ve vaší organizaci pomoct s migrací do Microsoft 365 nebo Azure, vyřešit zabezpečení nebo proškolit uživatele, <a href="https://www.sraga.cz/kontakt/">ozvěte se mi</a>, určitě něco vymyslíme.</p>								</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/instalace-pnp-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Instalace PowerShell 7</title>
		<link>https://www.sraga.cz/instalace-powershell-7/</link>
					<comments>https://www.sraga.cz/instalace-powershell-7/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Wed, 17 Apr 2024 12:21:37 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=357</guid>

					<description><![CDATA[&#160; Přestože první verze prostředí PowerShell 7 byla vydána už někdy v roce 2020, na nových počítačích se systémem Windows je stále ve výchozím nastavení nainstalováno prostředí PowerShell 5.1. Naštěstí však můžeme PowerShell 7 nainstalovat ručně, a to dokonce vedle staré verze. Prostředí PowerShell 5.1 (s názvem Windows PowerShell), se již nevyvíjí. Nové moduly a ... <a title="Instalace PowerShell 7" class="read-more" href="https://www.sraga.cz/instalace-powershell-7/" aria-label="Číst více o Instalace PowerShell 7">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="357" class="elementor elementor-357" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-9304777 e-flex e-con-boxed e-con e-parent" data-id="9304777" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-479ecb04 elementor-widget elementor-widget-text-editor" data-id="479ecb04" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									&nbsp;

&nbsp;								</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-c8a95da e-flex e-con-boxed e-con e-parent" data-id="c8a95da" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-6e87b8c elementor-widget elementor-widget-text-editor" data-id="6e87b8c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Přestože první verze prostředí PowerShell 7 byla vydána už někdy v roce 2020, na nových počítačích se systémem Windows je stále <strong>ve výchozím nastavení nainstalováno prostředí PowerShell 5.1</strong>. Naštěstí však můžeme PowerShell 7 nainstalovat ručně, a to dokonce vedle staré verze.</p><p>Prostředí PowerShell 5.1 (s názvem Windows PowerShell), se již nevyvíjí. Nové moduly a rutiny jsou vydávány pouze pro PowerShell 7, který je navíc mnohem rychlejší než stará verze. To je tedy dobrý důvod, proč začít používat novou verzi.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-65a8e95 elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="65a8e95" data-element_type="widget" data-settings="{&quot;exclude_headings_by_selector&quot;:[],&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="table-of-contents.default">
				<div class="elementor-widget-container">
									<div class="elementor-toc__header">
						<h4 class="elementor-toc__header-title">
				Obsah			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__65a8e95" aria-expanded="true" aria-label="Open table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-down" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path></svg></div>
				<div class="elementor-toc__toggle-button elementor-toc__toggle-button--collapse" role="button" tabindex="0" aria-controls="elementor-toc__65a8e95" aria-expanded="true" aria-label="Close table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-up" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"></path></svg></div>
					</div>
				<div id="elementor-toc__65a8e95" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-153f727 elementor-widget elementor-widget-heading" data-id="153f727" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Možnosti instalace PowerShell 7</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ff6f825 elementor-widget elementor-widget-text-editor" data-id="ff6f825" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Existují různé způsoby instalace prostředí PowerShell 7 do systému Windows, ale nejčastěji se používají tyto tři metody:</p><ul><li><strong>Winget </strong>&#8211; Doporučená metoda instalace prostředí PowerShell v systému Windows 10 a novějším</li><li><strong>Microsoft Store</strong> &#8211; Snadná metoda pro běžné uživatele</li><li><strong>MSI </strong>&#8211; Pro případy, kdy potřebujete PowerShell nasadid hromadně</li></ul><p>Každá metoda instalace automaticky nainstaluje <strong>nejnovější verzi prostředí PowerShell</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-fbb805d elementor-widget elementor-widget-heading" data-id="fbb805d" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Instalace PowerShell pomocí nástroje WinGet</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-9810534 elementor-widget elementor-widget-text-editor" data-id="9810534" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><br />Doporučeným způsobem instalace PowerShell v systému Windows je použití integrovaného nástroje příkazového řádku (Správce balíčků systému Windows / Windows Package Manager), <strong>Winget</strong>. Tento nástroj umožňuje rychlou instalaci, aktualizaci nebo odebrání aplikací v zařízeních se systémem Windows.</p><p>Je předinstalován v systému Windows 11 a nejnovějších verzích systému Windows 10. Pokud nástroj Winget nemáte, použijte některou z dalších metod popsaných v tomto článku.</p><p>Spusťte prostředí PowerShell nebo Terminal s oprávněním správce a zadejte následující příkaz:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-e4ff40c elementor-widget elementor-widget-code-block-for-elementor" data-id="e4ff40c" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>winget install --id Microsoft.PowerShell

# alternativne lze pouzit
iex &quot;&amp; { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI&quot;</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d6d05a0 elementor-widget elementor-widget-text-editor" data-id="d6d05a0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po dokončení instalace můžete PowerShell 7 používat tak, že jej otevřete prostřednictvím nabídky Start nebo jej vyberete na nové kartě v Terminálu systému Windows.</p><p>Pokud chcete používat preview verzi prostředí PowerShell, musíte změnit název balíčku na &#8222;Microsoft.Powershell.Preview&#8220;. K instalaci starších verzí prostředí PowerShell nelze použít Winget.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-295bb43 elementor-widget elementor-widget-video" data-id="295bb43" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/Jl8_JHYttJg&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-6af75ec elementor-widget elementor-widget-heading" data-id="6af75ec" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Aktualizace PowerShell pomocí nástroje WinGet</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b510feb elementor-widget elementor-widget-text-editor" data-id="b510feb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud jste použili metodu instalace z Microsoft Store nebo MSI, bude prostředí PowerShell aktualizováno prostřednictvím aktualizací systému Windows. Pokud jste však použili doporučenou metodu Winget, budete muset prostředí PowerShell aktualizovat sami.</p><p>To můžete provést spuštěním následujícího příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7923c86 elementor-widget elementor-widget-code-block-for-elementor" data-id="7923c86" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>winget upgrade Microsoft.PowerShell</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-2829709 elementor-widget elementor-widget-heading" data-id="2829709" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zjištěné verze PowerShell</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-11635d4 elementor-widget elementor-widget-text-editor" data-id="11635d4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Zjisit verzi prostředí PowerShell lze zadáním následujícího příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-11b7ebd elementor-widget elementor-widget-code-block-for-elementor" data-id="11b7ebd" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>$PSVersionTable</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-ccf0b4f elementor-widget elementor-widget-image" data-id="ccf0b4f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="powershell-instalace-version5" data-elementor-lightbox-description="Powershell verze 5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzYzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG93ZXJzaGVsbC1pbnN0YWxhY2UtdmVyc2lvbjUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="862" height="458" src="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version5.png" class="attachment-large size-large wp-image-363" alt="Powershell verze 5" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version5.png 862w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version5-300x159.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version5-768x408.png 768w" sizes="(max-width: 862px) 100vw, 862px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-89ad541 elementor-widget elementor-widget-image" data-id="89ad541" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version7.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="powershell-instalace-version7" data-elementor-lightbox-description="Powershell verze 7" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzYyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG93ZXJzaGVsbC1pbnN0YWxhY2UtdmVyc2lvbjcucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="862" height="458" src="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version7.png" class="attachment-large size-large wp-image-362" alt="Powershell verze 7" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version7.png 862w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version7-300x159.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-version7-768x408.png 768w" sizes="(max-width: 862px) 100vw, 862px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-64ec99f elementor-widget elementor-widget-heading" data-id="64ec99f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Instalace pomocí MSI balíčku</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-eb33286 elementor-widget elementor-widget-text-editor" data-id="eb33286" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V případě požadavku na hromadnou instalaci se nabízí instalace prostředí PowerShell pomocí balíčku MSI. <strong>Výhodou balíčku MSI je, že si můžete vybrat, kterou verzi chcete nainstalovat</strong>. Doporučuji samozřejmě instalovat nejnovější stabilní verzi.</p><p>Pokud však vaše prostředí vyžaduje například verzi 7.2, můžete si stáhnout MSI pro tuto verzi.</p><p>Nejnovější stabilní verzi si můžete stáhnout pomocí odkazu zde v <a href="https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#installing-the-msi-package" target="_blank" rel="noopener">dokumentaci společnosti Microsoft</a>. Další možností je použít <a href="https://github.com/PowerShell/PowerShell/releases" target="_blank" rel="noopener">stránku na Githubu</a> a vybrat verzi, kterou chcete nainstalovat.</p><p>Jednoduchým spuštěním MSI souboru nainstalujete prostředí PowerShell. Doporučuji ponechat zaškrtnuté všechny možnosti, včetně možností aktualizace.</p><p>Stejně jako jakýkoliv jiný MSI soubor můžete i MSI PowerShellu nainstalovat pomocí příkazového řádku. Tato metoda se běžně používá ve scénáříchs potřebou hromadného nasazení. Pro tichou instalaci prostředí PowerShell se všemi možnostmi můžete použít následující příkaz:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-af670eb elementor-widget elementor-widget-code-block-for-elementor" data-id="af670eb" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>msiexec.exe /package PowerShell-7.4.2-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d21cded elementor-widget elementor-widget-heading" data-id="d21cded" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Instalace z Microsoft Store</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-dd848b0 elementor-widget elementor-widget-text-editor" data-id="dd848b0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Moje nejméně oblíbená možnost. <br />Výhodou této metody je, že automaticky udržuje PowerShell vždy aktuální.</p><p>Stačí v nabídce Start otevřít &#8222;Microsoft Store&#8220; a zadat do vyhledávání heslo &#8222;PowerShell&#8220;. U nabídnuté aplikace pak zvolit možnost &#8222;Získat&#8220;. </p><p>Alternativně lze použít také přímý odkaz na PowerShell přímo do Microsoft Store:</p><p><a href="https://apps.microsoft.com/detail/9mz1snwt0n5d?hl=en-us&amp;gl=US" target="_blank" rel="noopener">https://apps.microsoft.com/detail/9mz1snwt0n5d?hl=en-us&amp;gl=US</a></p>								</div>
				</div>
				<div class="elementor-element elementor-element-7e17e8d elementor-widget elementor-widget-image" data-id="7e17e8d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="powershell-instalace-store" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzYxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG93ZXJzaGVsbC1pbnN0YWxhY2Utc3RvcmUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="597" src="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store-768x597.png" class="attachment-medium_large size-medium_large wp-image-361" alt="Instalace PowerShell - Microsot Store" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store-768x597.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store-300x233.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store-1024x796.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-store.png 1204w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-277823c elementor-widget elementor-widget-heading" data-id="277823c" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Spuštění PowerShell verze 7</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ed526ab elementor-widget elementor-widget-text-editor" data-id="ed526ab" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Abyste mohli používat prostředí PowerShell 7, <strong>musíte jej aktivně</strong> spustit. Pokud byste pouze otevřeli prostředí Windows PowerShell nebo Terminál, pak byste stále používali starší verzi prostředí PowerShell (5.1). Kterou verzi používáte, můžete zjistit příkazem <code>$PSVersionTable</code> (viz informace výše).</p><p>Pro prostředí PowerShell 7 doporučuji použít Terminál. Pokud otevřete Terminál, pak můžete kliknutím na ikonu nové karty vybrat PowerShell 7. Je také možné nastavit ji jako výchozí verzi, a to změnou preferencí v nastavení Terminálu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-4e75012 elementor-widget elementor-widget-image" data-id="4e75012" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="powershell-instalace-terminal" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzY1LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG93ZXJzaGVsbC1pbnN0YWxhY2UtdGVybWluYWwucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="508" src="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal-1024x578.png" class="attachment-large size-large wp-image-365" alt="powershell instalace terminal" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal-1024x578.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal-300x169.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal-768x434.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-terminal.png 1116w" sizes="(max-width: 900px) 100vw, 900px">								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ae73cc1 elementor-widget elementor-widget-text-editor" data-id="ae73cc1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Další možností je otevřít nabídku <strong>Start</strong> a vyhledat (zadat) <strong>PowerShell</strong>. Poté můžete vybrat PowerShell 7.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-5d26bac elementor-widget elementor-widget-image" data-id="5d26bac" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-start.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="powershell-instalace-start" data-elementor-lightbox-description="Spuštění PowerShell 7 - nabídka Start" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzY0LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvcG93ZXJzaGVsbC1pbnN0YWxhY2Utc3RhcnQucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="792" height="746" src="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-start.png" class="attachment-large size-large wp-image-364" alt="Spuštění PowerShell 7 - nabídka Start" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-start.png 792w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-start-300x283.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/powershell-instalace-start-768x723.png 768w" sizes="(max-width: 792px) 100vw, 792px" />								</a>
															</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/instalace-powershell-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jak povolit specifický typ souboru v Exchange Online (novém Outlooku)</title>
		<link>https://www.sraga.cz/jak-povolit-specificky-typ-souboru-v-exchange-online-novem-outlooku/</link>
					<comments>https://www.sraga.cz/jak-povolit-specificky-typ-souboru-v-exchange-online-novem-outlooku/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 08 Feb 2024 11:42:51 +0000</pubDate>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Nový Outlook]]></category>
		<category><![CDATA[PowerShell]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=177</guid>

					<description><![CDATA[Setkal jsem se s problémem, že v novém Outlooku a stejně tak v OWA (Outlook Web Access) nelze otevřít specifický typ souboru. V tomto případě byl blokovaný soubor s příponou XML. Vzhledem k tomu, že spousta firem přijímá výpisy z banky právě e-mailem formou přílohy XML, je toto pro uživatele značnou komplikací. Obsah &#160; Řešení, ... <a title="Jak povolit specifický typ souboru v Exchange Online (novém Outlooku)" class="read-more" href="https://www.sraga.cz/jak-povolit-specificky-typ-souboru-v-exchange-online-novem-outlooku/" aria-label="Číst více o Jak povolit specifický typ souboru v Exchange Online (novém Outlooku)">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="177" class="elementor elementor-177" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-9b55833 e-flex e-con-boxed e-con e-parent" data-id="9b55833" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-cf79061 elementor-widget elementor-widget-text-editor" data-id="cf79061" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Setkal jsem se s problémem, že v novém Outlooku a stejně tak v OWA (Outlook Web Access) nelze otevřít specifický typ souboru. V tomto případě byl blokovaný soubor s příponou XML. Vzhledem k tomu, že spousta firem přijímá výpisy z banky právě e-mailem formou přílohy XML, je toto pro uživatele značnou komplikací.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7b38b1f elementor-widget elementor-widget-image" data-id="7b38b1f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="exchange-filetype" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTgyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wMlwvZXhjaGFuZ2UtZmlsZXR5cGUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="459" src="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype-768x459.png" class="attachment-medium_large size-medium_large wp-image-182" alt="Exchange Online, Outlook - blokovaný typ souboru" srcset="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype-768x459.png 768w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype-300x179.png 300w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype.png 822w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-519be6e elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="519be6e" data-element_type="widget" data-settings="{&quot;exclude_headings_by_selector&quot;:[],&quot;headings_by_tags&quot;:[&quot;h2&quot;,&quot;h3&quot;,&quot;h4&quot;,&quot;h5&quot;,&quot;h6&quot;],&quot;marker_view&quot;:&quot;numbers&quot;,&quot;no_headings_message&quot;:&quot;No headings were found on this page.&quot;,&quot;minimize_box&quot;:&quot;yes&quot;,&quot;minimized_on&quot;:&quot;tablet&quot;,&quot;hierarchical_view&quot;:&quot;yes&quot;,&quot;min_height&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;min_height_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="table-of-contents.default">
				<div class="elementor-widget-container">
									<div class="elementor-toc__header">
						<h4 class="elementor-toc__header-title">
				Obsah			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__519be6e" aria-expanded="true" aria-label="Open table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-down" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path></svg></div>
				<div class="elementor-toc__toggle-button elementor-toc__toggle-button--collapse" role="button" tabindex="0" aria-controls="elementor-toc__519be6e" aria-expanded="true" aria-label="Close table of contents"><svg aria-hidden="true" class="e-font-icon-svg e-fas-chevron-up" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"></path></svg></div>
					</div>
				<div id="elementor-toc__519be6e" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-245bb34 elementor-widget elementor-widget-heading" data-id="245bb34" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Řešení, které doporučuje Microsoft</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ad2c8e9 elementor-widget elementor-widget-text-editor" data-id="ad2c8e9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Microsoft má <a href="https://support.microsoft.com/en-us/topic/outlook-blocked-access-to-the-following-potentially-unsafe-attachments-c5c4a480-041e-2466-667f-e98d389ff822" target="_blank" rel="noopener">doporučení</a>, použít soubor v jiném formátu, nebo přílohu komprimovat. S tímto se samozřejmě spokojit nechceme, takže na to půjdeme jinak.</p><p>Co budeme potřebovat? Exchange Online PowerShell modul (ExchangeOnlineManagement)</p>								</div>
				</div>
				<div class="elementor-element elementor-element-caf882f elementor-alert-danger elementor-widget elementor-widget-alert" data-id="caf882f" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Upozornění</span>
			
						<span class="elementor-alert-description">Níže uvedená nastavení jsou platná pro celý tenatnt. Typy souborů povolujte pouze za předpokldadu, že víte, jaká rizika s tímto mohou být spojena.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-c933d0e elementor-widget elementor-widget-heading" data-id="c933d0e" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zjištění, zda je soubor typu .xml blokován</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-2d4ec9f elementor-widget elementor-widget-code-block-for-elementor" data-id="2d4ec9f" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-OwaMailboxPolicy | Select-Object -ExpandProperty BlockedFileTypes
</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5a227de elementor-widget elementor-widget-image" data-id="5a227de" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="768" height="433" src="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_0-768x433.png" class="attachment-medium_large size-medium_large wp-image-183" alt="Exchange Online, Outlook - blokovaný typ souboru" srcset="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_0-768x433.png 768w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_0-300x169.png 300w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_0-1024x577.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_0.png 1115w" sizes="(max-width: 768px) 100vw, 768px" />															</div>
				</div>
				<div class="elementor-element elementor-element-1fbf3a8 elementor-widget elementor-widget-image" data-id="1fbf3a8" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="768" height="433" src="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_1-768x433.png" class="attachment-medium_large size-medium_large wp-image-179" alt="Exchange Online, Outlook - blokovaný typ souboru" srcset="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_1-768x433.png 768w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_1-300x169.png 300w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_1-1024x577.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_1.png 1115w" sizes="(max-width: 768px) 100vw, 768px" />															</div>
				</div>
				<div class="elementor-element elementor-element-596bc7c elementor-widget elementor-widget-heading" data-id="596bc7c" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zjištění, zda je MIME type pro XML blokován (text/xml)</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-fa37556 elementor-widget elementor-widget-code-block-for-elementor" data-id="fa37556" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-OwaMailboxPolicy | Select-Object -ExpandProperty BlockedMimeTypes
</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5ff5f09 elementor-widget elementor-widget-image" data-id="5ff5f09" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="exchange-filetype_3" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTgwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wMlwvZXhjaGFuZ2UtZmlsZXR5cGVfMy5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="433" src="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3-768x433.png" class="attachment-medium_large size-medium_large wp-image-180" alt="Exchange Online, Outlook - blokovaný typ souboru" srcset="https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3-768x433.png 768w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3-300x169.png 300w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3-1024x577.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/02/exchange-filetype_3.png 1115w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-721340c elementor-widget elementor-widget-heading" data-id="721340c" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Povolení souboru s příponou .xml</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b11ec72 elementor-widget elementor-widget-code-block-for-elementor" data-id="b11ec72" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedFileTypes @{Remove = &quot;.xml&quot;}
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -AllowedFileTypes @{Add = &quot;.xml&quot;}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-bb010d8 elementor-widget elementor-widget-heading" data-id="bb010d8" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Povolení MIME type "text/xml" a "application/xml"</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b7e045f elementor-widget elementor-widget-code-block-for-elementor" data-id="b7e045f" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedMimeTypes @{Remove = &quot;text/xml&quot;, &quot;application/xml&quot;}
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy &ndash;AllowedMimeTypes @{Add = &quot;text/xml&quot;, &quot;application/xml&quot;}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-95780c9 elementor-alert-info elementor-widget elementor-widget-alert" data-id="95780c9" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Upozornění</span>
			
						<span class="elementor-alert-description">provedené změny se neprojeví hned. Je potřeba několik minut počkat, případně se uživatel odhlásí a znovu přihlásí.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-804a458 elementor-widget elementor-widget-heading" data-id="804a458" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Videonávod</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-d57334d elementor-widget elementor-widget-video" data-id="d57334d" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/aBIsd9Dx1xk&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-5f09df6 elementor-widget elementor-widget-heading" data-id="5f09df6" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Užitečné odkazy</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-dc3f7b0 elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="dc3f7b0" data-element_type="widget" data-widget_type="icon-list.default">
				<div class="elementor-widget-container">
							<ul class="elementor-icon-list-items">
							<li class="elementor-icon-list-item">
											<a href="https://learn.microsoft.com/en-us/exchange/troubleshoot/outlook-on-the-web-issues/cannot-open-attachments#cause" target="_blank" rel="noopener">

												<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-dot-circle" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"></path></svg>						</span>
										<span class="elementor-icon-list-text">Microsoft 365 users can't open or view attachments in Outlook on the web</span>
											</a>
									</li>
								<li class="elementor-icon-list-item">
											<a href="https://support.microsoft.com/en-us/office/blocked-attachments-in-outlook-434752e1-02d3-4e90-9124-8b81e49a8519?ui=en-us&#038;rs=en-us&#038;ad=usi" target="_blank" rel="noopener">

												<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-dot-circle" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"></path></svg>						</span>
										<span class="elementor-icon-list-text"> Blocked attachments in Outlook</span>
											</a>
									</li>
								<li class="elementor-icon-list-item">
											<a href="https://support.microsoft.com/en-us/topic/outlook-blocked-access-to-the-following-potentially-unsafe-attachments-c5c4a480-041e-2466-667f-e98d389ff822" target="_blank" rel="noopener">

												<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-dot-circle" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"></path></svg>						</span>
										<span class="elementor-icon-list-text">Outlook blocked access to the following potentially unsafe attachments</span>
											</a>
									</li>
						</ul>
						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-dc4c950 e-flex e-con-boxed e-con e-parent" data-id="dc4c950" data-element_type="container">
					<div class="e-con-inner">
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/jak-povolit-specificky-typ-souboru-v-exchange-online-novem-outlooku/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Entra AD Connect &#8211; přesun na nový server</title>
		<link>https://www.sraga.cz/entra-ad-connect-presun-na-novy-server/</link>
					<comments>https://www.sraga.cz/entra-ad-connect-presun-na-novy-server/#respond</comments>
		
		<dc:creator><![CDATA[c]]></dc:creator>
		<pubDate>Wed, 07 Feb 2024 09:45:05 +0000</pubDate>
				<category><![CDATA[Azure AD / Entra ID]]></category>
		<category><![CDATA[AD Sync]]></category>
		<category><![CDATA[Azure AD Connect]]></category>
		<category><![CDATA[Entra Connect]]></category>
		<category><![CDATA[PowerShell]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=130</guid>

					<description><![CDATA[S dříve publikovaným článkem (Entra AD Sync (Azure AD Sync) – In-place upgrade) souvisí jedna věc. Verze operačních systémů, které Entra Connect V2 podporuje. Oproti Azure AD Connect došlo k některým změnám v podpoře a s tím u mnohých klientů souvisí potřeba přesunu Entra Connect na nový server. V tomto videu je zaznamenán postup, jak ... <a title="Entra AD Connect &#8211; přesun na nový server" class="read-more" href="https://www.sraga.cz/entra-ad-connect-presun-na-novy-server/" aria-label="Číst více o Entra AD Connect &#8211; přesun na nový server">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="130" class="elementor elementor-130" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-b905736 e-flex e-con-boxed e-con e-parent" data-id="b905736" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-d626439 elementor-widget elementor-widget-text-editor" data-id="d626439" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>S dříve publikovaným článkem (<a href="/entra-ad-sync-in-place-upgrade-health-agent/" target="_blank" rel="noopener">Entra AD Sync (Azure AD Sync) – In-place upgrade</a>) souvisí jedna věc. Verze operačních systémů, které Entra Connect V2 podporuje. Oproti Azure AD Connect došlo k některým změnám v podpoře a s tím u mnohých klientů souvisí potřeba přesunu Entra Connect na nový server.</p><p>V tomto videu je zaznamenán postup, jak ze starého serveru přesunout Microsoft Entra Connect na server nový.</p><p>Migrace probíhala z Azure AD Connect verze 1.6 na nový Microsoft Entra Connect V2.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2a9241d elementor-widget elementor-widget-video" data-id="2a9241d" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/pybMDiFyVnI&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-43e9a66 elementor-widget elementor-widget-heading" data-id="43e9a66" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Entra Connect V2: Podpora a hlavní změny</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-dcf38fa elementor-alert-info elementor-widget elementor-widget-alert" data-id="dcf38fa" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Toto je upozornění</span>
			
						<span class="elementor-alert-description">Služba Azure AD Connect V1 byla k 31. srpnu 2022 vyřazena a již není podporována. Instalace Azure AD Connect V1 může neočekávaně přestat fungovat. Pokud stále používáte Azure AD Connect V1, musíte provést upgrade nebo zvážit přechod na Microsoft Entra Cloud Sync.</span>
			
						<button type="button" class="elementor-alert-dismiss" aria-label="Zavřít toto upozornění.">
									<span aria-hidden="true">&times;</span>
							</button>
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-3b050cd elementor-widget elementor-widget-text-editor" data-id="3b050cd" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Systémy Windows Server 2012 a Windows Server 2012 R2 již nejsou podporovány.</strong></p><p>SQL Server 2019 vyžaduje jako serverový <strong>operační systém Windows Server 2016 nebo</strong> novější. Vzhledem k tomu, že Microsoft Entra Connect v2 obsahuje komponenty SQL Serveru 2019, nejsou již podporovány starší verze Windows Server.</p><p><strong>SQL Server 2019 LocalDB</strong></p><p>Předchozí verze Microsoft Entra Connect byly dodávány s SQL Server 2012 LocalDB. Verze V2.0 se dodává s SQL Server 2019 LocalDB, která slibuje vyšší stabilitu a výkon a obsahuje několik oprav chyb souvisejících se zabezpečením. SQL Server 2012 ukončila rozšířenou podporu v červenci 2022.</p><p><strong>Visual C++ Redist 14</strong></p><p>SQL Server 2019 vyžaduje prostředí Visual C++ Redist 14. Tento Redistributable je nainstalován spolu s balíčkem Microsoft Entra Connect V2, takže pro aktualizaci prostředí C++ nemusíte podnikat žádné kroky.</p><p><strong>TLS 1.2</strong></p><p><strong>Protokoly TLS1.0 a TLS 1.1 jsou považovány za nebezpečné</strong>. Společnost Microsoft je vyřazuje. Tato verze <strong>Microsoft Entra Connect podporuje pouze protokol TLS 1.2</strong>. Všechny verze systému Windows Server, které jsou podporovány pro Microsoft Entra Connect V2, již standardně používají protokol TLS 1.2. Pokud váš server nepodporuje protokol TLS 1.2, budete jej muset před nasazením aplikace Microsoft Entra Connect V2 povolit.</p><p><strong>PowerShell 5.0</strong></p><p>Tato verze Microsoft Entra Connect obsahuje několik rutin, které vyžadují PowerShell 5.0, takže tento požadavek je novou podmínkou pro Microsoft Entra Connect.</p><p><strong>Požadavky na Active Directory</strong></p><ul><li>Verze schématu služby Active Directory a <strong>funkční úroveň</strong> doménové struktury musí být <strong>Windows Server 2003 nebo novější</strong>.</li><li>Řadiče domény mohou používat libovolnou verzi, pokud jsou splněny požadavky na verzi schématu a úroveň doménové struktury. Pokud potřebujete provozovat Active Dorectory se systémem Windows Server 2016 nebo starším, může být zapotřebí <a href="https://learn.microsoft.com/en-us/lifecycle/policies/fixed#extended-support" target="_blank" rel="noopener">placený program podpory</a>.</li><li><strong>Řadič domény</strong> používaný nástrojem Microsoft Entra ID <strong>musí být zapisovatelný</strong>. Použití řadiče domény pouze pro čtení (RODC) není podporováno.</li><li>Používání lokálních doménových struktur nebo domén pomocí &#8222;tečkovaných&#8220; (název obsahuje tečku &#8222;.&#8220;) názvů NetBIOS není podporováno.</li><li>Doporučuje se povolit koš služby Active Directory.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-8f4b231 elementor-widget elementor-widget-heading" data-id="8f4b231" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Užitečné odkazy
</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-817e2ee elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="817e2ee" data-element_type="widget" data-widget_type="icon-list.default">
				<div class="elementor-widget-container">
							<ul class="elementor-icon-list-items">
							<li class="elementor-icon-list-item">
											<a href="http://Consider%20moving%20to%20Microsoft%20Entra%20Cloud%20Sync" target="_blank">

												<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-dot-circle" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"></path></svg>						</span>
										<span class="elementor-icon-list-text">Consider moving to Microsoft Entra Cloud Sync</span>
											</a>
									</li>
								<li class="elementor-icon-list-item">
											<a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-install-prerequisites" target="_blank" rel="noopener">

												<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-dot-circle" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"></path></svg>						</span>
										<span class="elementor-icon-list-text">Prerequisites for Microsoft Entra Connect</span>
											</a>
									</li>
						</ul>
						</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/entra-ad-connect-presun-na-novy-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Užitečné příkazy pro Azure AD Connect / Entra connect</title>
		<link>https://www.sraga.cz/uzitecne-prikazy-pro-azure-ad-connect-entra-connect/</link>
					<comments>https://www.sraga.cz/uzitecne-prikazy-pro-azure-ad-connect-entra-connect/#respond</comments>
		
		<dc:creator><![CDATA[c]]></dc:creator>
		<pubDate>Wed, 07 Feb 2024 09:14:49 +0000</pubDate>
				<category><![CDATA[Nezařazené]]></category>
		<category><![CDATA[AD Sync]]></category>
		<category><![CDATA[Azure AD Connect]]></category>
		<category><![CDATA[Entra Connect]]></category>
		<category><![CDATA[PowerShell]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=102</guid>

					<description><![CDATA[Zjištění aktuální verze AD Connect / Entra Connect Ruční spuštění rozdílové synchronizace Vynucení kompletní synchronizace (full sync) Plnou synchronizaci služby provádějte jen zřídka. Úplná synchronizace služby Entra ID (Azure AD) trvá dlouho, protože prochází všechny objekty služby Active Directory a znovu je synchronizuje. Snad jediným případem použití, kdy je třeba provést úplnou synchronizaci, je změna ... <a title="Užitečné příkazy pro Azure AD Connect / Entra connect" class="read-more" href="https://www.sraga.cz/uzitecne-prikazy-pro-azure-ad-connect-entra-connect/" aria-label="Číst více o Užitečné příkazy pro Azure AD Connect / Entra connect">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="102" class="elementor elementor-102" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-9d4bf01 e-flex e-con-boxed e-con e-parent" data-id="9d4bf01" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-5a4f631 elementor-widget elementor-widget-heading" data-id="5a4f631" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zjištění aktuální verze AD Connect / Entra Connect</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-86eaff8 elementor-widget elementor-widget-code-highlight" data-id="86eaff8" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>(Get-ADSyncGlobalSettingsParameter | Where-Object { $_.Name -eq 'Microsoft.Synchronize.ServerConfigurationVersion'}).Value</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-a641ceb elementor-widget elementor-widget-heading" data-id="a641ceb" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Ruční spuštění rozdílové synchronizace</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-44f3c38 elementor-widget elementor-widget-code-highlight" data-id="44f3c38" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>Start-ADSyncSyncCycle -PolicyType Delta
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-444c87a elementor-widget elementor-widget-heading" data-id="444c87a" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Vynucení kompletní synchronizace (full sync)</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-33981c0 elementor-widget elementor-widget-text-editor" data-id="33981c0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Plnou synchronizaci služby provádějte jen zřídka. Úplná synchronizace služby Entra ID (Azure AD) <strong>trvá dlouho</strong>, protože prochází všechny objekty služby Active Directory a znovu je synchronizuje. Snad jediným případem použití, kdy je třeba provést úplnou synchronizaci, je změna konfigurace služby Entra Connect (Azure AD Connect).</p><p>Nicméně v případě, že opravdu chcete spustit úplnou synchronizaci, použijte tento příkaz:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6ac3622 elementor-widget elementor-widget-code-highlight" data-id="6ac3622" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>Start-ADSyncSyncCycle -PolicyType Initial
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-7a64d3f elementor-widget elementor-widget-heading" data-id="7a64d3f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zobrazení stavu a nastavení plánovače</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-1ddc14a elementor-widget elementor-widget-code-highlight" data-id="1ddc14a" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>Get-ADSyncScheduler</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-3cf71d5 elementor-widget elementor-widget-heading" data-id="3cf71d5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Kontrola integrace Entra Connect Health Agent</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-eb28a05 elementor-widget elementor-widget-code-highlight" data-id="eb28a05" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>Test-AzureADConnectHealthConnectivity -Role Sync

Test-AzureADConnectHealthConnectivity -Role ADDS

Test-AzureADConnectHealthConnectivity -Role Sync -ShowResult</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-380c111 elementor-widget elementor-widget-heading" data-id="380c111" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Ruční registrace Microsoft Entra Connect Health agent</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-0fb94c0 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="0fb94c0" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
							<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Pozor</span>
			
						<span class="elementor-alert-description">Tento příkaz použít pouze, pokud registrace agenta (při instalaci Microsoft Entra Connect) skončí chybou.</span>
			
						<button type="button" class="elementor-alert-dismiss" aria-label="Zavřít toto upozornění.">
									<span aria-hidden="true">&times;</span>
							</button>
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-82356f4 elementor-widget elementor-widget-code-highlight" data-id="82356f4" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp>Register-AzureADConnectHealthSyncAgent -AttributeFiltering $true -StagingMode $false
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-b61a39e elementor-widget elementor-widget-text-editor" data-id="b61a39e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jedná se o ruční registraci agenta Microsoft Entra Connect Health pro synchronizaci. Po úspěšné registraci agenta se spustí služby Microsoft Entra Connect Health.</p><p><strong>AttributeFiltering: $true</strong> (výchozí), pokud Microsoft Entra Connect <strong>nesynchronizuje výchozí sadu atributů</strong> a byl přizpůsoben tak, aby používal filtrovanou sadu atributů. V opačném případě použijte $false.</p><p><strong>StagingMode: $false</strong> (výchozí), pokud server Microsoft Entra Connect <strong>není</strong> v režimu staging. Pokud je server nakonfigurován tak, aby byl v režimu staging, použijte $true.</p><p>Dokumentace: <a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-health-agent-install#manually-register-microsoft-entra-connect-health-for-sync" target="_blank" rel="noopener">https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-health-agent-install#manually-register-microsoft-entra-connect-health-for-sync</a></p>								</div>
				</div>
				<div class="elementor-element elementor-element-ea0f22a elementor-widget elementor-widget-video" data-id="ea0f22a" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/MrmG8gkpo18?si=Z0H9sb3VwV5Xm3Ym&quot;,&quot;start&quot;:153,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}" data-widget_type="video.default">
				<div class="elementor-widget-container">
							<div class="elementor-wrapper elementor-open-inline">
			<div class="elementor-video"></div>		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-e0c9759 elementor-widget elementor-widget-heading" data-id="e0c9759" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Zapnutí / vypnutí Staging mode</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-193c58f elementor-widget elementor-widget-code-highlight" data-id="193c58f" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp># Načtení parametrů nastavení
$AADSyncGlobalSettings=Get-ADSyncGlobalSettings

# zobrazit parametry
$AADSyncGlobalSettings.parameters

# vypnout Staging mode
($AADSyncGlobalSettings.parameters | ?{$_.name -eq "Microsoft.Synchronize.StagingMode"}).value="False"

# zapnout Staging mode
($AADSyncGlobalSettings.parameters | ?{$_.name -eq "Microsoft.Synchronize.StagingMode"}).value="True"

# Uložit nastavení !!!
Set-ADSyncGlobalSettings $AADSyncGlobalSettings
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-7529e12 elementor-widget elementor-widget-heading" data-id="7529e12" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Změna plánu synchronizace</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-126aae9 elementor-widget elementor-widget-text-editor" data-id="126aae9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Výchozí nastavení synchronizace je 30 minut</strong>. Změny času synchronizace služby Entra Connect se provádějí pomocí příkazu <strong>Set-ADSyncScheduler</strong>.</p><p>Je však důležité si uvědomit, že pro plán synchronizace <strong>existují horní a dolní limity</strong>. Například plán synchronizace musí být spuštěn alespoň jednou za 7 dní. Kromě toho se synchronizační cyklus spouští pouze jednou za 30 minut. Nyní, s ohledem na tato omezení, použijme rutinu<strong> Set-ADSyncScheduler</strong> ke změně plánu na cyklus např. jednou za 2 hodiny:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-4e4da13 elementor-widget elementor-widget-code-highlight" data-id="4e4da13" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp># Spusteni kazde 3 hodiny
Set-ADSyncScheduler -CustomizedSyncCycleInterval 03:00:00

# Spusteni 1x denne
Set-ADSyncScheduler -CustomizedSyncCycleInterval 1.0:0:0

#Syntaxe: Set-ADSyncScheduler -CustomizedSyncCycleInterval d.HH:mm:ss
#d - dny, HH - hodiny, mm - minuty, ss - sekundy
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-7c7dd44 elementor-widget elementor-widget-heading" data-id="7c7dd44" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Vypnutí a zapnutí synchronizace</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-7e94f1c elementor-widget elementor-widget-code-highlight" data-id="7e94f1c" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp># Vypnuti synchronizace
Set-ADSyncScheduler -SyncCycleEnabled $false

# Zapnuti synchronizace
Set-ADSyncScheduler -SyncCycleEnabled $true</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-401e29f elementor-widget elementor-widget-heading" data-id="401e29f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Deletion trehsold exceeded</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-8657af3 elementor-widget elementor-widget-text-editor" data-id="8657af3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud při synchronizaci narazíte na problém, že se nemažou z Entra ID staré objekty, které se již nemjí synchronizovat, podívejte se do Synchronization Service Manager, zda-li náhodou neuvidíte ve sloupci Status informaci &#8222;<strong>stopped-deletion-treshold-exceeded</strong>&#8222;. Tato chyba značí, že se synchronizační proces szaží z Entra ID odebrat větší množství objektů, než je jeho limit. Toto lze vyřešit pomocí těchto příkazů:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7cbecea elementor-widget elementor-widget-image" data-id="7cbecea" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/02/entra-stopped-deletion-treshold-exceeded.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="entra-stopped-deletion-treshold-exceeded" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Njk4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wMlwvZW50cmEtc3RvcHBlZC1kZWxldGlvbi10cmVzaG9sZC1leGNlZWRlZC5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="345" src="https://www.sraga.cz/wp-content/uploads/2024/02/entra-stopped-deletion-treshold-exceeded-768x345.png" class="attachment-medium_large size-medium_large wp-image-698" alt="stopped-deletion-threshold-exceeded" srcset="https://www.sraga.cz/wp-content/uploads/2024/02/entra-stopped-deletion-treshold-exceeded-768x345.png 768w, https://www.sraga.cz/wp-content/uploads/2024/02/entra-stopped-deletion-treshold-exceeded-300x135.png 300w, https://www.sraga.cz/wp-content/uploads/2024/02/entra-stopped-deletion-treshold-exceeded.png 833w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ee3572b elementor-widget elementor-widget-code-highlight" data-id="ee3572b" data-element_type="widget" data-widget_type="code-highlight.default">
				<div class="elementor-widget-container">
							<div class="prismjs-default copy-to-clipboard ">
			<pre data-line="" class="highlight-height language-javascript line-numbers">
				<code readonly="true" class="language-javascript">
					<xmp># Zjisteni aktualniho limitu
Get-ADSyncExportDeletionThreshold


# Vypnuti limitu
Disable-ADSyncExportDeletionThreshold

# Opetovne zapnuti limitu
Enable-ADSyncExportDeletionThreshold -ThresholdCount 500
</xmp>
				</code>
			</pre>
		</div>
						</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/uzitecne-prikazy-pro-azure-ad-connect-entra-connect/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
