随笔分类 - PowerShell
摘要:SMB Server Message Block $result = foreach ($share in $(Get-SmbShare)) { Get-SmbShareAccess -Name $share.Name | Where-Object {$_.AccountName -cmatch '
阅读全文
摘要:https://codingbee.net/powershell/powershell-make-a-permanent-change-to-the-path-environment-variable New-Item -ItemType Directory -Path C:\Windows\Pat
阅读全文
摘要: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
阅读全文
摘要:LocalMachine: C:\Program Files\PowerShell\7\powershell.config.json CurrentUser: C:\Users\pretentious\Documents\PowerShell\powershell.config.json 使用Set
阅读全文
摘要:Get-Content input.txt | python .\skript.py | tee output.txt
阅读全文
摘要:用来找出桌面上一个星期以上(大于或者等于8天)没有访问过的文件,因为是用于示例,这里使用相对容易理解的语法,并且添加了注释: function Get-OldFiles { # 获取桌面上所有的文件信息 $all_files = Get-ChildItem $env:USERPROFILE\Desk
阅读全文
摘要:https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-service?view=powershell-7.2
阅读全文
摘要:Import-Module posh-git $GitPromptSettings.DefaultPromptWriteStatusFirst = $true $GitPromptSettings.DefaultPromptBeforeSuffix.Text = ' $([DateTime]::no
阅读全文