I’m new to this forum (actually just registered) and I need some help.
I’m new to PowerShell but I was able to get partial information of what I want and putting them all together does not seem possible for my level of knowledge.
Basically, I would like to generate a csv file with the following information per computer on the network (or Get-Content from a text file).
ComputerName, CurrentlyLoggedOnUser, OS (Win 7/10), PhysicalDiskSize (GB), TotalPhysicalMemory (GB), CPU Type (i5/i7), Dell Service Tag as well, since all of our computers/laptops are Dell.
As kvprasoon said, this is one of most common tasks and most books use this example to create tools in Powershell, so there are basic to advanced scripts that output Powershell or HTML reports.
@Kiran: Move '$Output = ’ in front of foreach ($CN in $ComputerName) to support returning multiple computers.