Get Local Group Members From Remote computers

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • In This video you will learn how to use "Get-LcoalGroupMember" command on remote computers and you will easily get data how many Users or Groups are added into Local group for which you want to fetch data. please let me know if you are facing any issue while using the script.
    =================Script Here================
    $Servers = gc "C:\Scripts\livePCs.txt"
    $Groupname = Read-host "Enter Group Name Here"
    foreach ($Server in $Servers){
    Invoke-Command -ComputerName $Server -ScriptBlock{
    Get-LocalGroupMember -Name $using:Groupname
    } | Export-csv C:\Temp\$Groupname.Group.csv -Append -force}
    ============================================
    Powershell Script To Change Service Account or Update Password
    • Powershell Script To C...
    Powershell How To Change Remote Computer (Workgroup) Local Account Password
    • Powershell How To Chan...
    Delete Virtual Machine Snapshots Older Than Specific Days
    • Delete Multiple Virtua...
    How To Create File Selection Dialog Box in PowerShell
    • How To Create File Sel...
    Add User/Group To The Local Administrators/RDP Group On Multiple Computers
    • Add User/Group To The ...
    Get Windows Updates list from Remote Computer
    • Get Windows Updates li...
    PowerShell Remotely Uninstall Software from Multiple Computers
    • PowerShell Remotely Un...
    PowerShell Search Specific KB Status on Remote Computers
    • PowerShell Search Inst...
    PowerShell Script to Connect Multiple Server's Remote Session
    • PowerShell Script to C...
    PowerCLI Script to power ON dedicated VMs listed in a text file
    • PowerCLI Script to pow...
    PowerCLI Script to power Off dedicated VMs listed in a text file
    • PowerCLI Script to pow...
    Delete Snapshot's from Multiple Virtual Machines
    • Delete Snapshot's from...
    Create Snapshot on Multiple Virtual Machine
    • Create Snapshot on Mul...
    How can I check if a port is open remotely
    • Identify if Windows TC...
    Installing software remotely on Multiple "Workgroup" Computers
    • Installing software re...
    PowerShell Installing software remotely on Multiple Computers
    • PowerShell Installing ...
    Unable to move OU in Active Directory (Access is denied)
    • Unable to move OU in A...
    PowerShell Installing software remotely on Multiple Computers
    • PowerShell Installing ...
    Get Multiple Services Status Remotely | Remotely Start or Stop Services
    • Get Multiple Services ...
    Get Date and Time from Multiple Remote Computers
    • Get Date and Time from...
    PowerCLI - How to get HA restarted VM's List
    • PowerCLI - How to get ...
    Get-Childitem - Search file on Local and Remote Computers
    • Get-Childitem - Search...
    Remotely Create Update Delete Registry Key on Multiple Computers
    • Remotely Create Update...
    Get service status from remote server's using PowerShell
    • Get service status fro...

Комментарии • 7

  • @user-vd1fk2hk5k
    @user-vd1fk2hk5k 3 месяца назад

    hello sir... if you don't mind i need a command or a script to list of members of have access for shared folders.

  • @Consytec_Infraestructura_IT
    @Consytec_Infraestructura_IT Год назад +1

    Hello how are you? Congratulations for this channel. I have a question, how could I audit the local administrators of the servers that are in the domain? And I mean many servers from the OUs of 4 countries. Can I just do it with this script? Thank you very much, greeting from Rosario, Argentina!

    • @SwapnilInfotech
      @SwapnilInfotech  Год назад

      Thank you for your appreciation. Yeah you can use this script for audit. If you are facing any issue with the script, please let me know.

  • @Niksdharan
    @Niksdharan Год назад

    Hi, currently iam running the script from windows 2012 server. 2012 server doesn't have powershell command get-localgroupmember. And my script has to get output from 2012 2016 and 2019 server. So i tried changing get-localgroupmember with net localgroup administrators. The script ran without error. But in output csv file instead of the account name Or group name it shows the column name as length and provide value like 29 15 0 etc for each row, probably the length of user account name.

    • @SwapnilInfotech
      @SwapnilInfotech  Год назад

      Which PowerShell version you are using on server 2012, i would suggest to upgrade it if it is lower than 5.1

    • @Niksdharan
      @Niksdharan Год назад

      @@SwapnilInfotech powershell 4

    • @SwapnilInfotech
      @SwapnilInfotech  Год назад

      Please upgrade the PowerShell to make all new commands work on your servers because when you change the command all the parameters get changed then only it will give you proper output.