<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Windows Administration on Vibhu Bhatnagar — PowerShell &amp; Infrastructure Engineer</title><link>https://pwsh.in/tags/windows-administration/</link><description>Recent content in Windows Administration on Vibhu Bhatnagar — PowerShell &amp; Infrastructure Engineer</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 28 Apr 2026 04:52:05 +0530</lastBuildDate><atom:link href="https://pwsh.in/tags/windows-administration/index.xml" rel="self" type="application/rss+xml"/><item><title>Delete Stubborn Files and Folders on Windows</title><link>https://pwsh.in/posts/delete-stubborn-files-folders/</link><pubDate>Tue, 28 Apr 2026 04:52:05 +0530</pubDate><guid>https://pwsh.in/posts/delete-stubborn-files-folders/</guid><description>&lt;h2 id="what-this-covers">What This Covers&lt;/h2>
&lt;p>You have a file or folder that won&amp;rsquo;t delete — Access Denied, locked by the system, or held open by a running process. This covers three methods to force-delete it: Command Prompt, PowerShell, and scheduling deletion at next boot using Task Scheduler with SYSTEM rights.&lt;/p>
&lt;h2 id="before-you-start">Before You Start&lt;/h2>
&lt;ul>
&lt;li>Run everything as &lt;strong>Administrator&lt;/strong> — right-click CMD or PowerShell → Run as administrator&lt;/li>
&lt;li>Set the path variable at the top of each method — everything else uses it&lt;/li>
&lt;li>This is irreversible. Double-check the path before you run anything&lt;/li>
&lt;li>These methods bypass permission locks — use only on files you own or manage&lt;/li>
&lt;/ul>
&lt;h2 id="steps">Steps&lt;/h2>
&lt;h3 id="method-1-command-prompt">Method 1: Command Prompt&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cmd" data-lang="cmd">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">set&lt;/span> TARGET=C:\path\to\locked-folder
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>takeown /F %TARGET% /R /A
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>icacls %TARGET% /grant Administrators:F /T
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">rd&lt;/span> /S /Q %TARGET%
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>For a single file, replace the last line with:&lt;/em>&lt;/p></description></item><item><title>Automating PowerShell Remoting Setup with Enable-VBPsremoting</title><link>https://pwsh.in/posts/enable-vbpsremoting/</link><pubDate>Wed, 22 Apr 2026 14:30:00 +0530</pubDate><guid>https://pwsh.in/posts/enable-vbpsremoting/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>Managing systems across a network can be time-consuming, especially when dealing with multiple servers or workstations. &lt;strong>PowerShell Remoting&lt;/strong> is a game-changer for system administrators — it allows you to execute commands and scripts on remote machines directly from your admin workstation.&lt;/p>
&lt;p>However, setting up remoting manually involves several steps: enabling the WinRM service, configuring Windows Firewall rules, and managing trusted hosts. And if you also want to enable Remote Desktop, that&amp;rsquo;s even more configuration.&lt;/p></description></item></channel></rss>