{"id":320948,"date":"2021-04-06T09:01:19","date_gmt":"2021-04-06T09:01:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320948"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2021-04-06T09:01:19","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320948","title":{"rendered":"\u0417\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u043c \u044f\u0440\u043b\u044b\u043a\u0438 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0432 Windows 10 \u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 proof of concept, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e (\u043e\u0442\u043a\u0440\u0435\u043f\u0438\u0442\u044c) \u044f\u0440\u043b\u044b\u043a \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c Windows 10 October 2018 Microsoft \u0431\u0435\u0437 \u0448\u0443\u043c\u0430 \u0437\u0430\u043a\u0440\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a API \u043e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f (\u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f) \u044f\u0440\u043b\u044b\u043a\u043e\u0432 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447: \u043e\u0442\u043d\u044b\u043d\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46c\/148\/b57\/46c148b570e5d2369281118f907b0f88.png\" width=\"649\" height=\"686\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f (\u043e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f) \u044f\u0440\u043b\u044b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u041a\u0430\u043a \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u044f\u0440\u043b\u044b\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c <strong>51201<\/strong>, \u00ab\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435\u00bb, \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>%SystemRoot%\\system32\\shell32.dll<\/strong>.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/www.nirsoft.net\/utils\/resources_extract.html\" rel=\"noopener noreferrer nofollow\">ResourcesExtract<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2bd\/6fb\/8f0\/2bd6fb8f081bec51ffcfbfc66f920229.gif\" width=\"625\" height=\"348\"><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u044f\u0440\u043b\u044b\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\"># Extract a localized string from shell32.dll $Signature = @{ \tNamespace = \"WinAPI\" \tName = \"GetStr\" \tLanguage = \"CSharp\" \tMemberDefinition = @\" [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport(\"user32.dll\", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { \tIntPtr intPtr = GetModuleHandle(\"shell32.dll\"); \tStringBuilder sb = new StringBuilder(255); \tLoadString(intPtr, strId, sb, sb.Capacity); \treturn sb.ToString(); } \"@ }  if (-not (\"WinAPI.GetStr\" -as [type])) { \tAdd-Type @Signature -Using System.Text }  # Pin to Start: 51201 # Unpin from Start: 51394 $LocalizedString = [WinAPI.GetStr]::GetString(51201)  # Trying to pin the Command Prompt shortcut to Start $Target = Get-Item -Path \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\System Tools\\Command Prompt.lnk\" $Shell = New-Object -ComObject Shell.Application $Folder = $Shell.NameSpace($Target.DirectoryName) $file = $Folder.ParseName($Target.Name) $Verb = $File.Verbs() | Where-Object -FilterScript {$_.Name -eq $LocalizedString} $Verb.DoIt()<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/251\/0ee\/ed3\/2510eeed3f9ca6d4be424cef8e5b46c5.png\" width=\"1235\" height=\"681\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/327\/40a\/09e\/32740a09ea1e7e8b415991461d05b9d2.png\" width=\"1235\" height=\"681\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0442\u044f, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, API, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0442\u0434\u0430\u0435\u0442 \u0433\u043b\u0430\u0433\u043e\u043b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u00ab<strong>\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c &amp;\u044d\u043a\u0440\u0430\u043d\u0435<\/strong>\u00bb, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0413\u0434\u0435-\u0442\u043e \u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, Microsoft \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0446\u0435\u043b\u044f\u0445 \u043d\u0435\u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u044f\u0440\u043b\u044b\u043a\u043e\u0432 bloatware. \u0417\u0432\u0443\u0447\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u043b\u0430\u0434\u043d\u043e\u2026<\/p>\n<p>\u042f \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 PowerShell-\u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Windows 10 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/post\/521202\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0418 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0437 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u044f\u0440\u043b\u044b\u043a\u0438. \u0420\u0435\u0447\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0434\u0435\u0442 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0432\u0435\u0434\u044c \u0432 \u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f GPO \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0435\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML. \u041d\u043e \u0434\u0430\u0436\u0435, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f: <strong>Import-StartLayout -LayoutPath &#171;D:\\Layout.xml<\/strong> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u00ab\u041c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430\u00bb (Prevent users from customizing their Start Screen), \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0443\u044e \u0437\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0443 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0435\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0448 \u0445\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043c XML, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u044f\u0440\u043b\u044b\u043a\u0438 (\u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044f\u0440\u043b\u044b\u043a\u0438) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb, \u0447\u0442\u043e\u0431\u044b \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0441\u044f \u0435\u0433\u043e \u043c\u0430\u043a\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0418 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb \u043e\u043f\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f89\/bfc\/9a1\/f89bfc9a17dac992ee3b860438336295.png\" width=\"1235\" height=\"681\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0443\u0430\u043b\u044f! \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0430 \u043b\u0435\u0442\u0443, \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0432 \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u0440\u0438 \u044f\u0440\u043b\u044b\u043a\u0430: \u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b \u0438 PowerShell.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1bb\/d00\/de4\/1bbd00de44fb3e916320d92484c1ef01.png\" width=\"1360\" height=\"762\"><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">&lt;# \t.SYNOPSIS \tConfigure the Start tiles  \t.PARAMETER ControlPanel \tPin the \"Control Panel\" shortcut to Start  \t.PARAMETER DevicesPrinters \tPin the \"Devices &amp; Printers\" shortcut to Start  \t.PARAMETER PowerShell \tPin the \"Windows PowerShell\" shortcut to Start  \t.PARAMETER UnpinAll \tUnpin all the Start tiles  \t.EXAMPLE \t.\\Pin.ps1 -Tiles ControlPanel, DevicesPrinters, PowerShell  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll -Tiles ControlPanel, DevicesPrinters, PowerShell  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll -Tiles ControlPanel  \t.EXAMPLE \t.\\Pin.ps1 -Tiles ControlPanel -UnpinAll  \t.LINK \thttps:\/\/github.com\/farag2\/Windows-10-Sophia-Script  \t.NOTES \tSeparate arguments with comma \tCurrent user #&gt; [CmdletBinding()] param ( \t[Parameter( \t\tMandatory = $false, \t\tPosition = 0 \t)] \t[switch] \t$UnpinAll,  \t[Parameter( \t\tMandatory = $false, \t\tPosition = 1 \t)] \t[ValidateSet(\"ControlPanel\", \"DevicesPrinters\", \"PowerShell\")] \t[string[]] \t$Tiles,  \t[string] \t$StartLayout = \"$PSScriptRoot\\StartLayout.xml\" )  begin { \t# Unpin all the Start tiles \tif ($UnpinAll) \t{ \t\tExport-StartLayout -Path $StartLayout -UseDesktopApplicationID  \t\t[xml]$XML = Get-Content -Path $StartLayout -Encoding UTF8 -Force \t\t$Groups = $XML.LayoutModificationTemplate.DefaultLayoutOverride.StartLayoutCollection.StartLayout.Group  \t\tforeach ($Group in $Groups) \t\t{ \t\t\t# Removing all groups inside XML \t\t\t$Group.ParentNode.RemoveChild($Group) | Out-Null \t\t}  \t\t$XML.Save($StartLayout) \t} }  process { \t# Extract strings from shell32.dll using its' number \t$Signature = @{ \t\tNamespace = \"WinAPI\" \t\tName = \"GetStr\" \t\tLanguage = \"CSharp\" \t\tMemberDefinition = @\" [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport(\"user32.dll\", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { \tIntPtr intPtr = GetModuleHandle(\"shell32.dll\"); \tStringBuilder sb = new StringBuilder(255); \tLoadString(intPtr, strId, sb, sb.Capacity); \treturn sb.ToString(); } \"@ \t}  \tif (-not (\"WinAPI.GetStr\" -as [type])) \t{ \t\tAdd-Type @Signature -Using System.Text \t}  \t# Extract the localized \"Devices and Printers\" string from shell32.dll \t$DevicesPrinters = [WinAPI.GetStr]::GetString(30493)  \t# We need to get the AppID because it's auto generated \t$Script:DevicesPrintersAppID = (Get-StartApps | Where-Object -FilterScript {$_.Name -eq $DevicesPrinters}).AppID  \t$Parameters = @( \t\t# Control Panel hash table \t\t@{ \t\t\t# Special name for Control Panel \t\t\tName = \"ControlPanel\" \t\t\tSize = \"2x2\" \t\t\tColumn = 0 \t\t\tRow = 0 \t\t\tAppID = \"Microsoft.Windows.ControlPanel\" \t\t}, \t\t# \"Devices &amp; Printers\" hash table \t\t@{ \t\t\t# Special name for \"Devices &amp; Printers\" \t\t\tName = \"DevicesPrinters\" \t\t\tSize   = \"2x2\" \t\t\tColumn = 2 \t\t\tRow    = 0 \t\t\tAppID  = $Script:DevicesPrintersAppID \t\t}, \t\t# Windows PowerShell hash table \t\t@{ \t\t\t# Special name for Windows PowerShell \t\t\tName = \"PowerShell\" \t\t\tSize = \"2x2\" \t\t\tColumn = 4 \t\t\tRow = 0 \t\t\tAppID = \"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe\" \t\t} \t)  \t# Valid columns to place tiles in \t$ValidColumns = @(0, 2, 4) \t[string]$StartLayoutNS = \"http:\/\/schemas.microsoft.com\/Start\/2014\/StartLayout\"  \t# Add pre-configured hastable to XML \tfunction Add-Tile \t{ \t\tparam \t\t( \t\t\t[string] \t\t\t$Size,  \t\t\t[int] \t\t\t$Column,  \t\t\t[int] \t\t\t$Row,  \t\t\t[string] \t\t\t$AppID \t\t)  \t\t[string]$elementName = \"start:DesktopApplicationTile\" \t\t[Xml.XmlElement]$Table = $xml.CreateElement($elementName, $StartLayoutNS) \t\t$Table.SetAttribute(\"Size\", $Size) \t\t$Table.SetAttribute(\"Column\", $Column) \t\t$Table.SetAttribute(\"Row\", $Row) \t\t$Table.SetAttribute(\"DesktopApplicationID\", $AppID)  \t\t$Table \t}  \tif (-not (Test-Path -Path $StartLayout)) \t{ \t\t# Export the current Start layout \t\tExport-StartLayout -Path $StartLayout -UseDesktopApplicationID \t}  \t[xml]$XML = Get-Content -Path $StartLayout -Encoding UTF8 -Force  \tforeach ($Tile in $Tiles) \t{ \t\tswitch ($Tile) \t\t{ \t\t\tControlPanel \t\t\t{ \t\t\t\t$ControlPanel = [WinAPI.GetStr]::GetString(12712) \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f $ControlPanel) -Verbose \t\t\t} \t\t\tDevicesPrinters \t\t\t{ \t\t\t\t$DevicesPrinters = [WinAPI.GetStr]::GetString(30493) \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f $DevicesPrinters) -Verbose  \t\t\t\t# Create the old-style \"Devices and Printers\" shortcut in the Start menu \t\t\t\t$Shell = New-Object -ComObject Wscript.Shell \t\t\t\t$Shortcut = $Shell.CreateShortcut(\"$env:APPDATA\\Microsoft\\Windows\\Start menu\\Programs\\System Tools\\$DevicesPrinters.lnk\") \t\t\t\t$Shortcut.TargetPath = \"control\" \t\t\t\t$Shortcut.Arguments = \"printers\" \t\t\t\t$Shortcut.IconLocation = \"$env:SystemRoot\\system32\\DeviceCenter.dll\" \t\t\t\t$Shortcut.Save()  \t\t\t\tStart-Sleep -Seconds 3 \t\t\t} \t\t\tPowerShell \t\t\t{ \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f \"Windows PowerShell\") -Verbose \t\t\t} \t\t}  \t\t$Parameter = $Parameters | Where-Object -FilterScript {$_.Name -eq $Tile} \t\t$Group = $XML.LayoutModificationTemplate.DefaultLayoutOverride.StartLayoutCollection.StartLayout.Group | Where-Object -FilterScript {$_.Name -eq \"Sophia Script\"}  \t\t# If the \"Sophia Script\" group exists in Start \t\tif ($Group) \t\t{ \t\t\t$DesktopApplicationID = ($Parameters | Where-Object -FilterScript {$_.Name -eq $Tile}).AppID  \t\t\tif (-not ($Group.DesktopApplicationTile | Where-Object -FilterScript {$_.DesktopApplicationID -eq $DesktopApplicationID})) \t\t\t{ \t\t\t\t# Calculate current filled columns \t\t\t\t$CurrentColumns = @($Group.DesktopApplicationTile.Column) \t\t\t\t# Calculate current free columns and take the first one \t\t\t\t$Column = (Compare-Object -ReferenceObject $ValidColumns -DifferenceObject $CurrentColumns).InputObject | Select-Object -First 1 \t\t\t\t# If filled cells contain desired ones assign the first free column \t\t\t\tif ($CurrentColumns -contains $Parameter.Column) \t\t\t\t{ \t\t\t\t\t$Parameter.Column = $Column \t\t\t\t} \t\t\t\t$Group.AppendChild((Add-Tile @Parameter)) | Out-Null \t\t\t} \t\t} \t\telse \t\t{ \t\t\t# Create the \"Sophia Script\" group \t\t\t[Xml.XmlElement]$Group = $XML.CreateElement(\"start:Group\", $StartLayoutNS) \t\t\t$Group.SetAttribute(\"Name\",\"Sophia Script\") \t\t\t$Group.AppendChild((Add-Tile @Parameter)) | Out-Null \t\t\t$XML.LayoutModificationTemplate.DefaultLayoutOverride.StartLayoutCollection.StartLayout.AppendChild($Group) | Out-Null \t\t} \t}  \t$XML.Save($StartLayout) }  end { \t# Temporarily disable changing the Start menu layout \tif (-not (Test-Path -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer)) \t{ \t\tNew-Item -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer -Force \t} \tNew-ItemProperty -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer -Name LockedStartLayout -Value 1 -Force \tNew-ItemProperty -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer -Name StartLayoutFile -Value $StartLayout -Force  \tStart-Sleep -Seconds 3  \t# Restart the Start menu \tStop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore  \tStart-Sleep -Seconds 3  \t# Open the Start menu to load the new layout \t$wshell = New-Object -ComObject WScript.Shell \t$wshell.SendKeys(\"^{ESC}\")  \tStart-Sleep -Seconds 3  \t# Enable changing the Start menu layout \tRemove-ItemProperty -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer -Name LockedStartLayout -Force -ErrorAction Ignore \tRemove-ItemProperty -Path HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer -Name StartLayoutFile -Force -ErrorAction Ignore  \tRemove-Item -Path $StartLayout -Force  \tStop-Process -Name StartMenuExperienceHost -Force -ErrorAction Ignore  \tStart-Sleep -Seconds 3  \t# Open the Start menu to load the new layout \t$wshell = New-Object -ComObject WScript.Shell \t$wshell.SendKeys(\"^{ESC}\") }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 GitHub <a href=\"https:\/\/github.com\/farag2\/Windows-10-Sophia-Script\" rel=\"noopener noreferrer nofollow\">Windows 10 Sophia Script<\/a>, \u0433\u0434\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<p>\u041e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e iNNOKENTIY21 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/550948\/\"> https:\/\/habr.com\/ru\/post\/550948\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 proof of concept, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e (\u043e\u0442\u043a\u0440\u0435\u043f\u0438\u0442\u044c) \u044f\u0440\u043b\u044b\u043a \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c Windows 10 October 2018 Microsoft \u0431\u0435\u0437 \u0448\u0443\u043c\u0430 \u0437\u0430\u043a\u0440\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u043a API \u043e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f (\u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f) \u044f\u0440\u043b\u044b\u043a\u043e\u0432 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447: \u043e\u0442\u043d\u044b\u043d\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f (\u043e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f) \u044f\u0440\u043b\u044b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u041a\u0430\u043a \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u043a\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u044f\u0440\u043b\u044b\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c <strong>51201<\/strong>, \u00ab\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435\u00bb, \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>%SystemRoot%\\system32\\shell32.dll<\/strong>.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/www.nirsoft.net\/utils\/resources_extract.html\" rel=\"noopener noreferrer nofollow\">ResourcesExtract<\/a>.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u044f\u0440\u043b\u044b\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\"># Extract a localized string from shell32.dll $Signature = @{ \tNamespace = \"WinAPI\" \tName = \"GetStr\" \tLanguage = \"CSharp\" \tMemberDefinition = @\" [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport(\"user32.dll\", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { \tIntPtr intPtr = GetModuleHandle(\"shell32.dll\"); \tStringBuilder sb = new StringBuilder(255); \tLoadString(intPtr, strId, sb, sb.Capacity); \treturn sb.ToString(); } \"@ }  if (-not (\"WinAPI.GetStr\" -as [type])) { \tAdd-Type @Signature -Using System.Text }  # Pin to Start: 51201 # Unpin from Start: 51394 $LocalizedString = [WinAPI.GetStr]::GetString(51201)  # Trying to pin the Command Prompt shortcut to Start $Target = Get-Item -Path \"$env:APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\System Tools\\Command Prompt.lnk\" $Shell = New-Object -ComObject Shell.Application $Folder = $Shell.NameSpace($Target.DirectoryName) $file = $Folder.ParseName($Target.Name) $Verb = $File.Verbs() | Where-Object -FilterScript {$_.Name -eq $LocalizedString} $Verb.DoIt()<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0425\u043e\u0442\u044f, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, API, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0442\u0434\u0430\u0435\u0442 \u0433\u043b\u0430\u0433\u043e\u043b \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e \u00ab<strong>\u0417\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c &amp;\u044d\u043a\u0440\u0430\u043d\u0435<\/strong>\u00bb, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0413\u0434\u0435-\u0442\u043e \u0447\u0438\u0442\u0430\u043b, \u0447\u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, Microsoft \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0446\u0435\u043b\u044f\u0445 \u043d\u0435\u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u044f\u0440\u043b\u044b\u043a\u043e\u0432 bloatware. \u0417\u0432\u0443\u0447\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u043b\u0430\u0434\u043d\u043e\u2026<\/p>\n<p>\u042f \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0439 PowerShell-\u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0442\u043e\u043d\u043a\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Windows 10 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/post\/521202\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0418 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0437 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u044f\u0440\u043b\u044b\u043a\u0438. \u0420\u0435\u0447\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0434\u0435\u0442 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0432\u0435\u0434\u044c \u0432 \u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f GPO \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0435\u0442\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML. \u041d\u043e \u0434\u0430\u0436\u0435, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f: <strong>Import-StartLayout -LayoutPath &#171;D:\\Layout.xml<\/strong> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043a\u0435\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u0430\u043d\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u00ab\u041c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430\u00bb (Prevent users from customizing their Start Screen), \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0443\u044e \u0437\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0443 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0435\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0448 \u0445\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043c XML, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u044f\u0440\u043b\u044b\u043a\u0438 (\u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044f\u0440\u043b\u044b\u043a\u0438) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c;<\/p>\n<\/li>\n<li>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb;<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb, \u0447\u0442\u043e\u0431\u044b \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0441\u044f \u0435\u0433\u043e \u043c\u0430\u043a\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0418 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u043d\u044e \u00ab\u041f\u0443\u0441\u043a\u00bb \u043e\u043f\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0443\u0430\u043b\u044f! \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0430 \u043b\u0435\u0442\u0443, \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0432 \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u0440\u0438 \u044f\u0440\u043b\u044b\u043a\u0430: \u041f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b \u0438 PowerShell.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">&lt;# \t.SYNOPSIS \tConfigure the Start tiles  \t.PARAMETER ControlPanel \tPin the \"Control Panel\" shortcut to Start  \t.PARAMETER DevicesPrinters \tPin the \"Devices &amp; Printers\" shortcut to Start  \t.PARAMETER PowerShell \tPin the \"Windows PowerShell\" shortcut to Start  \t.PARAMETER UnpinAll \tUnpin all the Start tiles  \t.EXAMPLE \t.\\Pin.ps1 -Tiles ControlPanel, DevicesPrinters, PowerShell  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll -Tiles ControlPanel, DevicesPrinters, PowerShell  \t.EXAMPLE \t.\\Pin.ps1 -UnpinAll -Tiles ControlPanel  \t.EXAMPLE \t.\\Pin.ps1 -Tiles ControlPanel -UnpinAll  \t.LINK \thttps:\/\/github.com\/farag2\/Windows-10-Sophia-Script  \t.NOTES \tSeparate arguments with comma \tCurrent user #&gt; [CmdletBinding()] param ( \t[Parameter( \t\tMandatory = $false, \t\tPosition = 0 \t)] \t[switch] \t$UnpinAll,  \t[Parameter( \t\tMandatory = $false, \t\tPosition = 1 \t)] \t[ValidateSet(\"ControlPanel\", \"DevicesPrinters\", \"PowerShell\")] \t[string[]] \t$Tiles,  \t[string] \t$StartLayout = \"$PSScriptRoot\\StartLayout.xml\" )  begin { \t# Unpin all the Start tiles \tif ($UnpinAll) \t{ \t\tExport-StartLayout -Path $StartLayout -UseDesktopApplicationID  \t\t[xml]$XML = Get-Content -Path $StartLayout -Encoding UTF8 -Force \t\t$Groups = $XML.LayoutModificationTemplate.DefaultLayoutOverride.StartLayoutCollection.StartLayout.Group  \t\tforeach ($Group in $Groups) \t\t{ \t\t\t# Removing all groups inside XML \t\t\t$Group.ParentNode.RemoveChild($Group) | Out-Null \t\t}  \t\t$XML.Save($StartLayout) \t} }  process { \t# Extract strings from shell32.dll using its' number \t$Signature = @{ \t\tNamespace = \"WinAPI\" \t\tName = \"GetStr\" \t\tLanguage = \"CSharp\" \t\tMemberDefinition = @\" [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto)] public static extern IntPtr GetModuleHandle(string lpModuleName); [DllImport(\"user32.dll\", CharSet = CharSet.Auto)] internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); public static string GetString(uint strId) { \tIntPtr intPtr = GetModuleHandle(\"shell32.dll\"); \tStringBuilder sb = new StringBuilder(255); \tLoadString(intPtr, strId, sb, sb.Capacity); \treturn sb.ToString(); } \"@ \t}  \tif (-not (\"WinAPI.GetStr\" -as [type])) \t{ \t\tAdd-Type @Signature -Using System.Text \t}  \t# Extract the localized \"Devices and Printers\" string from shell32.dll \t$DevicesPrinters = [WinAPI.GetStr]::GetString(30493)  \t# We need to get the AppID because it's auto generated \t$Script:DevicesPrintersAppID = (Get-StartApps | Where-Object -FilterScript {$_.Name -eq $DevicesPrinters}).AppID  \t$Parameters = @( \t\t# Control Panel hash table \t\t@{ \t\t\t# Special name for Control Panel \t\t\tName = \"ControlPanel\" \t\t\tSize = \"2x2\" \t\t\tColumn = 0 \t\t\tRow = 0 \t\t\tAppID = \"Microsoft.Windows.ControlPanel\" \t\t}, \t\t# \"Devices &amp; Printers\" hash table \t\t@{ \t\t\t# Special name for \"Devices &amp; Printers\" \t\t\tName = \"DevicesPrinters\" \t\t\tSize   = \"2x2\" \t\t\tColumn = 2 \t\t\tRow    = 0 \t\t\tAppID  = $Script:DevicesPrintersAppID \t\t}, \t\t# Windows PowerShell hash table \t\t@{ \t\t\t# Special name for Windows PowerShell \t\t\tName = \"PowerShell\" \t\t\tSize = \"2x2\" \t\t\tColumn = 4 \t\t\tRow = 0 \t\t\tAppID = \"{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\WindowsPowerShell\\v1.0\\powershell.exe\" \t\t} \t)  \t# Valid columns to place tiles in \t$ValidColumns = @(0, 2, 4) \t[string]$StartLayoutNS = \"http:\/\/schemas.microsoft.com\/Start\/2014\/StartLayout\"  \t# Add pre-configured hastable to XML \tfunction Add-Tile \t{ \t\tparam \t\t( \t\t\t[string] \t\t\t$Size,  \t\t\t[int] \t\t\t$Column,  \t\t\t[int] \t\t\t$Row,  \t\t\t[string] \t\t\t$AppID \t\t)  \t\t[string]$elementName = \"start:DesktopApplicationTile\" \t\t[Xml.XmlElement]$Table = $xml.CreateElement($elementName, $StartLayoutNS) \t\t$Table.SetAttribute(\"Size\", $Size) \t\t$Table.SetAttribute(\"Column\", $Column) \t\t$Table.SetAttribute(\"Row\", $Row) \t\t$Table.SetAttribute(\"DesktopApplicationID\", $AppID)  \t\t$Table \t}  \tif (-not (Test-Path -Path $StartLayout)) \t{ \t\t# Export the current Start layout \t\tExport-StartLayout -Path $StartLayout -UseDesktopApplicationID \t}  \t[xml]$XML = Get-Content -Path $StartLayout -Encoding UTF8 -Force  \tforeach ($Tile in $Tiles) \t{ \t\tswitch ($Tile) \t\t{ \t\t\tControlPanel \t\t\t{ \t\t\t\t$ControlPanel = [WinAPI.GetStr]::GetString(12712) \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f $ControlPanel) -Verbose \t\t\t} \t\t\tDevicesPrinters \t\t\t{ \t\t\t\t$DevicesPrinters = [WinAPI.GetStr]::GetString(30493) \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f $DevicesPrinters) -Verbose  \t\t\t\t# Create the old-style \"Devices and Printers\" shortcut in the Start menu \t\t\t\t$Shell = New-Object -ComObject Wscript.Shell \t\t\t\t$Shortcut = $Shell.CreateShortcut(\"$env:APPDATA\\Microsoft\\Windows\\Start menu\\Programs\\System Tools\\$DevicesPrinters.lnk\") \t\t\t\t$Shortcut.TargetPath = \"control\" \t\t\t\t$Shortcut.Arguments = \"printers\" \t\t\t\t$Shortcut.IconLocation = \"$env:SystemRoot\\system32\\DeviceCenter.dll\" \t\t\t\t$Shortcut.Save()  \t\t\t\tStart-Sleep -Seconds 3 \t\t\t} \t\t\tPowerShell \t\t\t{ \t\t\t\tWrite-Verbose -Message (\"The `\"{0}`\" shortcut is being pinned to Start\" -f \"Windows PowerShell\") -Verbose \t\t\t} \t\t}  \t\t$Parameter = $Parameters | Where-Object -FilterScript {$_.Name -eq $Tile} \t\t$Group = $XML.LayoutModificationTemplate.DefaultLayoutOverride.StartLayoutCollection.StartLayout.Group | Where-Object -FilterScript {$_.Name -eq \"Sophia Script\"}  \t\t# If the \"Sophia Script\" group exists in Start \t\tif ($Group) \t\t{ \t\t\t$DesktopApplicationID = ($Parameters | Where-Object -FilterScript {$_.Name -eq $Tile}).AppID  \t\t\tif (-not ($Group.DesktopApplicationTile | Where-Object -FilterScript {$_.DesktopApplicationID -eq $DesktopApplicationID})) \t\t\t{ \t\t\t\t# Calculate current filled columns \t\t\t\t$CurrentColumns = @($Group.DesktopApplicationTile.Column) \t\t\t\t# Calculate current free columns and take the first one \t\t\t\t$Column = (Compare-Object -ReferenceObject $ValidColumns<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320948","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320948"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320948\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}