Hello,
I'm trying to write "Not Found" or "Exists" to output to a CSV file.
How do you do that ?
Clear-Host
get-content c:\temp\servers_smalltest.txt |ForEach-Object {$_
$MachineName = $_
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $MachineName)
$regKey= $reg.OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0")
if ($regKey -eq $null){echo "Not Found"} else {echo "Exists"}} |select-Object $MachineName,?|Export-CSV -append -path c:\temp\ssl3.0.csv -NoTypeInformation -Encoding UTF8