Hello,
i'm trying to use splatting for a GET-ADUser but from some reason it doesn't work
$GetADUserParameters = { Identity = "username" Properties = "employeeid, manager, notes" } Get-ADUser @GetADUserParameters Get-ADUser : Cannot evaluate parameter 'Identity' because its argument is specified as a script block and there is no input. A script block cannot be evaluated without input. At line:6 char:12 + Get-ADUser @GetADUserParameters+ ~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : MetadataError: (:) [Get-ADUser], ParameterBindingException+ FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.ActiveDirectory.Management.Commands.GetADUser $Error[0] |fl * -Force PSMessageDetails : Exception : System.Management.Automation.ParameterBindingException: Cannot evaluate parameter 'Identity' because its argument is specified as a script block and there is no input. A script block cannot be evaluated without input. at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate) at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext) at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Interpre tedFrame frame) TargetObject : CategoryInfo : MetadataError: (:) [Get-ADUser], ParameterBindingException FullyQualifiedErrorId : ScriptBlockArgumentNoInput,Microsoft.ActiveDirectory.Management.Commands.GetADUser ErrorDetails : InvocationInfo : System.Management.Automation.InvocationInfo ScriptStackTrace : at <ScriptBlock>, <No file>: line 6 PipelineIterationInfo : {}