用户工具

站点工具


网络安全:powershell常用命令

执行ps1文件

PowerShell.exe -executionpolicy Bypass -nop -file c:\windows\temp\a.ps1

修改文件时间戳

Windows下没有直接的命令行可以修改文件的时间戳,可以使用API接口中的SetFileTime。
但显然这个方法并不实用,但可以使用powershell命令轻松完成。

## 创建时间
$(Get-Item webshell.asp).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
## 最后访问时间
$(Get-Item wehshell.aspx).lastaccesstime=$(Get-Date "03/30/2011 11:59 am")
## 最后修改时间
$(Get-Item webshell.php).lastwritetime=$(Get-Date)



你需要登录发表评论。
网络安全/powershell常用命令.txt · 最后更改: 2020/05/16 19:19 (外部编辑)

页面工具