ActiveDirectoryDSC.Reverse icon indicating copy to clipboard operation
ActiveDirectoryDSC.Reverse copied to clipboard

Getting Error with Get-TargetResource

Open bhaizlett123 opened this issue 5 years ago • 0 comments

When trying to run this in my active directory environment, i keep getting the following errors:

Get-TargetResource : The term 'Get-TargetResource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Program Files\WindowsPowerShell\Scripts\ActiveDirectoryDSC.Reverse.ps1:115 char:24

  •         $results = Get-TargetResource @params
    
  •                    ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-TargetResource:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Get-DSCBlock : Cannot bind argument to parameter 'Params' because it is null. At C:\Program Files\WindowsPowerShell\Scripts\ActiveDirectoryDSC.Reverse.ps1:119 char:62

  • ... $Script:dscConfigContent += Get-DSCBlock -Params $results -Module ...
  •                                                      ~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-DSCBlock], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-DSCBlock

bhaizlett123 avatar Jun 04 '20 18:06 bhaizlett123