Logo Vibhu Bhatnagar — PowerShell & Infrastructure Engineer
  • Home
  • About
  • Skills
  • Experiences
  • More
    Education Projects PowerShell Modules Articles Recent Posts Accomplishments
  • Posts
  • Notes
  • Hire Me
  • GitHub
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • Active Directory
  • AI
  • AI Tools
  • Automation
  • Azure AD
  • Design Systems
  • Developer Tools
  • GPO
  • Intune
  • MCP
  • Module
  • MSP
  • PowerShell
  • Printers
  • RDP
  • Registry
  • Remote Management
  • RMM
  • Sysadmin
  • SYSTEM
  • Windows
  • Windows Administration
  • WinRM
Hero Image
Delete Stubborn Files and Folders on Windows

What This Covers You have a file or folder that won’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. Before You Start Run everything as Administrator — right-click CMD or PowerShell → Run as administrator Set the path variable at the top of each method — everything else uses it This is irreversible. Double-check the path before you run anything These methods bypass permission locks — use only on files you own or manage Steps Method 1: Command Prompt set TARGET=C:\path\to\locked-folder takeown /F %TARGET% /R /A icacls %TARGET% /grant Administrators:F /T rd /S /Q %TARGET% For a single file, replace the last line with:

  • PowerShell
  • Windows
  • Windows Administration
Tuesday, April 28, 2026 | 4 minutes Read
Hero Image
Automating PowerShell Remoting Setup with Enable-VBPsremoting

Overview Managing systems across a network can be time-consuming, especially when dealing with multiple servers or workstations. PowerShell Remoting is a game-changer for system administrators — it allows you to execute commands and scripts on remote machines directly from your admin workstation. 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’s even more configuration.

  • PowerShell
  • Remote Management
  • Windows Administration
  • Automation
  • WinRM
  • RDP
Wednesday, April 22, 2026 | 6 minutes Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
  • PowerShell Modules
  • Articles
  • Recent Posts
  • Accomplishments
  • GitHub
Contact me:
  • vibhu@pwsh.in
  • Vibhu2
  • Vibhu Bhatnagar
  • +91 8979989222

Liability Notice: The views and opinions expressed on this blog are my own and do not represent those of my employer. All content is provided for informational purposes only.


Toha Theme Logo Toha
© 2026 Vibhu Bhatnagar. All rights reserved.
Powered by Hugo Logo