{"id":829,"date":"2022-07-19T16:04:31","date_gmt":"2022-07-19T14:04:31","guid":{"rendered":"https:\/\/alessandromasciadri.com\/?p=829"},"modified":"2022-07-19T16:41:11","modified_gmt":"2022-07-19T14:41:11","slug":"come-svuotare-lo-spooler-di-stampa-con-powershell","status":"publish","type":"post","link":"https:\/\/alessandromasciadri.com\/come-svuotare-lo-spooler-di-stampa-con-powershell\/","title":{"rendered":"Come svuotare lo spooler di stampa con PowerShell"},"content":{"rendered":"\t\t<div data-akihiro-type=\"ama-post\" data-akihiro-id=\"829\" class=\"akihiro akihiro-829\" data-akihiro-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"akihiro-section akihiro-top-section akihiro-element akihiro-element-baeadf3 akihiro-section-boxed akihiro-section-height-default akihiro-section-height-default\" data-id=\"baeadf3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"akihiro-container akihiro-column-gap-default\">\n\t\t\t\t\t<div class=\"akihiro-column akihiro-col-100 akihiro-top-column akihiro-element akihiro-element-ed93932\" data-id=\"ed93932\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"akihiro-widget-wrap akihiro-element-populated\">\n\t\t\t\t\t\t<div class=\"akihiro-element akihiro-element-9db8f59 akihiro-widget akihiro-widget-text-editor\" data-id=\"9db8f59\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Lo scenario \u00e8 semplice: stampante di rete collegata ad un Print Server Windows. Lanciamo le stampe e non ne vogliono sapere di uscire dalla stampante. In <a href=\"https:\/\/alessandromasciadri.com\/come-avviare-arrestare-e-riavviare-servizi-con-powershell\/\">questo articolo<\/a> potete trovare come riavviare un servizio di Windows (tra cui lo spooler di stampa) utilizzando PowerShell, ma potrebbe a volte non essere sufficiente.<\/p><p>Nel caso in cui il riavvio dello spooler di stampa non dovesse essere risolutivo si pu\u00f2 provare a svuotare la coda di stampa. Vediamo come procedere.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-e2301ed akihiro-widget akihiro-widget-heading\" data-id=\"e2301ed\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h4 class=\"akihiro-heading-title akihiro-size-default\">Arrestare lo spooler di stampa<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-7ffe03b akihiro-widget akihiro-widget-text-editor\" data-id=\"7ffe03b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Come prima cosa procediamo con l&#8217;arresto del servizio Spooler di stampa.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-c15e822 akihiro-widget akihiro-widget-code-highlight\" data-id=\"c15e822\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>Stop-Service -Name Spooler -Force<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-9155741 akihiro-widget akihiro-widget-heading\" data-id=\"9155741\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h4 class=\"akihiro-heading-title akihiro-size-default\">Backup della coda di stampa<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-1a7f0a7 akihiro-widget akihiro-widget-text-editor\" data-id=\"1a7f0a7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Questo comando \u00e8 facoltativo, serve per eseguire il backup dei file presenti nella coda di stampa. Eseguirlo solo se interessati a ripristinarli successivamente.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-040a42d akihiro-widget akihiro-widget-code-highlight\" data-id=\"040a42d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>Move-Item -Path \"$env:SystemRoot\\System32\\spool\\PRINTERS\\*.*\" -Destination<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-d4b67e2 akihiro-widget akihiro-widget-heading\" data-id=\"d4b67e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h4 class=\"akihiro-heading-title akihiro-size-default\">Pulizia della coda di stampa<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-bcd59ff akihiro-widget akihiro-widget-text-editor\" data-id=\"bcd59ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Con questo comando ripuliamo la coda di stampa<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-f99dfee akihiro-widget akihiro-widget-code-highlight\" data-id=\"f99dfee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>Remove-Item -Path \"$env:SystemRoot\\System32\\spool\\PRINTERS\\*.*\" -Destination<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-00e4b0c akihiro-widget akihiro-widget-heading\" data-id=\"00e4b0c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h4 class=\"akihiro-heading-title akihiro-size-default\">Avviare lo spooler di stampa<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-a07aa29 akihiro-widget akihiro-widget-code-highlight\" data-id=\"a07aa29\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>Start-Service -Name Spooler<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Lo scenario \u00e8 semplice: stampante di rete collegata ad un Print Server Windows. Lanciamo le stampe e non ne vogliono sapere di uscire dalla stampante. In questo articolo potete trovare come riavviare un servizio di Windows (tra cui lo spooler di stampa) utilizzando PowerShell, ma potrebbe a volte non essere sufficiente. Nel caso in cui [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[26,25],"class_list":["post-829","post","type-post","status-publish","format-standard","hentry","category-sistemistica","tag-powershell","tag-windows"],"_links":{"self":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":11,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/829\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/829\/revisions\/840"}],"wp:attachment":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}