使用powershell更改文件夹属性 [英] Change folder attribute using powershell

查看:152
本文介绍了使用powershell更改文件夹属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我的C:\有一个隐藏文件夹。



我想要将文件夹属性更改为ReadOnly。



请帮助我。



我尝试过:



Set-ItemProperty -Path$ Directory_Path $ Directory-Name attributes -Value((Get-ItemProperty$ Directory_Path $目录)。attributes -bxor([io.fileattributes] :: Normal))

Hi all

I have a hidden folder at my C:\.

I want to change the folder attribute to ReadOnly.

Please help me on this.

What I have tried:

Set-ItemProperty -Path "$Directory_Path$Directory" -Name attributes -Value ((Get-ItemProperty "$Directory_Path$Directory").attributes -bxor ([io.fileattributes]::Normal))

推荐答案

Directory_Path
Directory_Path


目录 - 名称属性-Value((Get-ItemProperty
Directory" -Name attributes -Value ((Get-ItemProperty "


Directory_Path
Directory_Path


这篇关于使用powershell更改文件夹属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆