I've tried about 100 ways to get my chunk of code to run against $computer. I usually just pass on the name like -property $computername or whatnot but it will not take. Any ideas?
----------
Import-Module ActiveDirectory
cls
$computer = Read-Host 'What is the computername?'
foreach ($printer in $printers)
{
$printer = $printer -replace "HKEY_LOCAL_MACHINE","HKLM:"
Get-ItemProperty $printer -Name Printer | select Printer
}