($file.length -gt 100KB) { Write-Host $file 'file size:' ($file.length / 1024).ToString('F0') KB $i = $i + 1 } } if ($i -ne 0) { Write-Host Write-Host $i ' file(s) over 100KB in the current directory.' } else {
Delete downloaded files from roaming profiles older than 30 days Delete empty folders Delete everything within a specific directory Delete files older than 24 hours Delete files older than and create a log of which files were deleted Delete files on remote server Delete files/folders on remote ser...
The binary contents of the files in that folder are submitted as the values. This feature was added in PowerShell 6.1.0. Expand table Type: IDictionary Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False...
In version 3.7.0-Preview1 or later, this parameter is replaced by the LoadCmdletHelp parameter. The SkipLoadingCmdletHelp parameter is no longer required and no longer does anything, because cmdlet help files are no longer downloaded by default. Eventually, this parameter will be retired, so re...
The following example is a function calledGet-SmallFiles. This function has a$Sizeparameter. The function displays all the files that are smaller than the value of the$Sizeparameter, and it excludes directories: PowerShell functionGet-SmallFiles{param($Size)Get-ChildItem$HOME|Where-Object{$_.Lengt...
This example creates a new PSSession on each of the computers listed in the Servers.txt files, except for the first one. Select-Object selects all but the first computer in a list of computer names. The resulting list of computers is set as the value of the ComputerName parameter of the...
Enable caching of files that are no longer in use by Web Excel sessions. Expand table Type: SwitchParameter Position: Named Default value: None Required: False Accept pipeline input: False Accept wildcard characters: False-ExcelChartAndImageSizeMax...
Update-TypeDataUpdates the current extended type configuration by reloading the *.types.ps1xml files into memory. Use-TransactionAdds the script block to the active transaction. Wait-EventWaits until a particular event is raised before continuing to run. ...
选择你电脑上已安装的字体 "fontSize": 14, // 终端字体大小 "icon": "D:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico", // git的图标 "historySize": 9001, // 终端窗口记忆大小 "padding": "0, 0, 0, 0", // 边距 "snapOnInput": true, "useAcrylic": false //...
Repository files navigation README LGPL-2.1 license7Zip4Powershell Powershell module for creating and extracting 7-Zip archives supporting Powershell's WriteProgress API.Important Please note that this repository is not maintained anymore. I've created it a couple of years ago to fit my own needs...