$DRIVELIST=(GET-DISKPARTINFO | WHERE { $_.Type –eq $TYPE –and $_.DiskSize -lt $MAX -and $_.DiskSize –gt $MIN })
$DRIVELIST | FOREACH {
$Source=”C:DeploymentContent”
$Destination=$_.DriveLetter
ROBOCOPY $Source $Destination /E
}
More Related Contents:
- Displaying Unicode in Powershell
- Why do PowerShell comparison operators not enumerate collections of size 1?
- How to sort by file name the same way Windows Explorer does?
- how do I pass a range of values on the command line – passing an expression as an argument
- Parsing xml using powershell
- Powershell, File system provider, Get-ChildItem filtering… where are the official docs?
- How to get disk capacity and free space of remote computer
- Executing a command stored in a variable from PowerShell
- PowerShell Script to Find and Replace for all Files with a Specific Extension
- Modify Local Security Policy using Powershell
- Escaping the and (&) sign in Powershell
- Web.Config transforms outside of Microsoft MSBuild?
- Pin program to taskbar using PS in Windows 10
- Null coalescing in powershell
- Powershell Invoke-Sqlcmd capture verbose output
- Convert a batch-file command with complex arguments to PowerShell
- Confused with -Include parameter of the Get-ChildItem cmdlet
- Running PowerShell as another user, and launching a script
- Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)
- Remove Top Line of Text File with PowerShell
- Gracefully stopping in Powershell
- Upload BIG files via HTTP
- weird delay of the output of an object when followed by start-sleep (or until script end)
- Can’t install nuget package because of “Failed to initialize the PowerShell host”
- What security setting is preventing Remote PowerShell 2.0 from accessing UNC paths
- start remote process within the context
- How to run powershell command in batch file
- How can I elevate Powershell while keeping the current working directory AND maintain all parameters passed to the script?
- Are you able to use PtrToStringAuto to decrypt a secure string in Powershell 7 on macOS?
- Prevent trailing newline in PowerShell Out-File command