-
Notifications
You must be signed in to change notification settings - Fork 0
/
Find-InTemp.ps1
47 lines (42 loc) · 2.64 KB
/
Find-InTemp.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Function Find-InTemp {
Param (
[Parameter(Mandatory=$True,ValueFromPipelineByPropertyName=$true)]$filename
)
$files = New-Object System.Collections.ArrayList($null) #@() # An Array for the retuned objects to go into
Get-ChildItem C:\Windows\Temp\*.* | Where-Object {$_.name -match $filename} | ForEach-Object {$files.add($_) | Out-Null }
Get-ChildItem C:\Users\*\AppData\Local\Temp\*.* | Where-Object {$_.name -match $filename} | ForEach-Object {$files.add($_) | Out-Null }
return $files
}
# SIG # Begin signature block
# MIIFwQYJKoZIhvcNAQcCoIIFsjCCBa4CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUDROrPyGoWfoSY4NYOuf7bMh3
# ckygggNOMIIDSjCCAjKgAwIBAgIQIBPntLmZnK5B5G5IDj1xLDANBgkqhkiG9w0B
# AQsFADAoMSYwJAYDVQQDDB1wZW5ubGF3c2Nob29sLm9ubWljcm9zb2Z0LmNvbTAe
# Fw0yMjExMjExNDAzMDhaFw0zMjExMjExNDEzMDhaMCgxJjAkBgNVBAMMHXBlbm5s
# YXdzY2hvb2wub25taWNyb3NvZnQuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
# MIIBCgKCAQEAmK7TlA3wGi383lYrziQmsQaC0tpReqlPxnox69vP0kj0GxIn7Xdt
# HXL29397iSofjm2p8VqwELDLd/0mNTpCtSFWXz/OMuPAuODAD0QGxp0MPzqMXPsc
# rqW5hS5vXokd4qeqTy3LosW146C6MU3AzUGgYb4gh5EPwSICXOx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