Skip to content

Instantly share code, notes, and snippets.

@Dan1el42
Created November 6, 2014 02:51
Show Gist options
  • Select an option

  • Save Dan1el42/65990768d917692402b1 to your computer and use it in GitHub Desktop.

Select an option

Save Dan1el42/65990768d917692402b1 to your computer and use it in GitHub Desktop.
Param
(
[Parameter(Mandatory = $true)]
[String[]] $ComputerName,
[String] $FilePath = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
)
$Filter = "Name='{0}'" -f $File.Replace('\','\\')
Get-WmiObject -Class CIM_DataFile -ComputerName $ComputerName -Filter $Filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment