xtodo PowerShell
- 2025-05-07 PowerShell make sure pwsh xah-move-files-to-xgpc do remove metadata on jpg and png. test with move from mac
PowerShell how to connect to a private network drive
New-PSDrive -Name Z -PSProvider FileSystem -Root "//xpc/users/xah/Pictures/"
# 2025-03-09 <# in PowerShell, how to get "File and Printer Sharing" status The Get-NetFirewallProfile cmdlet displays the currently configured options for a specified profile. This cmdlet displays information that is presented on the Windows Firewall with Advanced Security Properties page, with the tabs for Domain, Private, and Public profiles. The specified profile can be scoped to input rules. #> Get-NetFirewallProfile -PolicyStore ActiveStore # HHHH------------------------------ Get-NetFirewallProfile -Name Public # big output Get-NetFirewallProfile -Name Public | Get-NetFirewallRule # HHHH------------------------------ Get-NetFirewallProfile -Name private # big output Get-NetFirewallProfile -Name private | Get-NetFirewallRule
<# 2025-03-09 Get-NetFirewallRule Retrieves firewall rules from the target computer. The Get-NetFirewallRule cmdlet returns the instances of firewall rules that match the search parameters from the user. See the New-NetFirewallRule cmdlet for more information. This cmdlet returns one or more firewall rules by specifying the Name parameter (default), the DisplayName parameter, rule properties, or by associated filters or objects. The queried rules can be placed into variables and piped to other cmdlets for further modifications or monitoring. #> Get-NetFirewallRule -PolicyStore ActiveStore # HHHH------------------------------ Get-NetFirewallProfile -Name Public | Get-NetFirewallRule # HHHH------------------------------ $nfServiceFilter = Get-NetFirewallRule -Group "@FirewallAPI.dll,-30502" | Get-NetFirewallServiceFilter -Service Any Set-NetFirewallServiceFilter -Service Ssdpsrv -InputObject $nfServiceFilter This cmdlet can be run using only the pipeline. Get-NetFirewallRule -Group "@FirewallAPI.dll,-30502" | Get-NetFirewallServiceFilter -Service Any | Set-NetFirewallServiceFilter -Service Ssdpsrv
- write a PowerShell command to move files from a dir list into new dir.
- 2024-01-06 write a PowerShell command copy mirror a dir structure.
- 2022-04-16 PowerShell, write script to find huge files
- 2022-04-16 PowerShell, write script to check folder size, disk usage analysis
- 2024-03-18 PowerShell, write a command to delete Thumbs.db, and also other mac trash files
- 2021-12-26 PowerShell write xah-report-file-name-length.
- 2021-11-17 PowerShell write xah-replace-string. look at my golang python ones
- PowerShell
xah-line-ending-report
,xah-line-ending-to-unix
need complete overhaul. confusing.
- need to use
Set-ItemProperty
- PowerShell: List All Possible File Attribute Values
- 2022-06-23 PowerShell PowerShell: Eject Disk
- 2022-03-28 PowerShell
dir "c:/Users/xah//git/xahemacs/" -Force -Recurse | Where { $_.Attributes -match "ReparsePoint"}
- 2022-03-06 PowerShell. write a function to change links, relative path to domain. on file.
- move_wordyenglish_com_replace_url.ps1