im trying to allow the ability to type partial names into the read-host prompt... example to type in "hsc123" but get all computers with the name hsc12301, hsc12302, hsc12303, etc. I am a newbie when it comes to scripting. basically I need the ability to have wild card input with the variable. all help appreciated.
current script;
$computername=read-host'What computername do you need?' try { get-adcomputer "$computername"-propertiesipv4address } catch { write-warning "Computer not found / IP not found" }