{"id":7326,"date":"2023-09-25T03:39:04","date_gmt":"2023-09-25T03:39:04","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7326"},"modified":"2024-05-24T05:47:21","modified_gmt":"2024-05-24T05:47:21","slug":"winget-intune","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/winget-intune","title":{"rendered":"Winget Intune Powershell Win32 Apps"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Deploy via User<\/h2>\n\n\n\n<p>Thanks to <a href=\"https:\/\/azurecloudai.blog\/2023\/03\/20\/76277\/\">https:\/\/azurecloudai.blog\/2023\/03\/20\/76277\/<\/a> , this is how to deploy User Apps<\/p>\n\n\n\n<p>Make sure launched at <strong>User<\/strong><\/p>\n\n\n\n<p>cmd \/c winget install -e &#8211;id Microsoft.VisualStudioCode.Insiders &#8211;silent &#8211;force &#8211;accept-package-agreements &#8211;accept-source-agreements<\/p>\n\n\n\n<p>cmd \/c winget uninstall -e &#8211;id Microsoft.VisualStudioCode.Insiders<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">To Deploy Apps as SYSTEM<\/h2>\n\n\n\n<p>No Need to package Individual Files now <a href=\"https:\/\/github.com\/Romanitho\/Winget-Install\">https:\/\/github.com\/Romanitho\/Winget-Install<\/a><\/p>\n\n\n\n<p>Package up the two .ps1 files <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">#install App\n$app_2upgrade = \"TeamViewer.TeamViewer.Host\"\n\ntry{\n$Winget = Get-ChildItem -Path (Join-Path -Path (Join-Path -Path $env:ProgramFiles -ChildPath \"WindowsApps\") -ChildPath \"Microsoft.DesktopAppInstaller*\\winget.exe\")\n\n    # install command\n    &amp;$winget install --exact $app_2upgrade --silent --force --accept-package-agreements --accept-source-agreements\n    exit 0\n\n}catch{\n    Write-Error \"Error while installing upgrade for: $app_2upgrade\"\n    exit 1\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">#uninstall app\n$app_2upgrade = \"TeamViewer.TeamViewer.Host\"\n\ntry{\n$Winget = Get-ChildItem -Path (Join-Path -Path (Join-Path -Path $env:ProgramFiles -ChildPath \"WindowsApps\") -ChildPath \"Microsoft.DesktopAppInstaller*\\winget.exe\")\n\n    # upgrade command\n    &amp;$winget uninstall --exact $app_2upgrade\n    exit 0\n\n}catch{\n    Write-Error \"Error while installing upgrade for: $app_2upgrade\"\n    exit 1\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Install Command <\/p>\n\n\n\n<p>%SystemRoot%\\SysNative\\WindowsPowerShell\\v1.0\\powershell.exe -executionpolicy bypass .\\InstallTeamviewer.ps1<\/p>\n\n\n\n<p>Uninstall Command<\/p>\n\n\n\n<p>%SystemRoot%\\SysNative\\WindowsPowerShell\\v1.0\\powershell.exe -executionpolicy bypass .\\Uninstallteamviewer.ps1<\/p>\n\n\n\n<p>UPGRADE<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/JayRHa\/EndpointAnalyticsRemediationScripts\/tree\/main\/Winget-Update-All\">https:\/\/github.com\/JayRHa\/EndpointAnalyticsRemediationScripts\/tree\/main\/Winget-Update-All<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploy via User Thanks to https:\/\/azurecloudai.blog\/2023\/03\/20\/76277\/ , this is how to deploy User Apps Make sure launched at User cmd \/c winget install -e &#8211;id Microsoft.VisualStudioCode.Insiders &#8211;silent [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7326","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7326"}],"version-history":[{"count":5,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7326\/revisions"}],"predecessor-version":[{"id":7954,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7326\/revisions\/7954"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}