Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Variable reference is not valid #38

Open
KINGSABRI opened this issue Jan 25, 2023 · 0 comments
Open

Variable reference is not valid #38

KINGSABRI opened this issue Jan 25, 2023 · 0 comments

Comments

@KINGSABRI
Copy link

PS C:\Tools> Import-Module .\DomainPasswordSpray\DomainPasswordSpray.ps1

At C:\Tools\DomainPasswordSpray\DomainPasswordSpray.ps1:261 char:21
+         Write-Host "$Message: Waiting for $($Seconds/60) minutes. $($ ...
+                     ~~~~~~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to delimit the
name.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : InvalidVariableReferenceWithDrive

Write-Host "$Message: Waiting for $($Seconds/60) minutes. $($Seconds - $Count)"

Fix:

Change line 261 to

Write-Host "${Message}: Waiting for $($Seconds/60) minutes. $($Seconds - $Count)"
f8al added a commit to f8al/DomainPasswordSpray that referenced this issue Jan 27, 2023
fixing line 261 with tested bug fix code from currently open issue dafthack#38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant