PowerShell 现在处于什么地位?有没有必要学?
理由是什么呢?
关注者
756被浏览
368,375登录后你可以
不限量看优质回答私信答主深度交流精彩内容一键收藏
什么地位?
处于一个被低估的位置。之后影响力会越来越大,因为实在太强大了。
要不要学?
看你的需求,如果
- 你要长期用Windows Server服务器
- 经常处理Office的一些重复性工作
- 从事或学习Windows环境的网络安全
建议学习,PowerShell和.net平台,office的无缝结合非常强大,而且因为能bypass各种防护措施,之后肯定是Windows平台渗透神器。
转载一段代码,获取当前最占内存的十个进程,并在Excel生成饼图
# create new excel instance
$objExcel = New-Object -comobject Excel.Application
$objExcel.Visible = $True
$objWorkbook = $objExcel.Workbooks.Add()
$objWorksheet = $objWorkbook.Worksheets.Item(1)
# write information to the excel file
$i = 0
$first10 = (ps | sort ws -Descending | select -first 10)
$first10 | foreach -Process {$i++; $objWorksheet.Cells.Item($i,1) = $_.name; $objWorksheet.Cells.Item($i,2) = $_.ws}
$otherMem = (ps | measure ws -s).Sum - ($first10 | measure ws -s).Sum
$objWorksheet.Cells.Item(11,1) = "Others"; $objWorksheet.Cells.Item(11,2) = $otherMem
# draw the pie chart
$objCharts = $objWorksheet.ChartObjects()
$objChart = $objCharts.Add(0, 0, 500, 300)
$objChart.Chart.SetSourceData($objWorksheet.range("A1:B11"), 2)
$objChart.Chart.ChartType = 70
$objChart.Chart.ApplyDataLabels(5)
关于PowerShell和安全的一些脚本:
hack/scripts/powershell at master · pwnaus/hack · GitHub关于PowerShell和安全的文章:
使用powershell Client进行有效钓鱼PowerShell与Office宏结合系列
WMI Attacks | WooYun知识库WMI系列
powershell各种反弹姿势以及取证(一)PowerShell制作反弹脚本系列