
PowerShell
小蚂蚁_CrkRes
Where there is a will, there is a way
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PowerShell设置固定ip
PowerShell设置固定ip$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"$wmi.EnableStatic("192.168.1.100", "255.255.255.0") #设置IP地址及掩码$wmi.SetGateways("192.168.1.1") #设置默认网关#New-NetIPAddress -InterfaceIndex 19 -IpAddress原创 2021-01-19 08:43:16 · 993 阅读 · 0 评论 -
在PowerShell运行*.ps时,出现*.ps1 is not digitally signed. The script will not execute on the syste
*.ps1 is not digitally signed. The script will not execute on the system如图:解决方法:在PowerShell中执行用Set-ExectionPolicy设置执行策略Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass-Exect...原创 2019-10-22 14:31:15 · 5828 阅读 · 0 评论 -
PowerShell结束进程的四种方法
#1.纯cmdlet命令Get-Process -Name notepad | Stop-Process#2.cmdlet+遍历Get-Process -Name notepad | foreach-object{$_.Kill()}#3.WMI 对象 + 遍历 + 对象方法Get-WmiObject Win32_Process -Filter "name = 'notepad.e...原创 2019-10-22 11:18:43 · 16226 阅读 · 1 评论 -
powershell命令提示符出现“不是内部或外部命令,也不是可运行的程序或批处理文件
在powershell中输入get-process命令时,出现 “不是内部或外部命令,也不是可运行的程序或批处理文件”1.在系统环境变量path中添加如下路径%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;2.重启P...原创 2019-10-22 11:14:27 · 15248 阅读 · 3 评论