随笔分类 -  PowerShell

摘要:SMB Server Message Block $result = foreach ($share in $(Get-SmbShare)) { Get-SmbShareAccess -Name $share.Name | Where-Object {$_.AccountName -cmatch ' 阅读全文
posted @ 2022-07-09 22:02 ascertain 阅读(150) 评论(0) 推荐(0) 编辑
摘要:https://codingbee.net/powershell/powershell-make-a-permanent-change-to-the-path-environment-variable New-Item -ItemType Directory -Path C:\Windows\Pat 阅读全文
posted @ 2022-05-22 22:23 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Installing Node.js via package manager | Node.js (nodejs.org) GitHub - Schniz/fnm: 🚀 Fast and simple Node.js version manager, built in Rust New-Item 阅读全文
posted @ 2022-05-09 21:11 ascertain 阅读(101) 评论(0) 推荐(0) 编辑
摘要:LocalMachine: C:\Program Files\PowerShell\7\powershell.config.json CurrentUser: C:\Users\pretentious\Documents\PowerShell\powershell.config.json 使用Set 阅读全文
posted @ 2022-05-09 20:51 ascertain 阅读(43) 评论(0) 推荐(0) 编辑
摘要:Get-Content input.txt | python .\skript.py | tee output.txt 阅读全文
posted @ 2022-05-04 22:31 ascertain 阅读(227) 评论(0) 推荐(0) 编辑
摘要:用来找出桌面上一个星期以上(大于或者等于8天)没有访问过的文件,因为是用于示例,这里使用相对容易理解的语法,并且添加了注释: function Get-OldFiles { # 获取桌面上所有的文件信息 $all_files = Get-ChildItem $env:USERPROFILE\Desk 阅读全文
posted @ 2022-04-23 18:25 ascertain 阅读(42) 评论(0) 推荐(0) 编辑
摘要:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-service?view=powershell-7.2 阅读全文
posted @ 2022-04-17 11:33 ascertain 阅读(36) 评论(0) 推荐(0) 编辑
摘要:Import-Module posh-git $GitPromptSettings.DefaultPromptWriteStatusFirst = $true $GitPromptSettings.DefaultPromptBeforeSuffix.Text = ' $([DateTime]::no 阅读全文
posted @ 2022-02-09 13:11 ascertain 阅读(213) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示