Within PowerShell 4.0 I'd like to export the servers network mappings and the assigned group permissions.

Hello,

Within PowerShell 4.0 I'd like to export the servers network mappings and determine the assigned group permissions. The first part is the drive mappings and afterward I'll tackle the permissions. I'd like to reference servers.txt to find the servers and export all drive mapping details. Any thoughts?

=======================================================================
#
# NAME: Get-MappedDrives.ps1
#
# Modified: Medical Inc IT Staff
# Date: 17-Mar-2015
# Verison: PowerShell 4.0
# Client OS: Windows 7
# Server OS: Windows 2008 R2
#
# Description: Retrieve Workstations Drive Mappings
#
# To run the script
#
# .\Get-MappedDrives.ps1
#
#
##############################################################
$computerlist = "Get-Content C:\Scripts\Servers.txt"
$namespace = "root\CIMV2"

ForEach ($computer in $computerlist)
{
$Result1 = Get-wmiobject Win32_ComputerSystem -computer $computer | select username
$Result2 = Get-WmiObject -class Win32_NetworkConnection -computername $computer -namespace $namespace |  select logicaldisk
      $Result += $Result1, $Result2 | %{Add-Content "C:\Scripts\$computer.txt" $_}
}
CuriousMAUserAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tony MassaCommented:
You want to use a list of servers and export the shares and permissions on the shared folders?

Something like this?:  https://gallery.technet.microsoft.com/scriptcenter/Lists-all-the-shared-5ebb395a
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CuriousMAUserAuthor Commented:
Thank you, a helpful link.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.