<?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/category/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>Tue, 30 Dec 2025 18:57:49 +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>Exchange Online In-Place Archiv nearchivuje</title>
		<link>https://www.sraga.cz/exchange-online-in-place-archiv-nearchivuje/</link>
					<comments>https://www.sraga.cz/exchange-online-in-place-archiv-nearchivuje/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Fri, 14 Nov 2025 15:18:16 +0000</pubDate>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Archiv]]></category>
		<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[In-Place Archive]]></category>
		<category><![CDATA[Managed Folder Assistant]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=1145</guid>

					<description><![CDATA[V posledních dnech jsem narazil na několik na sobě nezávislých problémů, které se týkaly archivace e-mailů v Exchange Online. Když budu konkrétnější, tak jsem řešil, proč Archiv úplně nearchivuje. V tomto článku se tedy zaměřím na věci kolem In-Place Archive. Obsah &#160; Na hraně kapacit &#8211; kdy potřebujete archiv? Nejprve si pojďme říci něco o ... <a title="Exchange Online In-Place Archiv nearchivuje" class="read-more" href="https://www.sraga.cz/exchange-online-in-place-archiv-nearchivuje/" aria-label="Číst více o Exchange Online In-Place Archiv nearchivuje">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="1145" class="elementor elementor-1145" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-9c1fef7 e-flex e-con-boxed e-con e-parent" data-id="9c1fef7" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-6948295 elementor-widget elementor-widget-text-editor" data-id="6948295" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V posledních dnech jsem narazil na několik na sobě nezávislých problémů, které se týkaly archivace e-mailů v Exchange Online. Když budu konkrétnější, tak jsem řešil, proč Archiv úplně nearchivuje. V tomto článku se tedy zaměřím na věci kolem In-Place Archive.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-32c9c0f elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="32c9c0f" 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__32c9c0f" 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__32c9c0f" 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__32c9c0f" 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-3a9a454 elementor-widget elementor-widget-heading" data-id="3a9a454" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Na hraně kapacit - kdy potřebujete archiv?</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-4a2ad10 elementor-widget elementor-widget-text-editor" data-id="4a2ad10" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Nejprve si pojďme říci něco o kapacitách v rámci předplatného, které Exchange Online.</p><p><strong>Exchange Online</strong> nabízí dvě hlavní varianty licencí – Plan 1 a Plan 2. Obě poskytují profesionální e-mailové služby, ale liší se zejména ve velikosti schránky, možnostmi archivace a pokročilých funkcích.</p><p><strong>Základní velikost primární schránky</strong></p><ul><li><strong>Exchange Online Plan 1</strong><ul><li>Velikost primární schránky: <strong>50 GB</strong></li><li>Po dosažení limitu nelze přijímat nové zprávy, dokud se neuvolní místo nebo neaktivuje archiv.</li></ul></li><li><strong>Exchange Online Plan 2</strong><ul><li>Velikost primární schránky: <strong>100 GB</strong></li><li>Vhodné pro uživatele s vysokým objemem e-mailů nebo dlouhodobou archivací.</li></ul></li></ul><p><strong>Archivace e-mailů = In-Place Archive</strong></p><p>Archivace je klíčová pro dlouhodobé uchování e-mailů bez nutnosti jejich mazání, když je vyčerpána kapacita primární schránky.</p><ul><li><strong>Plan 1</strong><ul><li>Archiv <strong>je dostupný</strong>, ale musí se <strong>ručně aktivovat</strong> (není zapnutý defaultně).</li><li>Velikost archivu: 50 GB (bez auto-expanding).</li></ul></li><li><strong>Plan 2</strong><ul><li>Archiv je <strong>součástí licence</strong>.</li><li>Velikost archivu: <strong>neomezená</strong> díky funkci <strong>Auto-Expanding Archive</strong> (po dosažení 100 GB se automaticky přidává další prostor).</li><li>Podmínky: Auto-expanding je dostupný pouze pro cloudové archivy, ne pro on-prem.</li></ul></li></ul><p><strong>Přehledová tabulka:</strong></p><table style="border-collapse: collapse; width: 566px; height: 360px;" border="0" cellspacing="0" cellpadding="0"><tbody><tr style="height: 15.0pt;"><td style="height: 15.0pt; width: 48pt;" width="64" height="20"><strong>Funkce</strong></td><td style="width: 48pt;" width="64"><strong>Plan 1</strong></td><td style="width: 48pt;" width="64"><strong>Plan 2</strong></td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">Primární schránka</td><td>50 GB</td><td>100 GB</td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">Archivace</td><td>Volitelný doplněk</td><td>Součást licence</td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">Velikost archivu</td><td>50 GB</td><td>Neomezená (Auto-Expanding)</td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">MRM politiky</td><td>Ano</td><td>Ano</td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">Litigation Hold</td><td>Ne</td><td>Ano</td></tr><tr style="height: 15.0pt;"><td style="height: 15.0pt;" height="20">In-Place Hold</td><td>Ne</td><td>Ano</td></tr></tbody></table>								</div>
				</div>
				<div class="elementor-element elementor-element-9e8d2e5 elementor-widget elementor-widget-heading" data-id="9e8d2e5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Jak aktivovat archiv</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-807da20 elementor-widget elementor-widget-text-editor" data-id="807da20" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Exchange Online Archiv lze aktivovat dvěma způsoby (mimo jiné).</p>								</div>
				</div>
				<div class="elementor-element elementor-element-b43c7e8 elementor-widget elementor-widget-heading" data-id="b43c7e8" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h5 class="elementor-heading-title elementor-size-default">Aktivace pomocí Exchange Admin Centra (EAC)</h5>				</div>
				</div>
				<div class="elementor-element elementor-element-abbc823 elementor-widget elementor-widget-text-editor" data-id="abbc823" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<ol><li>Přihlaste se do EAC (<a href="https://admin.exchange.microsoft.com" target="_blank" rel="noopener">https://admin.exchange.microsoft.com</a>)</li><li>Recipient → Mailboxes</li><li>Vyberte schránku, pro kterou chcete aktivovat archiv</li><li>V pravé části se zobrazí detail schránky &#8211; klikněte na záložku &#8222;Others/Ostatní&#8220;</li><li>Archiv aktivujte pomocí &#8222;Manage mailbox archive&#8220;</li></ol>								</div>
				</div>
				<div class="elementor-element elementor-element-b6b1740 elementor-widget elementor-widget-image" data-id="b6b1740" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="Exchange admin center — Others - Mailbox Archive" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTE2MiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMTFcL0V4Y2hhbmdlLWFkbWluLWNlbnRlci1cdTIwMTQtT3RoZXJzLU1haWxib3gtQXJjaGl2ZS5wbmcifQ%3D%3D">
							<img fetchpriority="high" decoding="async" width="768" height="465" src="https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive-768x465.png" class="attachment-medium_large size-medium_large wp-image-1162" alt="Exchange admin center — Others - Mailbox Archive" srcset="https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive-768x465.png 768w, https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive-300x181.png 300w, https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive-1024x619.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/11/Exchange-admin-center-—-Others-Mailbox-Archive.png 1210w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-1bb12cb elementor-widget elementor-widget-heading" data-id="1bb12cb" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h5 class="elementor-heading-title elementor-size-default">Aktivace pomocí Exchange Online Powershell</h5>				</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-736878a e-flex e-con-boxed e-con e-parent" data-id="736878a" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-02d1304 elementor-widget elementor-widget-code-block-for-elementor" data-id="02d1304" 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'># Připojen&iacute; k Exchange Online Powershell
Connect-ExchangeOnline

# Aktivace Archivu
Enable-Mailbox jan.novak@365lab.cz -Identity -Archive

# Deaktivace Archivu
Disable-Mailbox jan.novak@365lab.cz -Identity -Archive</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-9b4af58 elementor-widget elementor-widget-heading" data-id="9b4af58" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Jak archivace funguje</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-6b0898c elementor-widget elementor-widget-text-editor" data-id="6b0898c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Exchange Server a <strong>Exchange Online</strong> obsahují několik asistentů (úlohy na pozadí), které provádějí automatizované zpracování dat poštovní schránky. Nás bude zajímat Managed Folder Assistant (MFA).</p>								</div>
				</div>
				<div class="elementor-element elementor-element-26d7e3e elementor-alert-info elementor-widget elementor-widget-alert" data-id="26d7e3e" 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">V tomto článku a v souvislosti s archivací se používá zkratka MFA. Nejedná se v tomto přípdadě o více-faktorové ověření, ale o Managed Folder Assistant.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-51659ef elementor-widget elementor-widget-text-editor" data-id="51659ef" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Managed Folder Assistant</strong> (<span style="text-decoration: underline;">MFA</span>) je systémový proces v Exchange Serveru a Exchange Online, který <strong>automaticky aplikuje retenční politiky</strong> na položky v poštovních schránkách. Je klíčový pro správu <strong>životního cyklu e-mailů</strong>, včetně jejich <strong>přesunu do archivní schránky</strong>.</p><h5><strong>Co MFA dělá</strong></h5><ul><li>Vyhodnocuje retenční politiky (Exchange MRM i Microsoft 365) a aplikuje je na položky.</li><li>Označuje zprávy metadaty, která určují datum vypršení retenční lhůty.</li><li>Provádí akce definované v retenčních značkách:<ul><li><strong>Smazání</strong> (trvale nebo s možností obnovy)</li><li><strong>Přesun</strong> do archivu (<strong>In-Place Archive</strong>).</li></ul></li></ul><h5><strong>Práce s archivací</strong></h5><ul><li>Pokud je v politice definována značka (retention tag) „<strong>Move to Archive</strong>“, MFA po dosažení stáří položky, přesune zprávu z primární schránky do archivu.</li><li>Archivace pomáhá udržet primární schránku přehlednou a zároveň uchovat starší e-maily pro vyhledávání.</li><li>MFA zajišťuje, že položky označené pro archivaci se <strong>přesunou automaticky, bez zásahu uživatele</strong>.</li></ul><p> </p><p> </p>								</div>
				</div>
				<div class="elementor-element elementor-element-83803c1 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="83803c1" 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">Jak MFA pracuje:</span>
			
						<span class="elementor-alert-description">MFA Běží na základě work cycle modelu – v Exchange Online obvykle zpracuje každou schránku alespoň jednou týdně.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-5f4d1e6 elementor-widget elementor-widget-text-editor" data-id="5f4d1e6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<h5><strong>Podmínky pro zpracování</strong></h5><ul><li><strong>Schránka musí mít přiřazenou retenční politiku</strong>.</li><li>Musí obsahovat <strong>alespoň 10 MB dat</strong> (indikace aktivního používání).</li><li>MFA kombinuje značky z Exchange MRM politik a Microsoft 365 retenčních politik (v cloudu).</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-a656844 elementor-widget elementor-widget-heading" data-id="a656844" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Řešení problémů s archivací</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-d1c25e3 elementor-widget elementor-widget-text-editor" data-id="d1c25e3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Aby byla automatická archivace funkční, musí mít schránka přidělenou tzv. retenční politiku. Tato politika  musí obsahovat akci (tag) &#8222;MoveToArchive&#8220;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-1b46dbe elementor-widget elementor-widget-image" data-id="1b46dbe" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="MRM Retention tags _ Microsoft Purview" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTE4NSwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMTFcL01STS1SZXRlbnRpb24tdGFncy1fLU1pY3Jvc29mdC1QdXJ2aWV3LnBuZyJ9">
							<img decoding="async" width="768" height="379" src="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview-768x379.png" class="attachment-medium_large size-medium_large wp-image-1185" alt="MRM Retention tags Microsoft Purview" srcset="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview-768x379.png 768w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview-300x148.png 300w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview-1024x505.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-tags-_-Microsoft-Purview.png 1424w" sizes="(max-width: 768px) 100vw, 768px">								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-83a6cd2 elementor-widget elementor-widget-image" data-id="83a6cd2" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="MRM Retention policies _ Microsoft Purview" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTE4NCwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMTFcL01STS1SZXRlbnRpb24tcG9saWNpZXMtXy1NaWNyb3NvZnQtUHVydmlldy5wbmcifQ%3D%3D">
							<img decoding="async" width="768" height="418" src="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview-768x418.png" class="attachment-medium_large size-medium_large wp-image-1184" alt="MRM Retention policies Microsoft Purview" srcset="https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview-768x418.png 768w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview-300x163.png 300w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview-1024x557.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/11/MRM-Retention-policies-_-Microsoft-Purview.png 1152w" sizes="(max-width: 768px) 100vw, 768px">								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-713d48b elementor-widget elementor-widget-text-editor" data-id="713d48b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V případě, že zprávy nejsou přesovány do archivu tak jako první je potřeba zkontrolovat, zda-li má schránka přidělenou retenční politiku. Výchozí retenční politika je &#8222;<strong>Default MRM Policy</strong>&#8220; a výchozí hodnota je 730 dní. To znamená, že zprávy, které jsou starší než 2 roky by měly být automaticky přesouvány do Online Archivu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-5b1ec2b elementor-widget elementor-widget-code-block-for-elementor" data-id="5b1ec2b" 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'># Zji&scaron;těn&iacute; přidělen&eacute; retenřn&iacute; politiky pro danou schr&aacute;nu
Get-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; | FL RetentionPolicy

# V&yacute;stup:
RetentionPolicy : Default MRM Policy</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-e9fcc34 elementor-widget elementor-widget-text-editor" data-id="e9fcc34" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V rámci přidělené retenční politiky je potřeba se podívat zda obsahuje tag &#8222;MoveToArchive&#8220;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-5dee402 elementor-widget elementor-widget-code-block-for-elementor" data-id="5dee402" 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'># Seznam v&scaron;ech retenčn&iacute;ch politik
Get-RetentionPolicy

# Je potřeba zkontrolovat RetentionPolicyTagLinks
Get-RetentionPolicy -Identity &quot;Default MRM Policy&quot; | FL *

# Zobraz&iacute; seznam v&scaron;ech tagů v r&aacute;mci retention policy
$policy = Get-RetentionPolicy -Identity &quot;Default MRM Policy&quot;
$policy.RetentionPolicyTagLinks

# viz v&yacute;&scaron;e, ale jin&yacute; pohled na data
$tags = (Get-RetentionPolicy -Identity &quot;Default MRM Policy&quot;).RetentionTags
$tags | ForEach-Object { Get-RetentionPolicyTag -Identity $_ | FL Name,Type,RetentionAction,AgeLimitForRetention,RetentionEnabled }</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-9fe5d4b elementor-widget elementor-widget-image" data-id="9fe5d4b" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="exchange-archive-retention-policy-powershell-1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTE4OSwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMTFcL2V4Y2hhbmdlLWFyY2hpdmUtcmV0ZW50aW9uLXBvbGljeS1wb3dlcnNoZWxsLTEucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="592" src="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-1-768x592.png" class="attachment-medium_large size-medium_large wp-image-1189" alt="exchange archive retention policy powershell 1" srcset="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-1-768x592.png 768w, https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-1-300x231.png 300w, https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-1.png 1016w" sizes="(max-width: 768px) 100vw, 768px">								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-4a086b4 elementor-widget elementor-widget-text-editor" data-id="4a086b4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Obráceně lze ještě ověřit, ve kterých retenčních politikách je retention tag &#8222;MoveToArchive&#8220;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-ac8a1c1 elementor-widget elementor-widget-code-block-for-elementor" data-id="ac8a1c1" 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-RetentionPolicyTag | Where-Object {$_.Type -eq &quot;All&quot; -and $_.RetentionAction -eq &quot;MoveToArchive&quot;} | FL Name,AgeLimitForRetention,RetentionEnabled

# V&yacute;stup
Name                 : Default 2 year move to archive
AgeLimitForRetention : 730.00:00:00
RetentionEnabled     : True</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-67070da elementor-widget elementor-widget-text-editor" data-id="67070da" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud jsou retenční politiky nastaveny správně, je potřeba zkontrolovat, zda-li se In-Place Archiv správně vytvořil.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-5878c10 elementor-widget elementor-widget-code-block-for-elementor" data-id="5878c10" 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'># Informace o Archive mailboxu
Get-MailboxStatistics -Identity &quot;jan.novak@365lab.cz&quot; -Archive
Get-MailboxStatistics -Identity &quot;jan.novak@365lab.cz&quot; -Archive | FL DisplayName,TotalItemSize,ItemCount,LastLogonTime,Database,ServerName</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-e092837 elementor-widget elementor-widget-image" data-id="e092837" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="exchange-archive-retention-policy-powershell-2" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTE5NiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMTFcL2V4Y2hhbmdlLWFyY2hpdmUtcmV0ZW50aW9uLXBvbGljeS1wb3dlcnNoZWxsLTIucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="93" src="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2-768x93.png" class="attachment-medium_large size-medium_large wp-image-1196" alt="exchange-archive-retention-policy-powershell-2" srcset="https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2-768x93.png 768w, https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2-300x36.png 300w, https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2-1024x123.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/11/exchange-archive-retention-policy-powershell-2.png 1443w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-513727d elementor-widget elementor-widget-text-editor" data-id="513727d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud je vše správně:</p><ul><li>DisplayName &#8211; odpovídá tomu, co je vidě v EAC a obsahuje In-Place (nebo vlastní název, která jste zvolili)</li><li>TotalItemSize &#8211; velikost schránky archivu</li><li>ItemCount &#8211; počet objektů v archivu je větší jak 0</li><li>Database a ServerName musí obsahovat data navázaná na Exchange Online</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-fb1dd6f elementor-widget elementor-widget-code-block-for-elementor" data-id="fb1dd6f" 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'># Vrac&iacute; z&aacute;kladni informace o archivu
Get-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; | FL ArchiveDatabase,ArchiveStatus,ArchiveState

# V&yacute;stup
ArchiveDatabase : EURP189DG124-db376
ArchiveStatus   : Active
ArchiveState    : Local</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d989150 elementor-widget elementor-widget-text-editor" data-id="d989150" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud je vše správně:</p><ul><li>ArchiveDatabase &#8211; musí odpovídat údajům Exchange Online, typicky <strong>EUR</strong>*****</li><li>ArchiveStatus<ul><li><strong>Active</strong> &#8211; archiv je aktivní</li><li>None &#8211; archiv není aktivní</li></ul></li><li>ArchiveState<ul><li><strong>Local</strong> &#8211; lokální v Exchange Online</li><li>HostedPending &#8211; Hybrid deployment &#8211; stav před tím, než proběhne directory synchronisation</li><li>HostedProvisioned &#8211; Hybrid deployment &#8211; stav po té, co proběhla synchronizace</li><li>None &#8211; archiv není aktivní</li></ul></li></ul><p>Pokud i zde je všechno v pořádku, může být problém ještě v tom, že na schránce je aktivní hold (RetentionHold, LitigationHold).</p>								</div>
				</div>
				<div class="elementor-element elementor-element-50ab696 elementor-widget elementor-widget-code-block-for-elementor" data-id="50ab696" 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'># Kontrola, zda je na schr&aacute;nce aktivn&iacute; Hold
Get-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; | FL RetentionHoldEnabled,LitigationHoldEnabled

RetentionHoldEnabled  : True
LitigationHoldEnabled : False</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5250b85 elementor-widget elementor-widget-text-editor" data-id="5250b85" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ve výše uvedeném příkladu je vidět, že <strong>RetentionHoldEnabled</strong> je nastaveno na hodnotu <strong>True</strong>. To je špatně, protože, aby mohl správně fungovat Managed Folder Assistant, nesmí být na schránce aktivní hold.</p><p>Toto je záměr Microsoftu: Blokování uchovávání dat (<strong>Hold</strong>) <strong>pozastaví všechny akce MRM</strong> (včetně akce MoveToArchive), aby položky nebyly během zvláštních okolností (např. dovolená, právní důvody) odstraněny ani přesunuty.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-57b1b1e elementor-widget elementor-widget-code-block-for-elementor" data-id="57b1b1e" 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'># Vypnut&iacute;  Retention Hold
Set-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; -RetentionHoldEnabled:$false

# Vypnut&iacute;  Litigation Hold
Set-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; -LitigationHoldEnabled:$false</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-1d7e978 elementor-widget elementor-widget-code-block-for-elementor" data-id="1d7e978" 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'># Kontrola, zda je na schr&aacute;nce aktivn&iacute; Hold
Get-Mailbox -Identity &quot;jan.novak@365lab.cz&quot; | FL RetentionHoldEnabled,LitigationHoldEnabled

# V&yacute;stup - zde je v&scaron;e v poř&aacute;dku
RetentionHoldEnabled  : False
LitigationHoldEnabled : False</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-83aed41 elementor-widget elementor-widget-heading" data-id="83aed41" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Urychlení zpracování MRM</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-cc76a89 elementor-widget elementor-widget-text-editor" data-id="cc76a89" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po té, co je tedy vypnutý hold, je možné vynutit zpracování MFA pomocí powerhsell příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-cea75d9 elementor-widget elementor-widget-code-block-for-elementor" data-id="cea75d9" 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'># Urychlen&iacute; procesu MFA (managed Folder Assistant)
Start-ManagedFolderAssistant -Identity &quot;jan.novak@365lab.cz&quot;

# Kontrola, zda data do archivu přib&yacute;vaj&iacute;
Get-MailboxStatistics -Identity &quot;jan.novak@365lab.cz&quot; -Archive | FL DisplayName,TotalItemSize,ItemCount,LastLogonTime,Database,ServerName</code></pre>				</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/exchange-online-in-place-archiv-nearchivuje/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Microsoft Outlook &#8211; změna výchozího fontu</title>
		<link>https://www.sraga.cz/microsoft-outlook-zmena-vychoziho-fontu/</link>
					<comments>https://www.sraga.cz/microsoft-outlook-zmena-vychoziho-fontu/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sun, 23 Feb 2025 20:18:01 +0000</pubDate>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Intune]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[Outlook Desktop]]></category>
		<category><![CDATA[outlook new]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=1001</guid>

					<description><![CDATA[Jak změnit výchozí font v Outlooku? A jak jej změnit pomocí Microsoft Intune? Jeden by řekl, že na tom nebude nic složitého, bohužel, jak už to u Microsoft bývá, standardní řešení bývají jednoduchá, nestandardní bývají složitá. Je potřeba si uvědomit, že záleží na tom, o jakém Outlooku se bavíme, zda o Novém Outlooku nebo Outlooku ... <a title="Microsoft Outlook &#8211; změna výchozího fontu" class="read-more" href="https://www.sraga.cz/microsoft-outlook-zmena-vychoziho-fontu/" aria-label="Číst více o Microsoft Outlook &#8211; změna výchozího fontu">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="1001" class="elementor elementor-1001" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-da433ba e-flex e-con-boxed e-con e-parent" data-id="da433ba" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-92fc83d elementor-widget elementor-widget-text-editor" data-id="92fc83d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jak změnit výchozí font v Outlooku? A jak jej změnit pomocí Microsoft Intune? Jeden by řekl, že na tom nebude nic složitého, bohužel, jak už to u Microsoft bývá, standardní řešení bývají jednoduchá, nestandardní bývají složitá. Je potřeba si uvědomit, že záleží na tom, o jakém Outlooku se bavíme, zda o <a href="https://www.sraga.cz/deaktivace-prechodu-outlook-new/" target="_blank" rel="noopener">Novém Outlooku</a> nebo Outlooku na webu, či Outlooku Classic, tedy staré dobré desktopové verzi. Pro každou platformu totiž platí jiný postup.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-72df9b0 elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="72df9b0" 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__72df9b0" 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__72df9b0" 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__72df9b0" 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-207f883 elementor-widget elementor-widget-heading" data-id="207f883" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Outlook New a Outlook pro web</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-bdfdc46 elementor-widget elementor-widget-text-editor" data-id="bdfdc46" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Začněmě tím jednodušším &#8211; Outlook pro web a Outlook New se nastavují jednodně. To je ta dobrá zpráva. Horší je, že přes Group Policy ani přes Intune toto nastavit nelze. Proč? Protože se jedná o nastavení na úrovni Microsoft Exchange Online, nikoliv nastavení koncového zařízení. A aby toho nebylo málo, jedná se o nastavení &#8222;per user&#8220;. Co k tomu tedy bude potřeba? E<a href="https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps" target="_blank" rel="noopener">xchange Online Powershell</a>. Skript pro Microsoft Graph API po ruce nemám.</p><p><strong>1. Připojte se do Exchange Online pomoc PowerShellu</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-e722d4f elementor-widget elementor-widget-code-block-for-elementor" data-id="e722d4f" 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-ExchangeOnline -UserPrincipalName admin@vasedomena.com</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-ebbf146 elementor-widget elementor-widget-text-editor" data-id="ebbf146" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>2.</strong> Po úspěšném připojení si můžete <strong>vypsat seznam mailboxů</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-9196439 elementor-widget elementor-widget-code-block-for-elementor" data-id="9196439" 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-Mailbox

# V pripade, ze mate prostredi s velkym mnozstvim schranek a nechcete vystup limitovat
Get-Mailbox -ResultSize unlimited</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b133ec0 elementor-widget elementor-widget-text-editor" data-id="b133ec0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>3. Pro zobrazení aktuálního nastavení</strong> konkrétního uživatele, použijte následující příkaz</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6100312 elementor-widget elementor-widget-code-block-for-elementor" data-id="6100312" 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-MailboxMessageConfiguration -Identity anna</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-4042ea8 elementor-widget elementor-widget-text-editor" data-id="4042ea8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ve výstupu se zaměřte na následující parametry:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2cfd298 elementor-widget elementor-widget-code-block-for-elementor" data-id="2cfd298" 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'>DefaultFontName                        : Calibri
DefaultFontSize                        : 3
DefaultFontColor                       : #000000
DefaultFontFlags                       : Normal</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d38e6ab elementor-widget elementor-widget-text-editor" data-id="d38e6ab" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>4. Změna nastavení fontu a velikosti</strong></p><p>Pokud potřebujete u schránky změnit font, řekněme na Arial a velikost na 11, použijte následující příkaz:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-43c81c9 elementor-widget elementor-widget-code-block-for-elementor" data-id="43c81c9" 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'>Set-MailboxMessageConfiguration -Identity anna -DefaultFontName &quot;Arial&quot; -DefaultFontSize &quot;11&quot;</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-d3a597c elementor-widget elementor-widget-text-editor" data-id="d3a597c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>5. změna u všech schránek</strong></p><p>Změnu výchozího fontu lze samozřejmě změnit pro všechny schránky &#8211; pomocí jednoho příkazu:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-8037b29 elementor-widget elementor-widget-code-block-for-elementor" data-id="8037b29" 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-Mailbox -ResultSize unlimited | Set-MailboxMessageConfiguration -DefaultFontName &quot;Arial&quot; -DefaultFontSize &quot;11&quot;</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-7dd6814 elementor-widget elementor-widget-text-editor" data-id="7dd6814" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výše uvedený příkaz má i nevýhody. Není aplikován pro nově vytvořené schránky. Aby bylo možné automaticky nastavit výchozí font a jeho velikost i pro nové schránky, doporuřuji použít naplánovanou úlohu nebo použít můj oblíbený <a href="https://www.sraga.cz/automatizace-skriptu-pnp-powershell-azure-automation/" target="_blank" rel="noopener">Azure Automation Account</a>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-b25c1a5 elementor-widget elementor-widget-heading" data-id="b25c1a5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Outlook (Classic) Desktop</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-713bb09 elementor-widget elementor-widget-text-editor" data-id="713bb09" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Zde situace není vůbec jednoduchá. Nastavení v podobě jednoduché Group Policy nebo Intune politiky neexistuje. Ale není všem dnům konec, změny výchozího fontu lze docílit i v desktopovém Outlooku.</p><p>Jak to funguje. Outlook si ukládá nastavení výchozích fontů v registrech, a to konkrétně zde:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-d0dca30 elementor-widget elementor-widget-code-block-for-elementor" data-id="d0dca30" 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-javascript'>HKEY_Current_User\Software\Microsoft\Office\16.0\Common\MailSettings</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-07c4306 elementor-widget elementor-widget-text-editor" data-id="07c4306" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Hodnoty v registru pak vypadaní takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a657fd2 elementor-widget elementor-widget-image" data-id="a657fd2" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="Registry Editor Outlook Desktop Font" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAwOSwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL1JlZ2lzdHJ5LUVkaXRvci1PdXRsb29rLURlc2t0b3AtRm9udC5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="402" src="https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font-768x402.png" class="attachment-medium_large size-medium_large wp-image-1009" alt="Outlook Desktop - registry - default font settings" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font-768x402.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font-300x157.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font-1024x536.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/Registry-Editor-Outlook-Desktop-Font.png 1426w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-4e43ccd elementor-widget elementor-widget-text-editor" data-id="4e43ccd" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jak je z obrázku patrné, nastavení fontu přes editor registru asi nebude úplně komfortní. Lze to, ale asi bych to nikomu nepřál. Můj doporučený postup tedy je:</p><p>1. Na jakékoliv klientské stanici otevřít Outlook Desktop a jít do nastavení výchozích fontů:</p><p><em>File &gt; Options &gt; Mail &gt; Stationary and Fonts</em><br /><em>Soubor &gt; Možnosti &gt; Pošta &gt; Šablony e-mailů a písma</em></p>								</div>
				</div>
				<div class="elementor-element elementor-element-9eb2c74 elementor-widget elementor-widget-image" data-id="9eb2c74" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="Outlook Desktop - nastaveni sablony a pisma" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAxNiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL091dGxvb2stRGVza3RvcC1uYXN0YXZlbmktc2FibG9ueS1hLXBpc21hLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="376" src="https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma-768x376.png" class="attachment-medium_large size-medium_large wp-image-1016" alt="Outlook Desktop nastavení šablony a písma" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma-768x376.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma-300x147.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma-1024x502.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma-1536x752.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/Outlook-Desktop-nastaveni-sablony-a-pisma.png 1721w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-44196be elementor-widget elementor-widget-text-editor" data-id="44196be" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Nastavte požadnované písmo a jeho velikost pro Nové zprávy a také pro odpovědi a nastavení uložte. </p><p>Zavřete Outlook.</p><p>Otevřete Editor registru (regedit.exe) a najděte již výše zmíněný klíč:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-bc21496 elementor-widget elementor-widget-code-block-for-elementor" data-id="bc21496" 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-javascript'>HKEY_Current_User\Software\Microsoft\Office\16.0\Common\MailSettings</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-df6749a elementor-widget elementor-widget-text-editor" data-id="df6749a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dvojklikem na některou z hodnotu můžete pro jistotu zkontrolovat, zda-li se fotn a jeho velikost v konfiguraci skutečně vyskytuje.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c6d7562 elementor-widget elementor-widget-image" data-id="c6d7562" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="642" height="220" src="https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font.png" class="attachment-large size-large wp-image-1017" alt="regedit-outlook-default-font." srcset="https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font.png 642w, https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-300x103.png 300w" sizes="(max-width: 642px) 100vw, 642px" />															</div>
				</div>
				<div class="elementor-element elementor-element-d8414bb elementor-widget elementor-widget-text-editor" data-id="d8414bb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud je vše v pořádku, klikněte pravým tlačítkem na klíč &#8222;<strong>MailSettins</strong>&#8220; a zvolte možnost &#8222;<strong>Export</strong>&#8222;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-85bdec5 elementor-widget elementor-widget-image" data-id="85bdec5" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-export.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="regedit-outlook-default-font-export" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAxOCwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL3JlZ2VkaXQtb3V0bG9vay1kZWZhdWx0LWZvbnQtZXhwb3J0LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="587" src="https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-export-768x587.png" class="attachment-medium_large size-medium_large wp-image-1018" alt="Outlook Desktop Registry Export" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-export-768x587.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-export-300x229.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/regedit-outlook-default-font-export.png 785w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-9fc3770 elementor-widget elementor-widget-text-editor" data-id="9fc3770" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dobrá. Máme soubor registru s nastavením, které bychm rádi doručili na &#8222;všechny&#8220; nebo &#8222;vybrané&#8220; stanice. Vyjma případu, kdy by bylo možné registri importovat ručně, nabízí se možnost použití Group Policy nebo Microsoft Intune.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-f2062c3 elementor-widget elementor-widget-heading" data-id="f2062c3" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h3 class="elementor-heading-title elementor-size-default">Změna výchozího fontu v Outlooku | Group Policy</h3>				</div>
				</div>
				<div class="elementor-element elementor-element-0bf9570 elementor-widget elementor-widget-text-editor" data-id="0bf9570" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pro snadnou distribuci nastavení pomocí Group Policy, <strong>musíte převést soubor .REG na soubor .XML.</strong> To lze provést stažením powershell skriptu od <a href="https://4sysops.com/" target="_blank" rel="noopener">4sysops</a> zde. Pro spuštění skriptu zadejte správné cesty:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c8c1e50 elementor-widget elementor-widget-code-block-for-elementor" data-id="c8c1e50" 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'>.\RegToXML.ps1 c:\path\input.reg c:\path\output.xml</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-97e1bb8 elementor-widget elementor-widget-text-editor" data-id="97e1bb8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Nyní tento výstupní XML soubor, zkopírujte soubor do počítače, který používáte ke správě Group Policy.</p><p>Otevřete Group Policy editor, vytvořte novou zásadu a přejděte do:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6e1712e elementor-widget elementor-widget-code-block-for-elementor" data-id="6e1712e" 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'>User Configuration &gt; Preferences &gt; Windows Settings &gt; Registry</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-0587001 elementor-widget elementor-widget-text-editor" data-id="0587001" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Do místa pro vložení textu vložte obsah XML souboru</p><p>Nalinkujte zásadu na správnou OU a zajistěte, aby se politika aplikovala na koncová zaříézení.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-9f19162 elementor-widget elementor-widget-heading" data-id="9f19162" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h3 class="elementor-heading-title elementor-size-default">Změna výchozího fontu v Outlooku | Intune</h3>				</div>
				</div>
				<div class="elementor-element elementor-element-0eec6c4 elementor-widget elementor-widget-text-editor" data-id="0eec6c4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Vzhledem k tomu, že se jedná o úpravu uživatelského registru (HKCU &#8211; HKEY_CURRENT_USER), musíme na problém jít trochu od lesa, protože klasický powershell skript nám v tomto případě moc nepomůže. Takže co budeme potřebovat:</p><ol><li>Stáhněte si balíček <a href="https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool" target="_blank" rel="noopener">IntuneWin32 Content Prep Tool</a></li><li>Vyexportuje si z registru klíč MailSettings <strong>před</strong> <strong>úpravou </strong>a uložte si jej jako <strong>originalfont.reg</strong></li><li>Proveďte úpravu výchozích fontů, tak jak je popsáno na začátku skriptu a exportuje si z registru klíč MailSettings <strong>po </strong><strong>úpravě </strong>a uložte si jej jako <strong>originalfont.reg</strong></li><li>Vytvořte si následující složky (můžete libovolně, toto je můj setup):</li></ol>								</div>
				</div>
				<div class="elementor-element elementor-element-302d4cf elementor-widget elementor-widget-code-block-for-elementor" data-id="302d4cf" 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'>C:\Tools\IntuneWinAppUtil

C:\Tools\IntuneWinAppUtil\InREG
C:\Tools\IntuneWinAppUtil\Out</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-68187d2 elementor-widget elementor-widget-text-editor" data-id="68187d2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Soubor <a class="Link--primary" title="IntuneWinAppUtil.exe" href="https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/blob/master/IntuneWinAppUtil.exe" aria-label="IntuneWinAppUtil.exe, (File)" target="_blank" rel="noopener">IntuneWinAppUtil.exe</a> si uložte do složky &#8222;<strong>C:\Tools\IntuneWinAppUtil\</strong>&#8222;</p><p>Dále vytvořte 2 spustitelné soubory:</p><p><strong>C:\Tools\IntuneWinAppUtil\InREG\outlookfont.cmd</strong> s obsahem:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-bc7dbc1 elementor-widget elementor-widget-code-block-for-elementor" data-id="bc7dbc1" 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'>reg import .\outlookfont.reg</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-2000ad8 elementor-widget elementor-widget-text-editor" data-id="2000ad8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>C:\Tools\IntuneWinAppUtil\InREG\originalfont.cmd</strong> s obsahem:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-591591f elementor-widget elementor-widget-code-block-for-elementor" data-id="591591f" 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'>reg import .\originalfont.reg</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-63268ce elementor-widget elementor-widget-text-editor" data-id="63268ce" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Exportované soubory registru (<strong>originalfont.reg</strong> a <strong>outlookfont.reg</strong>) nakopírujte také do složky &#8222;<strong>C:\Tools\IntuneWinAppUtil\InREG</strong>&#8222;</p><p>Obsah adresáře bude vypadat takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a2cf64e elementor-widget elementor-widget-image" data-id="a2cf64e" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAyOCwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi0xLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="136" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-1-768x136.png" class="attachment-medium_large size-medium_large wp-image-1028" alt="InuneWin - seznam souborů" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-1-768x136.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-1-300x53.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-1.png 773w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-8d7e7dc elementor-widget elementor-widget-text-editor" data-id="8d7e7dc" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Spusťte příkazový řádek (cmd.exe) a zadejte tyto příkazy:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-064fd43 elementor-widget elementor-widget-code-block-for-elementor" data-id="064fd43" 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'># Prejit do slozky s IntuneWin
cd C:\Tools\IntuneWinAppUtil\

# Spustit IntuneWinAppUtil
.\IntuneWinAppUtil.exe

# Specifikujte zdrojovou slozku
Please specify the source folder: C:\Tools\IntuneWinAppUtil\InREG

# Specifikjte soubor, ktery spusti instalaci
Please specify the setup file: outlookfont.cmd

# Specifikujte vystupni slozku
Please specify the output folder: C:\Tools\IntuneWinAppUtil\Out

# Slozku katalogu nespecifikujte
Do you want to specify catalog folder (Y/N)?n</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-8055289 elementor-widget elementor-widget-text-editor" data-id="8055289" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Celý proces bude vypadat takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2c79b3e elementor-widget elementor-widget-image" data-id="2c79b3e" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-2" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAzMiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi0yLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="340" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2-768x340.png" class="attachment-medium_large size-medium_large wp-image-1032" alt="IntuneWIn postup" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2-768x340.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2-300x133.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2-1024x453.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2-1536x680.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-2.png 1919w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-62715d6 elementor-widget elementor-widget-text-editor" data-id="62715d6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ve složce &#8222;<strong>C:\Tools\IntuneWinAppUtil\Out</strong>&#8220; najdete nový soubor &#8222;<strong>outlookfont.intunewin</strong>&#8222;.</p><p>Přejtedě to <a href="https://intune.microsoft.com" target="_blank" rel="noopener">Microsoft Intune Admin Centra</a></p><p><strong>Zařízení &gt; Aplikace &gt; Windows &gt; Přidat &gt; Aplikace pro Windows (Win32)</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-b7ce556 elementor-widget elementor-widget-image" data-id="b7ce556" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-3" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAzNiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi0zLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="312" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3-768x312.png" class="attachment-medium_large size-medium_large wp-image-1036" alt="Intune - win32 app" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3-768x312.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3-300x122.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3-1024x417.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3-1536x625.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-3.png 1723w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ee4b750 elementor-widget elementor-widget-text-editor" data-id="ee4b750" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Klikěte na &#8222;Vybrat soubor balíčku aplikace&#8220;  a v pravé části obrazovky klikněte na ikonu &#8222;složky&#8220; a vyberte soubor ze složky Out (<strong>outlookfont.intunewin</strong>)</p>								</div>
				</div>
				<div class="elementor-element elementor-element-88ae0d3 elementor-widget elementor-widget-image" data-id="88ae0d3" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="431" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4-1024x490.png" class="attachment-large size-large wp-image-1037" alt="IntuneWin - balíček" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4-1024x490.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4-300x143.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4-768x367.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4-1536x735.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-4.png 1861w" sizes="(max-width: 900px) 100vw, 900px" />															</div>
				</div>
				<div class="elementor-element elementor-element-bece153 elementor-widget elementor-widget-text-editor" data-id="bece153" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V sekci &#8222;Informace o aplikaci&#8220; zadejte minimálně povinné údaje</p><ul><li>Název</li><li>Popis</li><li>Vydavatel</li></ul><p>A klikněte na tlačítko &#8222;<strong>Další</strong>&#8222;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-74cd1d6 elementor-widget elementor-widget-image" data-id="74cd1d6" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTAzOCwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi01LnBuZyJ9">
							<img loading="lazy" decoding="async" width="900" height="693" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5-1024x788.png" class="attachment-large size-large wp-image-1038" alt="IntuneWin - Informace o aplikaci" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5-1024x788.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5-300x231.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5-768x591.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-5.png 1108w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-b13d892 elementor-widget elementor-widget-text-editor" data-id="b13d892" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V sekci &#8222;<strong>Program</strong>&#8220; zadejte</p><ul><li>Příkaz pro instalaci: &#8222;outlookfont.cmd&#8220;</li><li>Příkaz pro odinstalaci: &#8222;originalfont.cmd&#8220;</li><li>Chování při instalaci: Uživatel</li></ul><p>Zbytek údajů vyplňte dle potřeby a klikněte na tlačítko &#8222;<strong>Další</strong>&#8222;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a749119 elementor-widget elementor-widget-image" data-id="a749119" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-6.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-6" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA0MiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi02LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="798" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-6-768x798.png" class="attachment-medium_large size-medium_large wp-image-1042" alt="IntuneWin-program" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-6-768x798.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-6-289x300.png 289w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-6.png 827w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-dac43a2 elementor-widget elementor-widget-text-editor" data-id="dac43a2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V sekci &#8222;<strong>Poždavky</strong>&#8220; je potřeba vypořádat se alespoň s povynnými údaji</p><ul><li>Architektura operačního systému: <em>vybere obě</em></li><li>Minimální operační systém: <em>zvolte podle toho, co ve firmě používáte</em></li></ul><p>Klikněte na tlačítko &#8222;<strong>Další</strong>&#8222;</p>								</div>
				</div>
				<div class="elementor-element elementor-element-258a2a1 elementor-widget elementor-widget-image" data-id="258a2a1" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-7" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA0MywidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi03LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="603" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7-768x603.png" class="attachment-medium_large size-medium_large wp-image-1043" alt="IntuneWin - požadavky" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7-768x603.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7-300x236.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7-1024x804.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-7.png 1112w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-85529ac elementor-widget elementor-widget-text-editor" data-id="85529ac" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Pravidla detekce</strong> slouží k tomu, aby Intune poznal, zda-li je aplikace v systému nainstalovaná či nikoliv. Pravidlo detekce je povinným údajem, proto se s ním musíme nějak vypořádat.</p><ul><li>Formát pravidel: <em>Ručně nakonfigurovat pravidla zjišťování</em></li><li>Klikněte na &#8222;<strong>+ Přidat</strong>&#8222;</li><li>Typ pravidla: <em>Registr</em></li><li>Cesta ke klíči: <em>Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\MailSettings</em></li><li>Název hodnoty: <em>ComposeFontSimple</em></li></ul><p>A teď máte 2 možnosti.</p><p>1. <strong>Metoda zjišťování: Hodnota existuje</strong> &#8211; tímto jsem začal a má to své neduhy, protože tato hodnota existuje od začátku, pokud je Outlook Desktop (Classic) v počítači již nainstalovaný. Takže k vyhodnocení dojde tak či tak a instalace nemusí proběhnout</p><p>2. <strong>Metoda zjišťování: Porovnání řetězců</strong></p><ul><li>Operátor: <em>Je rovno</em></li><li>Hodnota: </li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-7e3d126 elementor-widget elementor-widget-code-block-for-elementor" data-id="7e3d126" 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'>hex:3c,00,00,00,1f,00,00,f8,00,00,00,40,dc,00,00,00,00,00,\   00,00,00,00,00,00,00,22,41,72,69,61,6c,00,00,00,00,00,00,00,00,00,00,00,00,\   00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-6e310b2 elementor-widget elementor-widget-text-editor" data-id="6e310b2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výše uvedená hodnota je z nového nastavení a již obsahuje font Arial o velikosti 11 (původní font je Aptos)</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a511440 elementor-widget elementor-widget-image" data-id="a511440" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-8" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA0NywidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi04LnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="424" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8-768x424.png" class="attachment-medium_large size-medium_large wp-image-1047" alt="IntuneWin - pravidla detekce" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8-768x424.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8-300x166.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8-1024x566.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8-1536x848.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-8.png 1622w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-72e510d elementor-widget elementor-widget-text-editor" data-id="72e510d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Sekce &#8222;Nahrazování&#8220; a &#8222;Závoslosti&#8220; v tomto případě můžete přeskočit a věnujte pozornost sekci <strong>&#8222;Přiřazení&#8220;.</strong></p><p>Doporučuji zacílit na skuponu zabezpečení. Já cílím na skupiny vždy. Volby pro &#8222;Všechna zařízení&#8220; či &#8222;Všichni uživatelé&#8220; nikdy nepoužítám.</p><p>Zvolte skupinu dle potřeby a pokračujte tlačítkem &#8222;<strong>Další</strong>&#8220; na rekapitulaci a aplikaci vytvořte.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c3bcbdb elementor-widget elementor-widget-image" data-id="c3bcbdb" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="486" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9-1024x553.png" class="attachment-large size-large wp-image-1048" alt="IntuneWin - Přiřazení" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9-1024x553.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9-300x162.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9-768x415.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9-1536x830.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-9.png 1605w" sizes="(max-width: 900px) 100vw, 900px" />															</div>
				</div>
				<div class="elementor-element elementor-element-667f1d5 elementor-widget elementor-widget-text-editor" data-id="667f1d5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po uložení nastavení nějakou chvíli trvá, než se aplikace na zařízení nainstaluje. Každopádně po úspěšné instalaci se uživateli v Outlooku zobrazí požadovaný font.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-aaaaab6 elementor-widget elementor-widget-image" data-id="aaaaab6" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="intunewin-10" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTA1MiwidXJsIjoiaHR0cHM6XC9cL3d3dy5zcmFnYS5jelwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyNVwvMDJcL2ludHVuZXdpbi0xMC5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="457" src="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10-768x457.png" class="attachment-medium_large size-medium_large wp-image-1052" alt="Outlook Classic Desktop Font" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10-768x457.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10-300x179.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10-1024x609.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/intunewin-10.png 1141w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-6965c10 elementor-widget elementor-widget-text-editor" data-id="6965c10" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Tento postup je šitý horkou jehlou</strong>, předpokládám, že mohou nastat problémy s detekcí registru a tím pádem mohou vznikat chybné reporty v Intune Admin centru. Při testovální v labu jsem se setkal s chybovým hlášením &#8222;<strong>Aplikaci se nepovedlo detekovat, i když se její instalace úspěšně dokončila. (0x87D1041C)</strong>&#8222;. Pokud se s tímto také setkáte, neznamená to, že by se nastavení neaplikovalo, ale že detekční pravidla nejsou nastavena úplně správně. Věřím, že návod vás nasměroval a kosmetické vady si již doladíte.</p>								</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/microsoft-outlook-zmena-vychoziho-fontu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sharepoint List &#8211; přesun z tenantu do tenantu</title>
		<link>https://www.sraga.cz/sharepoint-list-presun-z-tenantu-do-tenantu/</link>
					<comments>https://www.sraga.cz/sharepoint-list-presun-z-tenantu-do-tenantu/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sat, 08 Feb 2025 11:45:16 +0000</pubDate>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[migrace]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<category><![CDATA[Sharepoint seznam]]></category>
		<category><![CDATA[Tenant-to-tenant]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=948</guid>

					<description><![CDATA[Narazil jsem na potřebu přesunout nějaké Sharepoint seznamy (Sharepoint List) z jednoho tenantu do druhého teantnu a nechtělo se mi všechny sloupce ručně přepisovat a zakládat. S oblibou na operace se Sharepointem používám PowerShell modul PnP Powershell. Zjišťoval jsem, zda by nebylo možné pomocí Pnp PowerShellu také nějak exportovat sharepoint seznamy a přišel jsem na ... <a title="Sharepoint List &#8211; přesun z tenantu do tenantu" class="read-more" href="https://www.sraga.cz/sharepoint-list-presun-z-tenantu-do-tenantu/" aria-label="Číst více o Sharepoint List &#8211; přesun z tenantu do tenantu">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="948" class="elementor elementor-948" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-54f84bc e-flex e-con-boxed e-con e-parent" data-id="54f84bc" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-e900db0 elementor-widget elementor-widget-text-editor" data-id="e900db0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Narazil jsem na potřebu přesunout nějaké Sharepoint seznamy (Sharepoint List) z jednoho tenantu do druhého teantnu a nechtělo se mi všechny sloupce ručně přepisovat a zakládat. S oblibou na <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">operace se Sharepointem</a> používám PowerShell modul <a href="https://www.sraga.cz/instalace-pnp-powershell/" target="_blank" rel="noopener">PnP Powershell</a>. Zjišťoval jsem, zda by nebylo možné pomocí Pnp PowerShellu také nějak exportovat sharepoint seznamy a přišel jsem na to, že pokud ze seznamu udělám šablonu, tak tuto šablonu mohu z jednoho tenantu exportovat a do druhého tenantu zase importovat. Jak na to:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-7276d1a elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="7276d1a" 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">
				Table of Contents			</h4>
										<div class="elementor-toc__toggle-button elementor-toc__toggle-button--expand" role="button" tabindex="0" aria-controls="elementor-toc__7276d1a" 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__7276d1a" 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__7276d1a" 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-33d38e7 elementor-widget elementor-widget-heading" data-id="33d38e7" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Povolení "Publishing" funkcí ve zdrojovém tenantu</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-9ebdae4 elementor-widget elementor-widget-text-editor" data-id="9ebdae4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Nejprve je potřeba povolit funkci &#8222;publikování na webu&#8220; Sharepointu ve zdrojovém tenantu. Spusťte níže uvedený skript PnP PowerShell jako správce:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a368369 elementor-widget elementor-widget-code-block-for-elementor" data-id="a368369" 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'># Enterprise Application ID for Pnp PowerShell
$ClientID = &quot;cf1fd5c4-XXXX-YYYYY-ZZZZ-e0b2e4170a9e&quot;

Connect-PnPOnline -url https://ZDROJOVYtenant.sharepoint.com/sites/vaseSite -Interactive -ClientId $ClientID

#SharePoint Online - Publishing Infrastructure of Site Collection 
Enable-PnPFeature -Identity f6924d36-2fa8-4f0b-b16d-06b7250180fa -force -Scope site   

#SharePoint Online - Publishing of Site   
Enable-PnPFeature -Identity 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb -force -Scope web </code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5e29597 elementor-widget elementor-widget-heading" data-id="5e29597" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default"> Uložení seznamu ve formě šablony</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-a16cdd9 elementor-widget elementor-widget-text-editor" data-id="a16cdd9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Přejděte na Sharepoint seznam ve zdrojovém tenantu: <strong>Nastavení seznamu &gt;&gt; Uložit seznam jako šablonu</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-1f5e1f8 elementor-widget elementor-widget-image" data-id="1f5e1f8" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-export-template-1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTY2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtZXhwb3J0LXRlbXBsYXRlLTEucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="323" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1-1024x367.png" class="attachment-large size-large wp-image-966" alt="Sharepoint seznam - nastavení" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1-1024x367.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1-300x108.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1-768x275.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1-1536x551.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-1.png 1908w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-6824b64 elementor-widget elementor-widget-image" data-id="6824b64" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-export-template-3" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTYxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtZXhwb3J0LXRlbXBsYXRlLTMucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="357" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3-768x357.png" class="attachment-medium_large size-medium_large wp-image-961" alt="Sharepoint seznam - nastavení - Uložit jako šablonu" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3-768x357.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3-300x140.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3-1024x476.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-3.png 1129w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-8924e30 elementor-widget elementor-widget-text-editor" data-id="8924e30" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Zvolte název a popis šablony. </p><ul><li>Pokud chcete, aby nové seznamy vytvořené z této šablony <strong>zahrnovaly položky v tomto seznamu</strong>, zaškrtněte volbu &#8222;Zahrnout obsah / Include Content&#8220;.</li><li>Zahrnutím obsahu se může zvětšit celková velikost šablony.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-c90730d elementor-widget elementor-widget-image" data-id="c90730d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-export-template-4" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTY5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtZXhwb3J0LXRlbXBsYXRlLTQucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="374" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4-1024x425.png" class="attachment-large size-large wp-image-969" alt="Sharepoint list template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4-1024x425.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4-300x125.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4-768x319.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-4.png 1180w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-0454fa2 elementor-widget elementor-widget-text-editor" data-id="0454fa2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Klikněte na odkaz &#8222;<strong>list template gallery</strong>&#8222;, pokud si chete zobrazit uložené šablony. V opačném případě klikněte na tlačítko OK.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-00b8648 elementor-alert-info elementor-widget elementor-widget-alert" data-id="00b8648" 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">TIP</span>
			
						<span class="elementor-alert-description">Pokud si omylem seznam šablon zavřete, dostanete se do něj následujícím způsobem:

Sharepoint site - Ozubené kolečko pro nastavení - Site information - View All site information - List templates</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-9b78313 elementor-widget elementor-widget-image" data-id="9b78313" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-export-template-5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTY4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtZXhwb3J0LXRlbXBsYXRlLTUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="258" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-5.png" class="attachment-large size-large wp-image-968" alt="Sharepoint list template - gallery" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-5.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-5-300x86.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-5-768x221.png 768w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-4a7dde9 elementor-widget elementor-widget-text-editor" data-id="4a7dde9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Označte šablony, které chcete přenést a v menu Files (Soubory) zvolte možnost Download a Copy (Stáhnout kopii).</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2f5d6d4 elementor-widget elementor-widget-image" data-id="2f5d6d4" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-export-template-6" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTY3LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtZXhwb3J0LXRlbXBsYXRlLTYucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="160" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6-1024x182.png" class="attachment-large size-large wp-image-967" alt="Sharepoint list template - gallery - download" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6-1024x182.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6-300x53.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6-768x136.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6-1536x273.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-export-template-6.png 1696w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-64ee9cd elementor-widget elementor-widget-heading" data-id="64ee9cd" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Povolení "Publishing" funkcí v cílovém tenantu</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-df02f31 elementor-widget elementor-widget-text-editor" data-id="df02f31" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Stejně jako ve zdrojovém tenantu, tak i v cílovém tenantu je potřeba povolit funkci &#8222;publikování na webu&#8220; Sharepointu. Spusťte níže uvedený skript PnP PowerShell jako správce:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-c4b67d3 elementor-widget elementor-widget-code-block-for-elementor" data-id="c4b67d3" 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'># Enterprise Application ID for Pnp PowerShell
$ClientID = &quot;cf1fd5c4-XXXX-YYYYY-ZZZZ-e0b2e4170a9e&quot;

Connect-PnPOnline -url https://CILOVYtenant.sharepoint.com/sites/vaseSite -Interactive -ClientId $ClientID

#SharePoint Online - Publishing Infrastructure of Site Collection 
Enable-PnPFeature -Identity f6924d36-2fa8-4f0b-b16d-06b7250180fa -force -Scope site   

#SharePoint Online - Publishing of Site   
Enable-PnPFeature -Identity 94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb -force -Scope web </code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-32e0d6d elementor-alert-warning elementor-widget elementor-widget-alert" data-id="32e0d6d" 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">Nezapomeňte zadat ClientID CÍLOVÉHO tenantu a stejně tak i URL</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-e3c08c5 elementor-widget elementor-widget-heading" data-id="e3c08c5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Import seznamu ve formě šablony</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-2f1b7b4 elementor-widget elementor-widget-text-editor" data-id="2f1b7b4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pro <strong>import</strong> šablony jděte do Nastavení Sharepoint site &#8211; Site information &#8211; <strong>View all settings &#8211; List templates</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-e7235e3 elementor-widget elementor-widget-image" data-id="e7235e3" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-import-template-1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTc2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtaW1wb3J0LXRlbXBsYXRlLTEucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="259" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1-1024x295.png" class="attachment-large size-large wp-image-976" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1-1024x295.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1-300x87.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1-768x222.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1-1536x443.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-1.png 1913w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-9488ab8 elementor-widget elementor-widget-image" data-id="9488ab8" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-import-template-2" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTc4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtaW1wb3J0LXRlbXBsYXRlLTIucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="172" height="300" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-2-172x300.png" class="attachment-medium size-medium wp-image-978" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-2-172x300.png 172w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-2.png 351w" sizes="(max-width: 172px) 100vw, 172px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-0e34e76 elementor-widget elementor-widget-image" data-id="0e34e76" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="426" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-3-1024x485.png" class="attachment-large size-large wp-image-977" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-3-1024x485.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-3-300x142.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-3-768x364.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-3.png 1070w" sizes="(max-width: 900px) 100vw, 900px" />															</div>
				</div>
				<div class="elementor-element elementor-element-eec656e elementor-widget elementor-widget-text-editor" data-id="eec656e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Na stránce &#8222;List templates Gallery&#8220; přejděte na kartu FILES (SOUBORY) a kliknutím na <strong>Nahrát dokument</strong> nahrajte šablonu seznamu, kterou jste exportovali ze zdrojového tenantu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-0931505 elementor-widget elementor-widget-image" data-id="0931505" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-import-template-4" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTgxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtaW1wb3J0LXRlbXBsYXRlLTQucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="900" height="392" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4-1024x446.png" class="attachment-large size-large wp-image-981" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4-1024x446.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4-300x131.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4-768x334.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-4.png 1461w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-576eda6 elementor-widget elementor-widget-image" data-id="576eda6" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-import-template-5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTgwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtaW1wb3J0LXRlbXBsYXRlLTUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="649" height="501" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-5.png" class="attachment-medium_large size-medium_large wp-image-980" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-5.png 649w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-5-300x232.png 300w" sizes="(max-width: 649px) 100vw, 649px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-b282df6 elementor-widget elementor-widget-image" data-id="b282df6" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="shp-list-import-template-6" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTc5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hwLWxpc3QtaW1wb3J0LXRlbXBsYXRlLTYucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="304" src="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6-768x304.png" class="attachment-medium_large size-medium_large wp-image-979" alt="Sharepoint List import template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6-768x304.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6-300x119.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6-1024x406.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/shp-list-import-template-6.png 1126w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-0013511 elementor-widget elementor-widget-text-editor" data-id="0013511" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Přejděte na stránku <strong>Site contents (Obsah webu) </strong>cílového tenantu, klikněte na <strong>Nový &gt;&gt; Aplikace</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-a3cb719 elementor-widget elementor-widget-image" data-id="a3cb719" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="sharepoint-list-create-from-template-1" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTgzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hhcmVwb2ludC1saXN0LWNyZWF0ZS1mcm9tLXRlbXBsYXRlLTEucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="417" src="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1-768x417.png" class="attachment-medium_large size-medium_large wp-image-983" alt="Sharepoint create list from template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1-768x417.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1-300x163.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1-1024x556.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-1.png 1061w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-8d9bd16 elementor-widget elementor-widget-text-editor" data-id="8d9bd16" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Na stránce aplikací SharePoint klikněte na odkaz <strong>classic experience </strong>(klasické prostředí).</p>								</div>
				</div>
				<div class="elementor-element elementor-element-ccd81ba elementor-widget elementor-widget-image" data-id="ccd81ba" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="sharepoint-list-create-from-template-2" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTgyLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hhcmVwb2ludC1saXN0LWNyZWF0ZS1mcm9tLXRlbXBsYXRlLTIucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="283" src="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2-768x283.png" class="attachment-medium_large size-medium_large wp-image-982" alt="Sharepoint create list from template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2-768x283.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2-300x111.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2-1024x377.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2-1536x566.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-2.png 1628w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-0355edb elementor-widget elementor-widget-text-editor" data-id="0355edb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Na stránce Klasické aplikace vyberte importovanou šablonu seznamu (pozor, aplikace může být na další stránce)</p>								</div>
				</div>
				<div class="elementor-element elementor-element-3abebc7 elementor-widget elementor-widget-image" data-id="3abebc7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-3.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="sharepoint-list-create-from-template-3" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTg2LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hhcmVwb2ludC1saXN0LWNyZWF0ZS1mcm9tLXRlbXBsYXRlLTMucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="676" src="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-3-768x676.png" class="attachment-medium_large size-medium_large wp-image-986" alt="Sharepoint create list from template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-3-768x676.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-3-300x264.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-3.png 875w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-9e64ba1 elementor-widget elementor-widget-text-editor" data-id="9e64ba1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Zvolte název seznamu. Pokud chcete doplnit i popis, kliněte na <strong>Advanced Options</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-3172549 elementor-widget elementor-widget-image" data-id="3172549" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="sharepoint-list-create-from-template-4" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTg1LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hhcmVwb2ludC1saXN0LWNyZWF0ZS1mcm9tLXRlbXBsYXRlLTQucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="402" src="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4-768x402.png" class="attachment-medium_large size-medium_large wp-image-985" alt="Sharepoint create list from template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4-768x402.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4-300x157.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4-1024x536.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-4.png 1302w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-6cfd25d elementor-widget elementor-widget-text-editor" data-id="6cfd25d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V <strong>Site contents</strong> je nyní dostupný seznam, který je vytvořen ze šablony.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-6adb2c7 elementor-widget elementor-widget-image" data-id="6adb2c7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="sharepoint-list-create-from-template-5" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTg0LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvc2hhcmVwb2ludC1saXN0LWNyZWF0ZS1mcm9tLXRlbXBsYXRlLTUucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="449" src="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5-768x449.png" class="attachment-medium_large size-medium_large wp-image-984" alt="Sharepoint create list from template" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5-768x449.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5-300x175.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5-1024x599.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/sharepoint-list-create-from-template-5.png 1065w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/sharepoint-list-presun-z-tenantu-do-tenantu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory</title>
		<link>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/</link>
					<comments>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sat, 08 Feb 2025 09:30:44 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[AADSTS700016]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=946</guid>

					<description><![CDATA[AADSTS700016: Application with identifier &#8218;31359c7f-bd7e-475c-86db-fdb8c937548e&#8216; was not found in the directory &#8218;&#8218;. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. PnP.PowerShell Pokud se Vám nedaří zaregistrovat do ... <a title="PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory" class="read-more" href="https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/" aria-label="Číst více o PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="946" class="elementor elementor-946" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-8748935 e-flex e-con-boxed e-con e-parent" data-id="8748935" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-6913984 elementor-blockquote--skin-boxed elementor-widget elementor-widget-blockquote" data-id="6913984" data-element_type="widget" data-widget_type="blockquote.default">
				<div class="elementor-widget-container">
							<blockquote class="elementor-blockquote">
			<p class="elementor-blockquote__content">
				AADSTS700016: Application with identifier '31359c7f-bd7e-475c-86db-fdb8c937548e' was not found in the directory ''. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.			</p>
							<div class="e-q-footer">
											<cite class="elementor-blockquote__author">PnP.PowerShell</cite>
														</div>
					</blockquote>
						</div>
				</div>
				<div class="elementor-element elementor-element-313cb78 elementor-widget elementor-widget-text-editor" data-id="313cb78" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud se Vám nedaří zaregistrovat do tenantu <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">PnP.PowerShell</a> a vrací se Vám výše uvedená chyba, zde je postup, jak ji lze celkem rychle vyřešit.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-193dc44 elementor-widget elementor-widget-image" data-id="193dc44" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-AADSTS700016" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtQUFEU1RTNzAwMDE2LnBuZyJ9">
							<img loading="lazy" decoding="async" width="737" height="787" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png" class="attachment-medium_large size-medium_large wp-image-950" alt="pnp.powershell AADSTS700016" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png 737w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016-281x300.png 281w" sizes="(max-width: 737px) 100vw, 737px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-5fb8322 elementor-widget elementor-widget-text-editor" data-id="5fb8322" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Je potřeba <strong>zaregistrovat ID aplikace</strong> v Microsoft Entra pro <a href="https://www.sraga.cz/instalace-pnp-powershell/" target="_blank" rel="noopener">PnP PowerShell</a>. Po instalaci modulu PnP.PowerShell postupujte takto:</p>								</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-83f4a35 e-flex e-con-boxed e-con e-parent" data-id="83f4a35" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-ce30485 elementor-widget elementor-widget-code-block-for-elementor" data-id="ce30485" 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 vastenant.onmicrosoft.com -Interactive
</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b4420f7 elementor-widget elementor-widget-text-editor" data-id="b4420f7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Tento příkaz zaregistruje aplikaci v Entra ID. Pozor na identifikátor tenantu (-Tenant) &#8211; musíte zadat fallback doménu vašeho tenantu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-096b507 elementor-widget elementor-widget-image" data-id="096b507" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img loading="lazy" decoding="async" width="900" height="352" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-1024x401.png" class="attachment-large size-large wp-image-952" alt="pnp.powershell registred app" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-1024x401.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-300x118.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-768x301.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app.png 1439w" sizes="(max-width: 900px) 100vw, 900px">															</div>
				</div>
				<div class="elementor-element elementor-element-1e9829c elementor-widget elementor-widget-text-editor" data-id="1e9829c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V Entra ID si můžete ověřit, že je aplikace &#8222;PnP PowerShell&#8220; skutečně zaregistrovaná a rovnou si poznačte Application ID (= Client ID).</p><p>Občas se stane, že výše uvedený příkaz skončí chybou. Alternativně můžete použít příkaz v kontextu <strong>Globálního správce</strong>:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-38c213e elementor-widget elementor-widget-code-block-for-elementor" data-id="38c213e" 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-PnPEntraIDApp -ApplicationName &quot;PnP PowerShell&quot; -Tenant vastenant.onmicrosoft.com -Interactive</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b1d5295 elementor-widget elementor-widget-image" data-id="b1d5295" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-grant-permissions" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtZ3JhbnQtcGVybWlzc2lvbnMucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="300" height="273" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions-300x273.png" class="attachment-medium size-medium wp-image-953" alt="pnp powershell grant permissions" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions-300x273.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions.png 660w" sizes="(max-width: 300px) 100vw, 300px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ac673bb elementor-widget elementor-widget-text-editor" data-id="ac673bb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po úspěšném dokončení příkazu bude zaregistrovaná Enterprise Aplikace v Entra ID. I v tomto případě si poznačte Application ID.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-9cd5d85 elementor-widget elementor-widget-image" data-id="9cd5d85" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-registred" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtcmVnaXN0cmVkLnBuZyJ9">
							<img loading="lazy" decoding="async" width="900" height="267" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1024x304.png" class="attachment-large size-large wp-image-951" alt="Pnp PowerShell - Application ID" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1024x304.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-300x89.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-768x228.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1536x456.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred.png 1900w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-928625d elementor-widget elementor-widget-text-editor" data-id="928625d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jakmile je aplikace správně zaregistrovaná, lze se k <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">PnP PowerShell</a> připojit následujícím způsobem:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-279db15 elementor-widget elementor-widget-code-block-for-elementor" data-id="279db15" 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'># Enterprise Application ID = Client ID
$ClientID = &quot;cf1fd5c4-XXXXX-XXXXX-XXXXXX-YYYYYYYYYY&quot;

# Connect to Sharepoint site - edit URL parameter
Connect-PnPOnline -url https://vastenant.sharepoint.com/sites/vaseSite -Interactive -ClientId $ClientID</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-31f8858 elementor-widget elementor-widget-text-editor" data-id="31f8858" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Application ID lze také uložit do systémové proměnné. Já tuto variantu nepoužívám, protože se často hlásím do více tenantů a raději používám proměnné v kódu. Registrace systémové proměnné a připojení k Sharepoint site:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-19fe89c elementor-widget elementor-widget-code-block-for-elementor" data-id="19fe89c" 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'># Enterprise Application ID = Client ID
$ClientID = &quot;cf1fd5c4-XXXXX-XXXXX-XXXXXX-YYYYYYYYYY&quot;

# Add Enterprise Application ID to Environment variable
[System.Environment]::SetEnvironmentVariable(&quot;ENTRAID_CLIENT_ID&quot;, $ClientID, [EnvironmentVariableTarget]::User)

# Connect to SharePoint Online site
Connect-PnPOnline -Url &quot;https://vastenant.sharepoint.com/sites/vaseSite&quot; -Interactive</code></pre>				</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hromadné vygenerování CNAME záznamů pro DKIM</title>
		<link>https://www.sraga.cz/hromadne-vygenerovani-cname-zaznamu-pro-dkim/</link>
					<comments>https://www.sraga.cz/hromadne-vygenerovani-cname-zaznamu-pro-dkim/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sat, 31 Aug 2024 13:55:19 +0000</pubDate>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[CNAME]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[DNS]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=706</guid>

					<description><![CDATA[V rámci nasazování cloudových služeb se setkávám s potřebou hromadně vygenerovat CNAME záznamy pro DKIM. Tohoto lze poměrně jednoduše dosáhnout pomocí Exchange Online PowerShellu # pripojeni k Exchange Online PowerShell Connect-ExchangeOnline # nacteni domen $domains = Get-AcceptedDomain # vypis domen $domains # vytvoreni DKIM CNAME zaznamu pro vsechny domeny foreach ($domain in $domains) { $domainName ... <a title="Hromadné vygenerování CNAME záznamů pro DKIM" class="read-more" href="https://www.sraga.cz/hromadne-vygenerovani-cname-zaznamu-pro-dkim/" aria-label="Číst více o Hromadné vygenerování CNAME záznamů pro DKIM">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="706" class="elementor elementor-706" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-012d0ea e-flex e-con-boxed e-con e-parent" data-id="012d0ea" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-3bdaba3 elementor-widget elementor-widget-text-editor" data-id="3bdaba3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V rámci nasazování cloudových služeb se setkávám s potřebou hromadně vygenerovat CNAME záznamy pro DKIM. Tohoto lze poměrně jednoduše dosáhnout pomocí Exchange Online PowerShellu</p>								</div>
				</div>
				<div class="elementor-element elementor-element-d2d6ff7 elementor-widget elementor-widget-code-block-for-elementor" data-id="d2d6ff7" 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'># pripojeni k Exchange Online PowerShell
Connect-ExchangeOnline</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-6ec6753 elementor-widget elementor-widget-image" data-id="6ec6753" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="EXOL-DKIM-1-Connect-ExchangeOnline" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzExLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wOFwvRVhPTC1ES0lNLTEtQ29ubmVjdC1FeGNoYW5nZU9ubGluZS5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="139" src="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline-768x139.png" class="attachment-medium_large size-medium_large wp-image-711" alt="pripojeni k Exchange Online PowerShell Connect-ExchangeOnline" srcset="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline-768x139.png 768w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline-300x54.png 300w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline-1024x185.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline-1536x278.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-1-Connect-ExchangeOnline.png 1538w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-41a0d87 elementor-widget elementor-widget-code-block-for-elementor" data-id="41a0d87" 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'># nacteni domen
$domains = Get-AcceptedDomain

# vypis domen
$domains</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-aa6b6bf elementor-widget elementor-widget-image" data-id="aa6b6bf" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="EXOL-DKIM-2-Get-AcceptedDomain" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzEwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wOFwvRVhPTC1ES0lNLTItR2V0LUFjY2VwdGVkRG9tYWluLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="191" src="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain-768x191.png" class="attachment-medium_large size-medium_large wp-image-710" alt="Get-AcceptedDomain" srcset="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain-768x191.png 768w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain-300x75.png 300w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain-1024x255.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-2-Get-AcceptedDomain.png 1077w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-d3e8451 elementor-widget elementor-widget-code-block-for-elementor" data-id="d3e8451" 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'># vytvoreni DKIM CNAME zaznamu pro vsechny domeny
foreach ($domain in $domains) {
    $domainName = $domain.DomainName
    New-DkimSigningConfig -DomainName $domainName -Enabled $true
}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-47a2348 elementor-widget elementor-widget-image" data-id="47a2348" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="EXOL-DKIM-3-New-DkimSigningConfig" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzA5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wOFwvRVhPTC1ES0lNLTMtTmV3LURraW1TaWduaW5nQ29uZmlnLnBuZyJ9">
							<img loading="lazy" decoding="async" width="768" height="247" src="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig-768x247.png" class="attachment-medium_large size-medium_large wp-image-709" alt="New-DkimSigningConfig" srcset="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig-768x247.png 768w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig-300x97.png 300w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig-1024x330.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig-1536x494.png 1536w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-3-New-DkimSigningConfig.png 1796w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-72fd47d elementor-widget elementor-widget-code-block-for-elementor" data-id="72fd47d" 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'># zobrazeni vsech DKIM CNAME zaznamu
foreach ($domain in $domains) {
    $dkimConfig = Get-DkimSigningConfig -Identity $domain.DomainName
    Write-Output &quot;Domain: $($domain.DomainName)&quot;
    Write-Output &quot;Selector1 CNAME: $($dkimConfig.Selector1CNAME)&quot;
    Write-Output &quot;Selector2 CNAME: $($dkimConfig.Selector2CNAME)&quot;
    Write-Output &quot;&quot;
}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5e25b97 elementor-widget elementor-widget-image" data-id="5e25b97" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-4-Get-DkimSigningConfig.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="EXOL-DKIM-4-Get-DkimSigningConfig" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzA4LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wOFwvRVhPTC1ES0lNLTQtR2V0LURraW1TaWduaW5nQ29uZmlnLnBuZyJ9">
							<img loading="lazy" decoding="async" width="602" height="334" src="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-4-Get-DkimSigningConfig.png" class="attachment-medium_large size-medium_large wp-image-708" alt="Get-DkimSigningConfig" srcset="https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-4-Get-DkimSigningConfig.png 602w, https://www.sraga.cz/wp-content/uploads/2024/08/EXOL-DKIM-4-Get-DkimSigningConfig-300x166.png 300w" sizes="(max-width: 602px) 100vw, 602px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-85b92c5 elementor-widget elementor-widget-text-editor" data-id="85b92c5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výstup z obrazovky stačí zkopírovat a zaslat správci domén, aby správně nastavil selector1 a selector2 na jednotlivých doménách a následně DKIM aktivovat.</p>								</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/hromadne-vygenerovani-cname-zaznamu-pro-dkim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hromadné vytváření zástupců (linků) v Sharepoint Online</title>
		<link>https://www.sraga.cz/hromadne-vytvareni-zastupcu-linku-v-sharepoint-online/</link>
					<comments>https://www.sraga.cz/hromadne-vytvareni-zastupcu-linku-v-sharepoint-online/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Fri, 26 Apr 2024 12:15:27 +0000</pubDate>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[odkaz]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[zástupce]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=666</guid>

					<description><![CDATA[Dostal se mi do rukou zajímavý úkol: &#8222;Uklidili jsme si data na Sharepointu a potřebujeme, aby v původních složkách byl vždy odkaz do nového umístění. Tady máte tabulku, kam umístit odkazy a kam mají byý nasměrovány&#8220;. Takže jsem připravil skript, který si vezme CSV soubor a v něm jsou 2 sloupce obsahující data: LinkSavePath &#8211; ... <a title="Hromadné vytváření zástupců (linků) v Sharepoint Online" class="read-more" href="https://www.sraga.cz/hromadne-vytvareni-zastupcu-linku-v-sharepoint-online/" aria-label="Číst více o Hromadné vytváření zástupců (linků) v Sharepoint Online">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="666" class="elementor elementor-666" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-e016d74 e-flex e-con-boxed e-con e-parent" data-id="e016d74" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-3837589 elementor-widget elementor-widget-text-editor" data-id="3837589" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dostal se mi do rukou zajímavý úkol: &#8222;Uklidili jsme si data na Sharepointu a potřebujeme, aby v původních složkách byl vždy odkaz do nového umístění. Tady máte tabulku, kam umístit odkazy a kam mají byý nasměrovány&#8220;.</p><p>Takže jsem připravil skript, který si vezme CSV soubor a v něm jsou 2 sloupce obsahující data:</p><div><ul><li><strong>LinkSavePath</strong> &#8211; kam link uložit a jak se bude jmenovat<br />Příklad: <em>Shared Documents/Nabidky/rok 2021\APRIL-MAJ 2021\klient\Odkaz na produkty.url</em></li><li><div><div><strong>TargetPath</strong> &#8211; kam bude link odkazovat<br />Příklad: <em>https://firma.sharepoint.com/sites/SharepointSite/Shared Documents/Archiv/Klienti/rok 2021\Produkty</em></div></div></li></ul></div><p>Toto CSV načítám a vytvářím zástupce dle hotnot, které jsou obsaženy v CSV.</p><p>Pro vytvoření linku v Sharepointu je potřeba dodat 3 informace</p><ul><li>$filename &#8211; název odkazu [odkaz.url]</li><li>$folderName &#8211; kde bude odkaz uložen</li><li>$URL &#8211; kam bude odkaz směřovat</li></ul><p>K vytváření odkazů použijeme knihovu <a href="https://www.sraga.cz/instalace-pnp-powershell/" target="_blank" rel="noopener">PnP.PowerShell</a>. Samotný odkaz se vytváří, stejně jako jakýkoliv jiný soubor pomocí příkazu <a href="https://pnp.github.io/powershell/cmdlets/Add-PnPFile.html" target="_blank" rel="noopener">Add-PnPFile</a>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-cb40ba1 elementor-widget elementor-widget-code-block-for-elementor" data-id="cb40ba1" 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-javascript'>$stream = [IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes(&quot;[InternetShortcut]URL=https://www.sraga.c&quot;))
Add-PnPFile -FileName &quot;odkaz.url&quot; -Folder &quot;Shared Documents/CilovaSlozka&quot; -Stream $stream -Values @{_ShortcutUrl=&quot;https://www.sraga.cz&quot;}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-1b4973c elementor-widget elementor-widget-text-editor" data-id="1b4973c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výsledný skript tedy vypadá takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2333d62 elementor-widget elementor-widget-code-block-for-elementor" data-id="2333d62" 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'>$SiteURL = &quot;https://firma.sharepoint.com/sites/SharepointSite/&quot;

# Pripojeni k Sharepoint Site
Connect-PnPOnline -Url $SiteURL  -Interactive

# soubor se vstupnimi daty, kodovani UTF8, data oddelena strednikem
$CSVFile = &quot;C:\Temp\Import\shortcuts-utf8bom.csv&quot;

# Ziskani dat z CSV
$CSVData = Import-CSV $CSVFile -Delimiter &quot;;&quot;
$Counter = 1

# Cyklus pro zpracovani dat
ForEach($Row in $CSVData)
{
    
    Write-Host &quot;Soubor $($Row.LinkSavePath) - $Counter of $($CSVData.Count)&quot;
    Write-Host -ForegroundColor Yellow &quot; &quot;$($Row.TargetPath)
    
    # ziskani nazvu slozky
    $folderName = Split-Path -Path $($Row.LinkSavePath) -parent
    
    # ziskani nazvu souboru
    $fileName = Split-Path -Path $($Row.LinkSavePath) -Leaf
    
    Write-Host -ForegroundColor Blue $folderName
    Write-Host -ForegroundColor Blue $fileName
    
    # Cil, kam se shortcut odkazuje musi byt URL Encoded
    $URLEncodedTemp = [URI]::EscapeUriString($($Row.TargetPath))
    
    # Osetrni mezery 
    $URLEncoded = $URLEncodedTemp.replace(&#039;%2520&#039;,&#039;%20&#039;)
    
    $stream = [IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes(&quot;[InternetShortcut]URL=$URLEncoded&quot;))
    
    # Vytvoreni shortcut
    Add-PnPFile -FileName $fileName -Folder $folderName -Stream $stream -Values @{_ShortcutUrl=&quot;$URLEncoded&quot;}

    $Counter++
}

# Odpojeni PnP
Disconnect-PnPOnline</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-9a2e105 elementor-widget elementor-widget-text-editor" data-id="9a2e105" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Ve výše uvedeném skriptu je pár maličkostí, které jsem musel ošetřit &#8222;nestandardní cestou&#8220;</p><p>Ze sloupce TargetPath beru URL, kam se bude link odkazovat.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-48c6dba elementor-widget elementor-widget-code-block-for-elementor" data-id="48c6dba" 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'># Cil, kam se shortcut odkazuje musi byt URL Encoded
$URLEncodedTemp = [URI]::EscapeUriString($($Row.TargetPath))</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-90fa6e7 elementor-widget elementor-widget-text-editor" data-id="90fa6e7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Původně jsem toto nijak neošetřoval a odkazy bral z CSV a rovnou je ukládat na Sharepoint. V naprosté většině případů byly odkazy funkční, vyjma případu, kdy cílová URL obsahovala čárku (&#8222;,&#8220;). Bohužel, klient dodal data, kde cílové složky, do kterých se odkazuje, obsahují v názvu souboru čárku (a i jiné speciální znaky). Takže pomocí funkce <strong>[URI]::EscapeUriString()</strong> jsem cílovou URL zakódoval, doufajíc, že vše bude v pořádku.</p><p>V pořádku to bylo, až na jednu drobnost. TargetPath obsahuje odkazy na Sharepoint, kde URL vypadá nějak takto:</p><p> </p>								</div>
				</div>
				<div class="elementor-element elementor-element-f4fd93d elementor-widget elementor-widget-code-block-for-elementor" data-id="f4fd93d" 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'>https://firma.sharepoint.com/sites/SharepointSite/Shared Documents/Archiv/Klienti/rok 2021\Produkty</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b7648cb elementor-widget elementor-widget-text-editor" data-id="b7648cb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>část URL, konkrétně /Shared Documents/ se po použití výše zmíněné funkce enkódovala jako &#8222;/Shared<strong>%2520</strong>Documents/&#8220; namísto /Shared<strong>%20</strong>Documents/.</p><p>Konzultoval jsem tuto problematiku s Googlem a tam jsem se dozvěděl, že <strong>%25</strong> je URL encoded znak &#8222;%&#8220;, čili, jako by se ten řetězec encodoval dvakrát. Tedy &#8222;%2520&#8220; by měl odpovídat řetězci &#8222;%20&#8220; nikoliv &#8222;mezeře&#8220;.</p><p>Zvažoval jsem možnost systémového řešení, ale vzhledem k tomu, že bylo potřeba zpracovat cca 200 odkazů a pak už nebylo potřeba s tím nic dalšího dělat, rozhodl jsem se pro klasické řešení a řetězec jsem opravil takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-eeddc69 elementor-widget elementor-widget-code-block-for-elementor" data-id="eeddc69" 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'>$URLEncoded = $URLEncodedTemp.replace(&#039;%2520&#039;,&#039;%20&#039;)</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-0d8ebac elementor-widget elementor-widget-heading" data-id="0d8ebac" 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-6f5e621 elementor-widget elementor-widget-text-editor" data-id="6f5e621" 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/" target="_blank" rel="noopener">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/hromadne-vytvareni-zastupcu-linku-v-sharepoint-online/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 loading="lazy" 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 loading="lazy" 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 loading="lazy" 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>Sharepoint Online: Jak najít a smazat prázdné složky</title>
		<link>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/</link>
					<comments>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 25 Apr 2024 09:03:22 +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=541</guid>

					<description><![CDATA[Dnes přicházím s návodem, jak v Knihovně dokumentů, umístěné na na Sharepointu Online, získat seznam prádných složek a případně je ještě i smazat. Dostal se ke mě požadavek od klienta, že po jejich interní akci, která souvisela s úklidem a přesouváním dat, objevili spousty prázdných složek a zda-li by bylo možné tyto složky automaticky najít ... <a title="Sharepoint Online: Jak najít a smazat prázdné složky" class="read-more" href="https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/" aria-label="Číst více o Sharepoint Online: Jak najít a smazat prázdné složky">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="541" class="elementor elementor-541" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-e9be141 e-flex e-con-boxed e-con e-parent" data-id="e9be141" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-3d201b1 elementor-widget elementor-widget-text-editor" data-id="3d201b1" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dnes přicházím s návodem, jak v Knihovně dokumentů, umístěné na na Sharepointu Online, získat seznam prádných složek a případně je ještě i smazat.</p><p>Dostal se ke mě požadavek od klienta, že po jejich interní akci, která souvisela s úklidem a přesouváním dat, objevili spousty prázdných složek a zda-li by bylo možné tyto složky automaticky najít a smazat.</p><p>No asi takhle, kdyby to nešlo, tak tento článek nevznikne.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a99e5bc elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="a99e5bc" 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__a99e5bc" 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__a99e5bc" 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__a99e5bc" 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-7af5c15 elementor-widget elementor-widget-heading" data-id="7af5c15" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Připojení se ke knihovně dokumentů</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-aec2193 elementor-widget elementor-widget-text-editor" data-id="aec2193" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pro tuhle akci použijeme PnP PowerShell. Pokud nevíte, co to je a jak jej nainstalovat, doporučuji začít těmito odkazy:</p><ul><li><a href="https://youtu.be/f4yGD1pnxZY?si=5mRlxYZabozSoLBh" target="_blank" rel="noopener">Instalace PnP PowerShell</a></li><li><a href="https://www.youtube.com/watch?v=uxZMmLxU3og" target="_blank" rel="noopener">Automatické spouštění skriptů PnP PowerShell pomocí Azure Automation</a></li></ul><p>Předpokládám tedy, že modul PnP Management Shell máte ve svém počítači nainstalovaný a že disponujete <a href="https://www.sraga.cz/instalace-powershell-7/" target="_blank" rel="noopener">PowerShellem verze 7</a>.</p><p>Nejprve tedy bude potřeba nadefinovat několik proměnných a připojit se k Sharepoint Site pomocí právě PnP.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-8bd7aa6 elementor-widget elementor-widget-code-block-for-elementor" data-id="8bd7aa6" 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'>#Parametry

# Adresa Sharepoint Online webu
$SiteURL = &quot;https://vas_tenant.sharepoint.com/sites/vase_site&quot;

# Nazev knihovny dokumentu
$DocumentLibraryName = &quot;Documents&quot;

# Pripojeni
Connect-PnPOnline -Url $SiteURL  -Interactive

# Nacteni webu a Root adresare do promennych
$Web = Get-PnPWeb
$List = Get-PnPList -Identity $DocumentLibraryName -Includes RootFolder</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-491559a elementor-widget elementor-widget-text-editor" data-id="491559a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p><strong>Pokud by se vyskytla chyba</strong>, že nelze načíst seznam do proměnné $List, vypište si všechny seznamy a knihovny pomocí příkazu Get-PnPList &#8211; bez parametrů</p>								</div>
				</div>
				<div class="elementor-element elementor-element-0896ef4 elementor-widget elementor-widget-image" data-id="0896ef4" 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/get-pnplist-documentlibraryname.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="get-pnplist-documentlibraryname" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTczLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvZ2V0LXBucGxpc3QtZG9jdW1lbnRsaWJyYXJ5bmFtZS5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="768" height="415" src="https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-documentlibraryname-768x415.png" class="attachment-medium_large size-medium_large wp-image-573" alt="Get-PnPList -Identity $DocumentLibraryName" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-documentlibraryname-768x415.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-documentlibraryname-300x162.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-documentlibraryname-1024x553.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-documentlibraryname.png 1195w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-481561a elementor-widget elementor-widget-code-block-for-elementor" data-id="481561a" 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-PnPList</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-3546f3b elementor-widget elementor-widget-image" data-id="3546f3b" 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/get-pnplist.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="get-pnplist" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NTc3LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvZ2V0LXBucGxpc3QucG5nIn0%3D">
							<img loading="lazy" decoding="async" width="768" height="301" src="https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-768x301.png" class="attachment-medium_large size-medium_large wp-image-577" alt="Get-PnPList" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-768x301.png 768w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-300x117.png 300w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist-1024x401.png 1024w, https://www.sraga.cz/wp-content/uploads/2024/04/get-pnplist.png 1195w" sizes="(max-width: 768px) 100vw, 768px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-c52beee elementor-widget elementor-widget-text-editor" data-id="c52beee" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Problém s načtením knihovny bude souviset s tím, že název knihovny není document, ale &#8222;Sdílene dokumenty&#8220;, pak tedy změňte příkaz $DocumentLibraryName na</p>								</div>
				</div>
				<div class="elementor-element elementor-element-4f1d56e elementor-widget elementor-widget-code-block-for-elementor" data-id="4f1d56e" 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'>$DocumentLibraryName = &quot;Sdilene dokumenty&quot;</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-59a30ec elementor-widget elementor-widget-text-editor" data-id="59a30ec" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Nyní byste měli mít všechny prerekvizity potřebné k tomu, abyste mohli získávat informace z dokumentové knihovny.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-a1741b5 elementor-widget elementor-widget-heading" data-id="a1741b5" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Seznam prázdných složek</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-f251dec elementor-widget elementor-widget-text-editor" data-id="f251dec" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Níže vypsaná funkce vezme celou Sharepoint site a projde všechny adresáře od Rootu až do posledního zanoření s tím, že vynechá systémové složky (název Forms nebo začíná &#8222;_&#8220;). Skript projde všechny složky rekurzivně. Pokud je složka prázdná, zareportuje ji.</p><p>Skript všechny nálezy vypíše na obrazovku a zároveň uloží výstup do CSV &#8222;<strong>C:\Temp\EmptyFolterReport.csv</strong>&#8222;.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-28138c5 elementor-widget elementor-widget-code-block-for-elementor" data-id="28138c5" 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'># Funkce inspirovana: https://www.sharepointdiary.com/2018/09/sharepoint-online-delete-empty-folders-using-powershell.html

Function Get-PnPEmptyFolder([Microsoft.SharePoint.Client.Folder]$Folder)
{
 
    $EmptyFolderArray = @()
    
    $FolderSiteRelativeURL = $Folder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)
    
    #Process all Sub-Folders
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
    Foreach($SubFolder in $SubFolders)
    {
        #Exclude &quot;Forms&quot; and Hidden folders
        If(($SubFolder.Name -ne &quot;Forms&quot;) -and (-Not($SubFolder.Name.StartsWith(&quot;_&quot;))))
        {
            #Call the function recursively
            Get-PnPEmptyFolder -Folder $SubFolder
        }
    }
    
    #Get all files &amp; Reload Sub-folders from the given Folder
    $Files = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType File
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
 
    If ($Files.Count -eq 0 -and $SubFolders.Count -eq 0)
    {
        #Delete the folder
        $ParentFolder = Get-PnPProperty -ClientObject $Folder -Property ParentFolder
        $ParentFolderURL = $ParentFolder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)   

        Write-Host -f Green (&quot;Empty Folder: &#039;{0}&#039; at &#039;{1}&#039;&quot; -f $Folder.Name, $Folder.ServerRelativeURL)
        
        #Add the Data to Object
        $EmptyFolderData = New-Object PSObject
        $EmptyFolderData | Add-Member NoteProperty FolderName($Folder.Name)
        $EmptyFolderData | Add-Member NoteProperty RelativeURL($Folder.ServerRelativeURL)
        $EmptyFolderArray += $EmptyFolderData
    }

    #Export to CSV File
    $EmptyFolderArray | Export-CSV &quot;C:\Temp\EmptyFolderReport.csv&quot; -NoTypeInformation -Append
 
}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-27f7f34 elementor-widget elementor-widget-heading" data-id="27f7f34" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Smazání prázdných složek</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-ab7dffb elementor-widget elementor-widget-text-editor" data-id="ab7dffb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud jste <strong>provedli řádnou kontrolu</strong> pomocí předchozího skriptu, můžete přejít k samotnému smazání prázdných složek.</p><p>Níže vypsaná funkce vezme celou Sharepoint Site a projde všechny adresáře od Rootu až do posledního zanoření s tím, že vynechá systémové složky (název Forms nebo začíná &#8222;_&#8220;). Skript projde všechny složky rekurzivně. Pokud je složka prázdná, <strong>smaže ji</strong>!.</p><p>Skript všechny nálezy vypíše na obrazovku a zároveň uloží výstup do CSV &#8222;<strong>C:\Temp\DeletedFolderReport.csv</strong>&#8222;.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-58fe433 elementor-widget elementor-widget-code-block-for-elementor" data-id="58fe433" 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'># Funkce inspirovana: https://www.sharepointdiary.com/2018/09/sharepoint-online-delete-empty-folders-using-powershell.html

Function Delete-PnPEmptyFolder([Microsoft.SharePoint.Client.Folder]$Folder)
{
 
    $EmptyFolderArray = @()
    
    $FolderSiteRelativeURL = $Folder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)
    
    #Process all Sub-Folders
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
    Foreach($SubFolder in $SubFolders)
    {
        #Exclude &quot;Forms&quot; and Hidden folders
        If(($SubFolder.Name -ne &quot;Forms&quot;) -and (-Not($SubFolder.Name.StartsWith(&quot;_&quot;))))
        {
            #Call the function recursively
            Get-PnPEmptyFolder -Folder $SubFolder
        }
    }
    
    #Get all files &amp; Reload Sub-folders from the given Folder
    $Files = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType File
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
 
    If ($Files.Count -eq 0 -and $SubFolders.Count -eq 0)
    {
        #Delete the folder
        $ParentFolder = Get-PnPProperty -ClientObject $Folder -Property ParentFolder
        $ParentFolderURL = $ParentFolder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)   

        Remove-PnPFolder -Name $Folder.Name -Folder $ParentFolderURL -Force -Recycle

        Write-Host -f Green (&quot;Empty Folder: &#039;{0}&#039; at &#039;{1}&#039;&quot; -f $Folder.Name, $Folder.ServerRelativeURL)
        
        #Add the Data to Object
        $EmptyFolderData = New-Object PSObject
        $EmptyFolderData | Add-Member NoteProperty FolderName($Folder.Name)
        $EmptyFolderData | Add-Member NoteProperty RelativeURL($Folder.ServerRelativeURL)
        $EmptyFolderArray += $EmptyFolderData
    }

    #Export to CSV File
    $EmptyFolderArray | Export-CSV &quot;C:\Temp\DeletedFolderReport.csv&quot; -NoTypeInformation -Append
 
}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-f8cb0a9 elementor-widget elementor-widget-text-editor" data-id="f8cb0a9" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Tento skript by šel ještě vylepšit a to tak, že bychom přidali na začátek skriptu ještě &#8222;pojistku&#8220; (proměnnou) která by provedla výmaz jen tehdy, pokud by byla proměnná nastavena na true/false.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-0a56118 elementor-widget elementor-widget-code-block-for-elementor" data-id="0a56118" 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'># Testovaci rezim - pokud je true, neprovede vymaz ale jen vypis
$reportOnly = $true</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-22e92ea elementor-widget elementor-widget-text-editor" data-id="22e92ea" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Samotná funkce Delete-PnPEmptyFolder by se pak změnila takto:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-946a844 elementor-widget elementor-widget-code-block-for-elementor" data-id="946a844" 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'># Funkce inspirovana: https://www.sharepointdiary.com/2018/09/sharepoint-online-delete-empty-folders-using-powershell.html

Function Delete-PnPEmptyFolder([Microsoft.SharePoint.Client.Folder]$Folder)
{
 
    $EmptyFolderArray = @()
    
    $FolderSiteRelativeURL = $Folder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)
    
    #Process all Sub-Folders
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
    Foreach($SubFolder in $SubFolders)
    {
        #Exclude &quot;Forms&quot; and Hidden folders
        If(($SubFolder.Name -ne &quot;Forms&quot;) -and (-Not($SubFolder.Name.StartsWith(&quot;_&quot;))))
        {
            #Call the function recursively
            Get-PnPEmptyFolder -Folder $SubFolder
        }
    }
    
    #Get all files &amp; Reload Sub-folders from the given Folder
    $Files = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType File
    $SubFolders = Get-PnPFolderItem -FolderSiteRelativeUrl $FolderSiteRelativeURL -ItemType Folder
 
    If ($Files.Count -eq 0 -and $SubFolders.Count -eq 0)
    {
        #Delete the folder
        $ParentFolder = Get-PnPProperty -ClientObject $Folder -Property ParentFolder
        $ParentFolderURL = $ParentFolder.ServerRelativeUrl.Substring($Web.ServerRelativeUrl.Length+1)   

        # Remove-PnPFolder -Name $Folder.Name -Folder $ParentFolderURL -Force -Recycle
        # Write-Host -f Green (&quot;Empty Folder: &#039;{0}&#039; at &#039;{1}&#039;&quot; -f $Folder.Name, $Folder.ServerRelativeURL)
        
        if ($reportOnly -ne $true)
        {
          #Delete the folder
          Write-Host &quot;Deleted folder:&quot; $Folder.Name &quot;in&quot; $ParentFolderURL -ForegroundColor Red
          Remove-PnPFolder -Name $Folder.Name -Folder $ParentFolderURL -Force -Recycle
        }
        else
        {
          Write-host $parentFolder
          Write-Host &quot;Empty folder:&quot; $Folder.Name &quot;in&quot; $ParentFolderURL -ForegroundColor Green
        }

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

    #Export to CSV File
    $EmptyFolderArray | Export-CSV &quot;C:\Temp\DeletedFolderReport.csv&quot; -NoTypeInformation -Append
 
}</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-5425484 elementor-widget elementor-widget-heading" data-id="5425484" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Volání funkcí</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-7962145 elementor-widget elementor-widget-text-editor" data-id="7962145" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Výše uvedené funkce by se pak volaly jednoduše pomocí těchto příkazů:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-4594648 elementor-widget elementor-widget-code-block-for-elementor" data-id="4594648" 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'># Spusteni reportu - vypis prazdnych slozek
Get-PnPEmptyFolder $List.RootFolder

# Spusteni reportu - smazani prazdnych slozek
Delete-PnPEmptyFolder $List.RootFolder</code></pre>				</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/sharepoint-online-jak-najit-a-smazat-prazdne-slozky/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>
	</channel>
</rss>
