{"id":646,"date":"2024-07-16T17:22:17","date_gmt":"2024-07-16T15:22:17","guid":{"rendered":"http:\/\/gbiondi.tech2.it\/?p=646"},"modified":"2026-01-17T18:50:37","modified_gmt":"2026-01-17T17:50:37","slug":"make-sure-that-any-services-that-have-a-space-in-their-path-are-enclosed-in-quotes","status":"publish","type":"post","link":"http:\/\/gbiondi.tech2.it\/index.php\/2024\/07\/16\/make-sure-that-any-services-that-have-a-space-in-their-path-are-enclosed-in-quotes\/","title":{"rendered":"Make sure that any services that have a space in their path are enclosed in quotes"},"content":{"rendered":"\n<p>Con Windows 11 il wmic non funziona dunque apri una powershell con diritti amministrativi e incolla questo script:<\/p>\n\n\n\n<p>Get-CimInstance Win32_Service | ForEach-Object {<br>$path = $_.PathName<br>if ($path -match &#8216; &#8216; -and $path -notmatch &#8216;^&#8221;.*&#8221;$&#8217;) {<br>[PSCustomObject]@{<br>Name = $_.Name<br>PathName = $path<br>}<br>}<br>} | Format-Table -AutoSize<\/p>\n\n\n\n<p>Dovresti vedere un output di questo tipo: si vede bene chi ha spazi nella path senza avere le &#8216;virgolette&#8217;<\/p>\n\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color has-small-font-size wp-elements-c1d3200eb420c962905ba4e776d5d8bb\">ProfSvc C:\\Windows\\system32\\svchost.exe -k UserProfileService -p<br>PushToInstall C:\\Windows\\System32\\svchost.exe -k netsvcs -p<br><strong>QNAPQVPNConnectionService C:\\Program Files (x86)\\QNAP\\QVPN\\QVPNConnectionTool.exe<\/strong><br>QWAVE C:\\Windows\\system32\\svchost.exe -k LocalServiceAndNoImpersonation -p<br>RasAuto C:\\Windows\\System32\\svchost.exe -k netsvcs -p<br>RasMan C:\\Windows\\System32\\svchost.exe -k netsvcs<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Con Windows 11 il wmic non funziona dunque apri una powershell con diritti amministrativi e incolla questo script: Get-CimInstance Win32_Service | ForEach-Object {$path = $_.PathNameif ($path -match &#8216; &#8216; -and $path -notmatch &#8216;^&#8221;.*&#8221;$&#8217;) {[PSCustomObject]@{Name = $_.NamePathName = $path}}} | Format-Table -AutoSize Dovresti vedere un output di questo tipo: si vede bene chi ha spazi nella &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/gbiondi.tech2.it\/index.php\/2024\/07\/16\/make-sure-that-any-services-that-have-a-space-in-their-path-are-enclosed-in-quotes\/\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;Make sure that any services that have a space in their path are enclosed in quotes&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-646","post","type-post","status-publish","format-standard","hentry","category-tecnica"],"_links":{"self":[{"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/posts\/646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/comments?post=646"}],"version-history":[{"count":2,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/posts\/646\/revisions"}],"predecessor-version":[{"id":648,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/posts\/646\/revisions\/648"}],"wp:attachment":[{"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/media?parent=646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/categories?post=646"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gbiondi.tech2.it\/index.php\/wp-json\/wp\/v2\/tags?post=646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}