Can anyone advise on the following? I am trying to pipe the property Name from Get-ADComputer to a custom made function...
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, Position=0)] [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Alias('HostName','Server','IPAddress','CN','Name')] [string[]]$ComputerName
The error is a blank ComputerName parameter...
Cannot validate argument on parameter 'ComputerName'. The argument is null or empty. Provide anargument that is not null or empty, and then try the command again.