
windows
璐程风
这个作者很懒,什么都没留下…
展开
-
Windows Powershell安装exe mis文件
一、安装MSI包使用PowerShell调用WMI对象,你可以执行下面的脚本来安装你的MSI安装包:远程代码如下:$box="deviis01" #this is the name of your server$product= [WMICLASS]"\\$box\ROOT\CIMV2:win32_Product"Write-Host "Installing software on $box"$product.Install("c:\Setup \somesoftwarepackage.m原创 2020-09-30 11:51:17 · 3696 阅读 · 0 评论 -
Windows 批处理bat查询内存条和DNS信息
1.查询内存条wmic path Win32_PhysicalMemory get /value | findstr "Capacity="2.查询DNSnetsh interface ip show dnsservers|findstr "[0-9]*\.[0-9]*\."3. powershell调用CMDcmd /c "wmic path Win32_PhysicalMemory get /value | findstr "Capacity=""cmd /c "netsh...原创 2020-09-02 16:22:25 · 1360 阅读 · 0 评论 -
powershell MD5快速比对或内容比对方法(文件差异校验) @LCF
使用命令:certutil -hashfile C:\XJ-Windows.csv MD5 ,再截取MD5值,最后进行比对# MD5值较验$temp1=certutil -hashfile C:\XJ-Windows.csv MD5 $temp1=$temp1 -split '\n'$temp1=$temp1[1]$temp2=certutil -hashfile C:\XJ-Windows-down.csv MD5 $temp2=$temp2 -split '\n'..原创 2020-08-12 13:56:01 · 1223 阅读 · 0 评论 -
powershell 获取系统最近补丁更新日期/时间 @lcf
在windows10 2012 2016上都可以运行$UpDtae=(get-wmiobject -class win32_quickfixengineering).InstalledOn $UpDtae= ( -split $UpDtae | select -Last 2) -split "/"$UpDtae=$UpDtae[2]+"."+$UpDtae[0]+"."+$UpDtae[1]$UpDtae原创 2020-08-11 17:20:23 · 926 阅读 · 0 评论 -
windwos powershell ftp操作(上传.下载.列表)
支持windows2008以上系统 这里把它写成了函数方便调用,可以单独复制出来更改 Function ftp($ftpurl,$username,$password,$do,$filename,$DownPatch) { # ftp 服务器地址,用户名,密码,操作(上传up/下载down/列表list),文件名,下载路径# 示例:ftp ftp://10.10.98.91/ ftpuser shenzhen up C:\Windows\setupact.txt if ($d..原创 2020-07-30 16:57:22 · 1826 阅读 · 0 评论 -
powershell curl传送中文参数方法py接口接收(普通方式和json方式)
一、curl传参方式BAT普通传参方式(非中文)curl 127.0.0.1:5000/login -X POST -d "dd=efwdfdfef&ee=3434&dfefe=3333333"powershell普通方式$body = '{"users":["yang.sun"],"msg":"' + "中文字符串" +'"}'$params =[System.Text.Encoding]::UTF8.GetBytes($body)curl 127.0.0.1..原创 2020-07-03 15:56:36 · 1448 阅读 · 0 评论 -
windows 2008 2012 2016安全基线设置脚本
文件另存.bat 批处理文件格式运行:: 账号安全@prompt # echo [version] >account.infecho signature="$CHICAGO$" >>account.infecho [System Access] >>account.infREM 修改帐户密码最小长度为8echo MinimumPasswordLen...原创 2020-01-22 11:29:33 · 4250 阅读 · 0 评论