![](https://img-blog.csdnimg.cn/bc606f7743fa44c991adeacd25a24257.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
powershell
powershell
Purvis_U
毕业于xxxx学校.
展开
-
powershell脚本静默卸载软件
powershell脚本卸载软件原创 2022-04-03 15:56:35 · 5080 阅读 · 0 评论 -
powershell 收集电脑中所有文件名及路径写入文本文档
目的收集电脑各个盘符的文件名及路径思路1.首先遍历每个盘符,获取每个盘符的名称2.针对单个盘符获取文件名3.遍历每个盘符获取文件名及路径存入文本文档中powershell命令#创建文本文档用来存放文件路径$log = "d:\$env:computername.txt"if(Test-Path $log) { Remove-Item -Force $log } New-Item -Force $log#获取单个磁盘的所有文件function Get原创 2022-04-03 15:09:54 · 2104 阅读 · 0 评论 -
使用powershell清理Google浏览器缓存、密码凭证、cookies等
脚本如下:#-------------------获取登录的用户名--------------------$user_name=$env:USERNAME#-------------------google--------------------$googleprocess=Get-Process | Where-Object name -like chrome$googlepath="C:\Users\$user_name\AppData\Local\Google\Chrome\User Da原创 2021-04-04 00:09:38 · 1871 阅读 · 0 评论 -
[powershell]与文件相关的操作
一、Get-ChildItem我们可以使用 help Get-ChildItem -showwindow 来获取 Get-ChildItem 的帮助文档。或者使用 get-help Get-ChildItem -full 获取一份显示在命令行的帮助文档使用get-help Get-ChildItem -Examples可以获取该命令的一些实例,方便理解怎么使用。1.获取D盘下一级目录信息Get-ChildItem -Path d:\ # -path 指定目标目录2.获取D盘下的原创 2021-03-13 22:20:01 · 268 阅读 · 0 评论 -
powershell与进程相关的操作(get-process)
powershell 命令结构一般是动词+名词首先我们可以使用 get-help 查看与进程相关的命令get-help *process* # *号是通配符1 获取终端进程:Get-Process**2 获取某一进程信息Get-Process -Name *qq* #获取包含qq关键字的进程,其中*号表示通配符,即为任意字符3 停止进程Stop-Process -Name qq #停止qq进程还可以使用管道Get-Process -Name qq|Stop-Pro原创 2021-03-13 21:00:38 · 9107 阅读 · 1 评论