Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Issues with AD_Computers_Create\CreateComputers.ps1 #18

Open
r0b0tG4nG opened this issue Dec 18, 2021 · 3 comments
Open

Issues with AD_Computers_Create\CreateComputers.ps1 #18

r0b0tG4nG opened this issue Dec 18, 2021 · 3 comments

Comments

@r0b0tG4nG
Copy link

i am able to install badblood without any error but when i look into the AD, i can see that no machine was added to my DC. is it just me facing this issue or everyone else is facing this too?? attached is a screenshot
image

@tijldeneut
Copy link

They can be found in the Tier OU's, for example under AWS>Devices etc ...
Get-ADComputers wil list all of them

@benpatin
Copy link

benpatin commented Jan 3, 2023

Hi,
Same issue here, the CreateComputers.ps1 doesn't create any computer object.
When using invoke-badblood.ps1 i have a lot of errors on the computer part :

Creating Tiered OU Structure
Creating Users on Domain
True
True
Creating Groups on Domain
Creating Computers on Domain
Cannot index into a null array.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:64 char:16

  •         if($args[0]){
    
  •            ~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:75 char:16

  •         if($args[1]){
    
  •            ~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:85 char:16

  •         if($args[1]){
    
  •            ~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:96 char:16

  •         if($args[2]){
    
  •            ~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

Get-Item : Cannot bind argument to parameter 'Path' because it is null.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:129 char:31

  • $scriptparent = (get-item $scriptpath).parent.fullname
    
  •                           ~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-Item], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetItemCommand

import-csv : Could not find a part of the path 'C:\AD_OU_CreateStructure\3lettercodes.csv'.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:130 char:21

  • ... ttercodes = import-csv ($scriptparent + "\AD_OU_CreateStructure\3lett ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OpenError: (:) [Import-Csv], DirectoryNotFoundException
    • FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ImportCsvCommand

Get-ADComputer : Cannot validate argument on parameter 'Server'. The argument is null or empty. Provide an argument that is not
null or empty, and then try the command again.
At C:\ProgramData\badblood\AD_Computers_Create\CreateComputers.ps1:290 char:53

  •                 $comps = Get-ADComputer -server $setdc -f {(name  ...
    
  •                                                 ~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-ADComputer], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.GetADComputer

@benpatin
Copy link

benpatin commented Jan 3, 2023

Found the issue. I made a pull request #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants