<?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>Sharepoint Online &#8211; Miroslav Šraga</title>
	<atom:link href="https://www.sraga.cz/tag/sharepoint-online/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>Sat, 08 Feb 2025 12:48:06 +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>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 fetchpriority="high" 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 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 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é 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>Microsoft 365 Archive &#8211; jak levně uvolnit místo na Sharepointu</title>
		<link>https://www.sraga.cz/microsoft-365-archive-jak-uvolnit-misto-na-sharepointu/</link>
					<comments>https://www.sraga.cz/microsoft-365-archive-jak-uvolnit-misto-na-sharepointu/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 04 Apr 2024 14:22:40 +0000</pubDate>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[Archiv]]></category>
		<category><![CDATA[Microsoft IA Syntex]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=347</guid>

					<description><![CDATA[Poslední dobou nás zákazníci oslovují s tím, že jim dochází místo v jejich Microsoft 365 tenantu a jestli na to nemáme řešení. Jedním z možných řešení může být právě Microsoft 365 Archive, která je součástí řešení Microsoft AI Syntex. Table of Contents Jak lze řešit nedostatek místa na Sharepointu Pokud vám dochází místo na Sharepointu, ... <a title="Microsoft 365 Archive &#8211; jak levně uvolnit místo na Sharepointu" class="read-more" href="https://www.sraga.cz/microsoft-365-archive-jak-uvolnit-misto-na-sharepointu/" aria-label="Číst více o Microsoft 365 Archive &#8211; jak levně uvolnit místo na Sharepointu">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="347" class="elementor elementor-347" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-db4d767 e-flex e-con-boxed e-con e-parent" data-id="db4d767" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-5b78dcf elementor-widget elementor-widget-text-editor" data-id="5b78dcf" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Poslední dobou nás zákazníci oslovují s tím, že jim dochází místo v jejich Microsoft 365 tenantu a jestli na to nemáme řešení. Jedním z možných řešení může být právě Microsoft 365 Archive, která je součástí řešení <a href="https://www.sraga.cz/microsoft-ai-syntex/" target="_blank" rel="noopener">Microsoft AI Syntex</a>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-e709c59 elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents" data-id="e709c59" 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__e709c59" 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__e709c59" 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__e709c59" class="elementor-toc__body">
			<div class="elementor-toc__spinner-container">
				<svg class="elementor-toc__spinner eicon-animation-spin e-font-icon-svg e-eicon-loading" aria-hidden="true" viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg"><path d="M500 975V858C696 858 858 696 858 500S696 142 500 142 142 304 142 500H25C25 237 238 25 500 25S975 237 975 500 763 975 500 975Z"></path></svg>			</div>
		</div>
						</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-c8b5d8e e-flex e-con-boxed e-con e-parent" data-id="c8b5d8e" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-ffcb2ce elementor-widget elementor-widget-heading" data-id="ffcb2ce" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Jak lze řešit nedostatek místa na Sharepointu</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-37cb169 elementor-widget elementor-widget-text-editor" data-id="37cb169" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud vám dochází místo na Sharepointu, máte vlastně jen 2 možnosti. <strong>Dokoupit další prostor nebo nepotřebná data někam přesunout.</strong> Třeba právě do archivu. Microsoft 365 Archiv umožňuje uvolnit místo na Sharepointu a zároveň zachovat tato nepotřebná data jejich přesunutím do studeného úložiště (tzv. cold storage).</p><p>Když je Sharepoint site archivována, tak už nespotřebovává kvótu úložiště tenantu, ale účtuje se spotřeba v rámci služby Microsoft Azure.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-f0e4770 elementor-alert-warning elementor-widget elementor-widget-alert" data-id="f0e4770" 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">Umístění v archivu znamená, že sharepoint site již není přístupná běžným uživatelům v organizaci.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-a3e1b29 elementor-widget elementor-widget-text-editor" data-id="a3e1b29" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Na všechna archivovaná data se automaticky aplikují stejné politiky zabezpečení či compliance politiky, ale za mnohem nižší cenu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-f3d37e2 elementor-widget elementor-widget-heading" data-id="f3d37e2" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Výhody Microsoft 365 Archive</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-994fe89 elementor-widget elementor-widget-text-editor" data-id="994fe89" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Microsoft slibuje mimořádně <strong>rychlou archivaci sharepoint sites o libovolné velikosti a o libovolném počtu</strong>. Možnost archivace automaticky platí také na týmy v rámci služby Microsoft Teams.</p><p>Při <strong>opětovné aktivaci</strong> (tedy navrácení dat zpět z archivu do sharepointu) jsou <strong>zachována všechna metadata a oprávnění</strong>.</p><p>Při archivaci dochází k fyzickému <strong>oddělení aktivního a neaktivního obsahu</strong>, to znamená, že archivovaná data leží na jiném místě než data aktivní.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-2ab5e09 elementor-alert-success elementor-widget elementor-widget-alert" data-id="2ab5e09" 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">Informace</span>
			
						<span class="elementor-alert-description">Pokud byste měli někdo obavy o to, kde archivovaná data fyzicky leží, tak mám pro vás dobrou zprávu. Vaše data zůstávají v evropské unii.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-b20ff5f elementor-widget elementor-widget-heading" data-id="b20ff5f" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Kapacita tenantu</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-4460925 elementor-widget elementor-widget-text-editor" data-id="4460925" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Předpokládám, že tyto informace čtete právě pro to, že vám dochází místo v úložišti (Sharepoint Online). A víte, jaká je vůbec kapacita vašeho tenantu? Pokud nevíte, tak přesnou informaci najdete v Sharepoint admin centru.</p><p><strong>Kapacitu si ale také můžeze sami jednoduše spočítat.</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-2ef4f8d elementor-icon-list--layout-traditional elementor-list-item-link-full_width elementor-widget elementor-widget-icon-list" data-id="2ef4f8d" data-element_type="widget" data-widget_type="icon-list.default">
				<div class="elementor-widget-container">
							<ul class="elementor-icon-list-items">
							<li class="elementor-icon-list-item">
											<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-plus" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg>						</span>
										<span class="elementor-icon-list-text">Základní kapacita teantu, tedy prostor pro vaše společná data je 1 TB. Vždycky, I když vlastníte jen jednu licenci, která vás opravňuje používat Sharepoint.</span>
									</li>
								<li class="elementor-icon-list-item">
											<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-plus" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg>						</span>
										<span class="elementor-icon-list-text">K tomuto 1 TB si připočtěte dalších 10 GB za každého takto licencovaného uživatele.</span>
									</li>
								<li class="elementor-icon-list-item">
											<span class="elementor-icon-list-icon">
							<svg aria-hidden="true" class="e-font-icon-svg e-fas-plus" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg>						</span>
										<span class="elementor-icon-list-text">A pokud jste si za nekřesťanské peníze dokoupili také dodatečný prostor pro Sharepoint v podobě File storage addonu, tak si tento prostor také připočtěte.</span>
									</li>
						</ul>
						</div>
				</div>
				<div class="elementor-element elementor-element-33374c1 elementor-alert-info elementor-widget elementor-widget-alert" data-id="33374c1" 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">Příklad</span>
			
						<span class="elementor-alert-description">Pokud má vaše organizace 50 uživatelů, vaše kapacita úložiště pro společná data je přibližně 1,5TB.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-736eae5 elementor-widget elementor-widget-text-editor" data-id="736eae5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Každý licencovaný uživatel má ještě svůj &#8222;vlastní&#8220; prostor o velikosti 1 TB. Tento prostor je &#8222;navíc&#8220; a z celkové kapacity tenantu se neodečítá.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-d347ee0 elementor-widget elementor-widget-heading" data-id="d347ee0" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Známá omezení</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-6831864 elementor-widget elementor-widget-text-editor" data-id="6831864" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Co se omezení týče, tak nejdůležitějším omezením je aktuálně to, že tato služba je stále ve verzi Preview. To znamená, že Microsoft ji již poskytuje zákazníkům k otestování, ale <strong>funkcionalita může být omezená nebo se může měnit.</strong></p><p>Ta nejdůležitější omezení tedy jsou:</p><ul><li>Možnost archivovat maximálně 50 000 sharepoint sites. Schválně</li><li>Tím, že data uložená v archivu lze prohledávat pomocí eDiscovery, tak je nyní umožněno také exportovat pomocí eDiscovery rovnou z archivu bez nutnosti reaktivace. Ve veřejně dostupné verzi bude ale reaktivace nutná</li><li>Abyste mohli tenant přejmenovat, musí být všechny archivované sites reaktivovány</li><li>Archivovat lze pouze ty sites, které nejsou zálohovány pomocí služby Microsoft 365 backup. Před archivací tedy zálohu vypněte.</li><li>Před tím, než sharepoint site nebo tým archivujete, odeberte je ze synchronizace pomocí OneDrive klienta. Pokud to neuděláte, klient vyhlásí chybu.</li></ul>								</div>
				</div>
				<div class="elementor-element elementor-element-e74efd1 elementor-widget elementor-widget-heading" data-id="e74efd1" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Kolik služba stojí</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-60ac9db elementor-widget elementor-widget-text-editor" data-id="60ac9db" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>No a konečně to nejdůležitější a to jsou ceny. Za co se vlastně platí.</p><p><strong>Platí se za spotřebu úložiště</strong>. Ta je účtována <strong>měsíční sazbou 0,05 USD za 1 archivovaný GB</strong>.</p><p><em>Spotřeba je účtována pouze tehdy, když archivované úložiště plus aktivní úložiště v aplikaci SharePoint překročí limit kapacity úložiště SharePointu.</em></p><p><em>Jinými slovy, pokud jste v tenantu ještě nevyčerpali kapacitu úložiště, tak nevznikají žádné další náklady na archivované sites.</em></p>								</div>
				</div>
				<div class="elementor-element elementor-element-0a91ddb elementor-alert-info elementor-widget elementor-widget-alert" data-id="0a91ddb" 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">Příklad</span>
			
						<span class="elementor-alert-description">Kapacita vašeho tenantu je 1 TB. Z tohoto 1 TB máte obsazenu polovinu tedy přibližně 500 GB. Dalších 500 GB je neobsazených. Rozhodnete se, že 100 GB dat přesunete do archivu. Nyní máte tedy 400 GB obsazených v aktivním úložišti a 100 GB v archivu. A protože vaše data celkově zabírají půl terabajtu a druhá půlka je volná, nezaplatíte za archivaci nic.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-66e411c elementor-widget elementor-widget-text-editor" data-id="66e411c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Dále jsou zde <strong>poplatky za tzv reaktivaci</strong>, což je navrácení dat z archivu zpět do sharepointu. Reaktivace je zpoplatněna sazbou za obnovený GB.</p><p>Poplatek za reaktivaci je účtován bez ohledu na to, zda je tenant nad nebo pod svým kapacitním limitem služby SharePoint, a je <strong>účtován pouze v případě, že je reaktivace provedena více než sedm dní poté, co byla sharepoint site naposledy uvedena do stavu archivace</strong>.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-87e7cd5 elementor-alert-success elementor-widget elementor-widget-alert" data-id="87e7cd5" 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">Jednoduše</span>
			
						<span class="elementor-alert-description">Pokud reaktivujete do 7 dní od archivace, za reaktivaci neplatíte.

Tato sedmidenní odkladná lhůta poskytuje možnost zvrátit náhodnou archivaci bez dodatečných nákladů.</span>
			
			
		</div>
						</div>
				</div>
				<div class="elementor-element elementor-element-4b5c218 elementor-widget elementor-widget-text-editor" data-id="4b5c218" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Měsíční využití archivu se vypočítá jako součet využití všech aktuálně archivovaných sites. Využití každé site se rovná využití úložiště, které lze zjistit v Centru správy SharePoint.</p><p>Velikost archivované site, a tedy i úložiště, za které se účtuje, se může změnit pouze v případě, že se změní její obsah (například obsah přirozeně vyprší v koši nebo soubory odstraní zásady pro uchovávání dat).</p><p>Tabulka níže vám pomůže si představit úspory, kterých dosáhnete archivací obsahu na základě četnosti a procenta veškerého archivovaného obsahu, který obnovujete.</p><p>Klíčovým poznatkem je, že pokud nereaktivujete více než 30 % dat častěji než dvakrát ročně, dosáhnete největší možné úspory.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-12de783 elementor-widget elementor-widget-image" data-id="12de783" 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/tabulka.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="tabulka" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MzQ5LCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI0XC8wNFwvdGFidWxrYS5wbmcifQ%3D%3D">
							<img loading="lazy" decoding="async" width="525" height="207" src="https://www.sraga.cz/wp-content/uploads/2024/04/tabulka.png" class="attachment-medium_large size-medium_large wp-image-349" alt="Microsoft 365 Archiv - tabulka uspor" srcset="https://www.sraga.cz/wp-content/uploads/2024/04/tabulka.png 525w, https://www.sraga.cz/wp-content/uploads/2024/04/tabulka-300x118.png 300w" sizes="(max-width: 525px) 100vw, 525px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-b83f492 elementor-widget elementor-widget-heading" data-id="b83f492" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Ukázka aktivace služby, provedení archivace a reaktivace</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-b583eac elementor-widget elementor-widget-text-editor" data-id="b583eac" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pro aktivaci Microsoft 365 Archive potřebujete službu <a href="https://www.sraga.cz/microsoft-ai-syntex/" target="_blank" rel="noopener">AI Syntex</a> a tedy potřebujete aktivní Azure předplatné a také předplatné Microsoft 365.</p><p>Více ve videu níže:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-93e124c elementor-widget elementor-widget-video" data-id="93e124c" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/2DR9Nc7G-FU&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-67ff0ab elementor-widget elementor-widget-heading" data-id="67ff0ab" 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-6a6cbdb elementor-widget elementor-widget-text-editor" data-id="6a6cbdb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Možnosti <a href="https://www.sraga.cz/jak-zalohovat-data-v-microsoft-365/" target="_blank" rel="noopener">zálohovat</a> a archivovat data přímo v rámci platformy Microsoft 365 nám dlouho chyběly a museli jsme si pomáhat různými nástroji třetích stran. A i když jsou obě služby zatím ve verzi preview a mají svá omezení, tak jsem přesvědčený o tom, že budou mezi IT profesionály a koncovými zákazníky velmi oblíbenými.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-476fad4 elementor-widget elementor-widget-heading" data-id="476fad4" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Užitečné odkazy</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-817bef3 elementor-widget elementor-widget-text-editor" data-id="817bef3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Scénáře a případy použití pro Microsoft Syntex<br /><a href="https://learn.microsoft.com/en-us/microsoft-365/syntex/archive/archive-overview" target="_blank" rel="noopener">https://learn.microsoft.com/en-us/microsoft-365/syntex/archive/archive-overview</a><br /><a href="https://learn.microsoft.com/en-us/microsoft-365/syntex/archive/archive-pricing" target="_blank" rel="noopener">https://learn.microsoft.com/en-us/microsoft-365/syntex/archive/archive-pricing</a></p><p>Microsoft 365 Backup (Preview)<br /><a href="https://learn.microsoft.com/cs-cz/microsoft-365/syntex/backup/backup-overview" target="_blank" rel="noopener">https://learn.microsoft.com/cs-cz/microsoft-365/syntex/backup/backup-overview</a></p>								</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/microsoft-365-archive-jak-uvolnit-misto-na-sharepointu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Jak zálohovat data v Microsoft 365</title>
		<link>https://www.sraga.cz/jak-zalohovat-data-v-microsoft-365/</link>
					<comments>https://www.sraga.cz/jak-zalohovat-data-v-microsoft-365/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Thu, 04 Apr 2024 13:47:51 +0000</pubDate>
				<category><![CDATA[Microsoft 365]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Microsoft IA Syntex]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<category><![CDATA[Zálohování]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=339</guid>

					<description><![CDATA[Vyzkoušel jsem Microsoft 365 Backup, který je nově součástí Microsoft AI Syntex. Služba Microsoft 365 Backup je v současné době ve fázi tzv. Preview a do organizací se začne zavádět na začátku roku 2024. Microsoft 365 Backup poskytuje moderní možnosti zálohování a obnovení pro SharePoint, Exchange Online a OneDrive pro firmy. Díky Microsoft 365 Backup ... <a title="Jak zálohovat data v Microsoft 365" class="read-more" href="https://www.sraga.cz/jak-zalohovat-data-v-microsoft-365/" aria-label="Číst více o Jak zálohovat data v Microsoft 365">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="339" class="elementor elementor-339" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-5629684 e-flex e-con-boxed e-con e-parent" data-id="5629684" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-20af7b5 elementor-widget elementor-widget-text-editor" data-id="20af7b5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Vyzkoušel jsem Microsoft 365 Backup, který je nově součástí Microsoft AI Syntex. Služba Microsoft 365 Backup je v současné době ve fázi tzv. Preview a do organizací se začne zavádět na začátku roku 2024.</p><p><a href="https://learn.microsoft.com/cs-cz/microsoft-365/syntex/backup/backup-overview" target="_blank" rel="noopener">Microsoft 365 Backup</a> poskytuje moderní možnosti <strong>zálohování a obnovení pro SharePoint, Exchange Online a OneDrive</strong> pro firmy. Díky Microsoft 365 Backup vaše organizace ví, že se váš obsah bezpečně a efektivně zálohuje a dá se obnovit během několika hodin.</p><p>Kolik zálohování stojí, jak jej nastavit, nebo jaké jsou jeho limity? Zkoukněte video.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-3b42cae elementor-widget elementor-widget-video" data-id="3b42cae" data-element_type="widget" data-settings="{&quot;youtube_url&quot;:&quot;https:\/\/youtu.be\/UIilF696iLg&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/jak-zalohovat-data-v-microsoft-365/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
