.. / CIM_DataFile

Type of logical file that is a named collection of data or executable code


Functions:
Type:
Toolsets:

Data

Locate files

Get-CimInstance -Query "Select * from CIM_DataFile Where ((Drive = 'C:') AND (FileName = 'ntuser') AND (Extension = 'dat'))" -CimSession $s
Usecases
Comments

Copy file

$f = Get-CimInstance -ClassName CIM_DataFile -Filter "Name='C:\\Unattend.xml'" -CimSession $s
$f | Invoke-CimMethod -Name Copy -Arguments @{FileName='C:\\Users\\Public\\Unattend.xml'}
Usecases
Comments
Create CimSession $s using New-CimSession




Updated: 2024-12-13
Contributor: Arris Huijgen (bitsadmin)