I'm very new to Powershell, and I'm attempting to create a function which will test if AD computers are online using the Get-AD cmdlet. This function works, but I would like it to show the name of the AD computer beside its online/offline status. Any help with this would be greatly appreciated. Gist URL below.
Without looking at you gist location first. Know that there are several pre-built script for you to leverage to do this on this site forum, in the MS PowerShellGallery, TechNet, MSDN and the MS Scripting Guy's blog. Review and tweak as needed vs going from scratch, well, unless you are doing this for a learning experience. even with that, looking at how others do this is still educational.