Back home
中文
H7 / SECURITY RESEARCH NOTES

Setting a File or Directory's Attributes to Hidden with PowerShell

Environment

IPHOSTNAMENOTE
10.10.10.88win10_dqyLab host

Reproduction Process

Set a file as hidden

  • As shown, a test.txt file exists in the E:\test directory.

  • Set the file's attributes to hidden through PowerShell:
$file_path = "e:\test\test.txt";
$File = Get-Item $file_path -Force;
$File.attributes = 'Hidden';