Arposh Windows System Administration tool 2.0 (AWSA)

Download AWSA 2.0


New in v2.0:
  • Compatibility with Windows servers
  • Many pre-requisities removed
  • Customization of results via XML file
  • Built-in search function
  • View services of remote computers
  • Send messages to computers remotely
  • Context menus
  • Performance has been enhanced greatly
  • Ability to add local administrators

ACSA Requirements:
- Powershell v2 or greater

Features:
  • Connects to currently logged-in domain on startup or domain set in XML file
  • Search for PC - Search Active Directory for computers matching the string in the textbox
  • System Info - Gathers info about PC, user session, make/model, hardware, OS, and networking
  • Local Admins - Enumerates local administrators and allows you to add or remove them
  • Applications - Enumerates installed software and allows you to uninstall
  • Startup Items - Enumerates startup items and allows you to remove them
  • Processes - Enumerates running processes and allows you to kill them
  • Services - Enumerates services
  • Remote Desktop - Remote desktop into computer
  • Remote Assistance - Initiate remote assistance session with remote computer
  • View C Drive - Opens explorer to the C drive of remote computer
  • Send Message - Sends a message to all users on remote computer
  • Restart Computer - Restarts remote computer (Includes confirmation)
  • File Menu
    • Connect to domain... - Connect to a different domain
  • View Menu
    • View WSUS logs
    • View Event Viewer
    • View Services
    • View Local Users/Groups MMC

Usage: Download AWSA.zip and unblock the file (Right-click, Properties and unblock). Unzip AWSA.zip and open the AWSA.Options.xml file in Notepad to modify any settings.  To use the GUI, right-click the AWSA.ps1 script and select 'Run with PowerShell'.  Once the GUI loads, type in a partial computer name to search for it in Active Directory.  Right-click on a computer in the listbox and select it to move the name into the textbox.  If you already know the name of the computer you would like to manage remotely, you can type that directly into the textbox.

Download AWSA 2.0

49 comments:

  1. Mr. Prescott, thanks for sharing this. It helps in our environment a lot. I was wondering how I could add a button to pull up a bunch of functions in a .psm1 and be able to select them to run.

    ReplyDelete
  2. If it is a small list of functions, I would recommend using a drop-down menu. You can look at the other menus used in the tool as examples. If there are a lot of functions that you want to list, it would be easier to use something similar to this: 'Get-Command -Module Sotghalz.psm1' and then add each of the function names to the listview. Once it is in the listview, you can create a context menu for 'Run Function' and use the Get-ComputerName built-in function to read the computer name from the textbox.

    ReplyDelete
  3. I was able to add the content of the psm1 to the listview and I was able to show the context "Run Function". I just can't get the actual function to run. Any ideas?

    ReplyDelete
  4. I was able to figure it out. It took some time. Your tool is going to help out in our environment. Thank you.

    ReplyDelete
  5. Is there a way to open the GUI and have the powershell running in the background as minimized or hidden from the user?

    ReplyDelete
  6. When I right click and run with PowerShell, nothing happens. Any ideas?

    ReplyDelete
  7. @Sotghalz: Not that I am aware of.

    @Anon: Make sure that you have correctly set you PowerShell execution policy. You can check it by using the Get-ExecutionPolicy cmdlet.

    ReplyDelete
  8. Very nice , would it be possible to obtain what network printers are installed?

    thank you,

    ReplyDelete
  9. @tricky: Network printers are stored in the user's session and are not as easily retrievable as the current information provided. To find ways to retrieve this information, you can visit the TechNet ScriptCenter @ http://gallery.technet.microsoft.com/scriptcenter

    ReplyDelete
  10. Hi Mr. Rich Prescott

    Thanks to you for crating and posting this script in the TechNet Script directory.

    I found this script very useful for me but I have some question for you.

    • Is it possible that when I run this script it will not show the PowerShell console, it show only the GUI console.
    • I am not able to send the text message from this script
    • Is it possible to add one more button “Force Policy” using which I can force GPO on remote computer.

    ReplyDelete
  11. This tool and code behind it have been quite helpful, thank you!

    Subodh - What client OS are you sending the message to? If these are Windows 7 (or Vista, I assume), look at the HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server AllowRemoteRPC value. This may need to be set to 1.

    ReplyDelete
  12. @AnonJan20: You're welcome.

    @Sudobh: I am not aware of a way to hide the console. And yes, there is a way to 'Force Policy', which was included in the original release of this GUI, but it required the PSExec tool from Sysinternals. There is also an option of using PSRemoting, but I am trying to keep the tool as simple as possible.

    ReplyDelete
  13. Thanks it worked for me.
    Can I send message to multiple users in one time,
    Is there any command for sending this message ?

    ReplyDelete
  14. This Admin Tool will not run on Windows XP SP3. I get the following:

    File C:\AWSA\AWSA.ps1 cannot be loaded. The file C:\AWSA\AWSA.ps1 is not digitally signed. The script will not execute
    on the system. Please see "get-help about_signing" for more details..
    At line:1 char:11
    + .\AWSA.ps1 <<<<
    + CategoryInfo : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

    ReplyDelete
  15. @Anon: The admin tool works fine on XP. That error has to do with your execution policy. Please read the information referenced in the error to determine which execution policy is best for your situation. Here is the command that should be run to get more details:

    get-help about_signing

    ReplyDelete
  16. Hi Prescott, unable retrive application information due to failed issue. Any idea?

    ReplyDelete
  17. @Anon: I would need to have more information to troubleshoot, but it sounds like you either input a wrong computer name or do not have admin rights on the remote machine.

    ReplyDelete
  18. Is there a version like this for linux administration to remote computers? I made a gui like this and would love to display a SSH (putty) session in this gui but i cant figure out how to embed the session in the gui. Is this even possible? How can I tailor something like this to the LINUX admin? Thanks for the help. Love your blog.

    ReplyDelete
  19. I do not make a version of this for Linux computers. There is what is called a Community Promise for PowerShell, which allows it to be ported to Linux, but nobody has taken on the task.

    ReplyDelete
  20. * hmmm i it looks handy piece of software you have created would be nice to browse for a computer to select, which is broken down to do search by OU or group, and possible a new feature that did the job of regmon and filemon, i know there process explorer but i know with the old pro version they allowed to connect to another computer with network and monitor that but this new one process monitor (if that what i remember it called) seems to be all local based and it seems to be be more memory hungry

    but keep up the good work

    ReplyDelete
  21. Awesome tool, I'm going to run a demo at our next team meeting. One question, when trying to send a message nothing happens. In the cmd running behind the program I see "Error 5 getting session names". Whats going on there?

    ReplyDelete
  22. The main use case for this feature was for sending messages to users of terminal servers, which works by default. If you would also like to use this feature for client systems, the following registry key must be enabled on the remote machine to receive the message.

    HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
    Name : AllowRemoteRPC
    Type : REG_DWORD
    Value : 1

    Note: This change requires a reboot.

    ReplyDelete
  23. It's seems your work was shown on the message board edugeek, and seems alot of praise keep up the work, probably have lot of feeddback and tips since it used quite reglar

    ReplyDelete
  24. Awesome script/utility! I was hoping that it would have a way to export the data it collects into a .xlsx or .csv output file, so as a workaround, I just take print screens, lol.

    ReplyDelete
  25. Helllo Rich,
    Using your script on my networked Windows 7 64bit PC, I could not retrieve anything. The error shown at the bottom status bar of GUI reads something like: [altiris-console.engineeredair.com] The RPC server is unavailable. (Exception from HRESULT:0x800706BA). The target client that I want to get the info from is a windows xp SP3 and that I did add the registry key AllowRemoteRPC as you mentioned on April 6, 2012. Your help to troubleshoot this is much appreciated.
    Lac

    ReplyDelete
  26. Hello,
    Nevermind the question I asked on May 25, 2012. I have found the answer for it. It was simply the windows firewall that block to connection. This script/program is truely fanstastic. Thank you for your great work.

    ReplyDelete
  27. Nothing happens when i run this, Windows 7 32bit. Where are you supposed to run "get-help about_signing" to check for the policy?

    ReplyDelete
  28. How would one add the gpupdate back? I looked at both versions of your tool and they use different structure. I tried several different ways, none of which worked. I understand the need for simplistic tools but it would be nice for the gpupdate be readded, even at the expense of psexec tools.

    ReplyDelete
  29. "With the improvements in the tools provided with or available for modern operating systems, the need to write scripts to assist in administering or investigating computer systems has been significantly reduced or even eliminated."
    this is a statement i have been for one of my university's assignment, i have to produce an argument for and against please help me !!!

    Many thanks

    ReplyDelete
    Replies
    1. You'd probably be better off asking that on one of the scripting forums.

      Delete
  30. Hi Rich
    Like your code but it is not working for me !
    I am getting the following on the PS console:


    You cannot call a method on a null-valued expression.
    At C:\Temp2\AWSA.ps1:479 char:4
    + $vbError = $vbmsg.popup("This feature is not supported on
    Windows XP.",0,"Inf ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


    Many thanks

    ReplyDelete
  31. Also getting same error on Win 7 64Bit machine

    You cannot call a method on a null-valued expression.
    At C:\Temp2\AWSA.ps1:535 char:43
    + ForEach ($Sel in $lvMain.SelectedItems){($Info | ?{$_.Name -eq
    $Sel.Text}).Uni ...
    +
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    ReplyDelete
  32. Send a message and restart computer did no work for me!
    how can i get them work?

    thanks

    ReplyDelete
  33. Hello,

    I'm having some issues running this script as an alternative user. Maybe I'm being a tit.

    I'm calling the script from a batch file using:

    RunAs /u:domain/user "powershell -file .\AWSA.ps1"

    Any ideas where I'm going wrong?

    Thank you!

    ReplyDelete
    Replies
    1. RunAs /user:domain\user "powershell -file .\AWSA.ps1"

      Delete
  34. I am trying to add a button to collect system events. I have the button in place but am getting errors when running it:

    New-Object : Multiple ambiguous overloads found for "ListViewItem" and the
    argument count: "1".
    At C:\Users\archec\Desktop\AWSA\AWSA.ps1:631 char:12
    + $Item = New-Object System.Windows.Forms.ListViewItem($_.$Col0)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodExcepti
    on
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerS
    hell.Commands.NewObjectCommand

    You cannot call a method on a null-valued expression.
    At C:\Users\archec\Desktop\AWSA\AWSA.ps1:632 char:79
    + ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field =
    $Col.Text;$I ...
    +
    ~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.
    At C:\Users\archec\Desktop\AWSA\AWSA.ps1:632 char:79
    + ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field =
    $Col.Text;$I ...
    +
    ~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    You cannot call a method on a null-valued expression.
    At C:\Users\archec\Desktop\AWSA\AWSA.ps1:632 char:79
    + ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field =
    $Col.Text;$I ...
    +
    ~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Exception calling "Add" with "1" argument(s): "Object reference not set to an
    instance of an object."
    At C:\Users\archec\Desktop\AWSA\AWSA.ps1:633 char:4
    + $lvMain.Items.Add($Item)
    + ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NullReferenceException

    I am fairly new to PoSh so if this is a simple newb fix feel free to make fun of me if you feel it is necessary. I did add properties for SystemEvents to the xml file as well. Here is the code for the click event:

    $btnSysEvents_Click={
    Get-ComputerName
    Initialize-Listview
    $SBPStatus.Text = "Retrieving System Events..."
    Update-ContextMenu (Get-Variable cmsSysEvent*)
    $XML.Options.SystemEvents.Property | %{Add-Column $_}
    Resize-Columns
    $Col0 = $lvMain.Columns[0].Text
    $Info = Get-EventLog System -ComputerName $ComputerName -Newest 25 -EntryType Error,Warning | Sort TimeGenerated
    Start-Sleep -m 250
    if($SysError){$SBPStatus.Text = "[$ComputerName] $SysError"}
    else{
    $Info | %{
    $Item = New-Object System.Windows.Forms.ListViewItem($_.$Col0)
    ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field = $Col.Text;$Item.SubItems.Add($_.$Field)}
    $lvMain.Items.Add($Item)
    }
    $SBPStatus.Text = "Ready"
    }

    Thanks for any help you can give...

    ReplyDelete
  35. I figured it out...I had to explicitly cast these as strings:

    TimeGenerated = [String]$event.TimeGenerated
    EntryType = [String]$event.EntryType
    Source = [String]$event.Source
    EventID = [String]$event.EventID

    ReplyDelete
  36. I guess I should also show that I changed the code as follows:

    $btnSysEvents_Click={
    Get-ComputerName
    Initialize-Listview
    $SBPStatus.Text = "Retrieving System Events..."
    Update-ContextMenu (Get-Variable cmsSysEvent*)
    $XML.Options.SystemEvents.Property | %{Add-Column $_}
    Resize-Columns
    $Col0 = $lvMain.Columns[0].Text
    $Info = @()
    $SystemEvents = Get-EventLog -ComputerName $computername -LogName System -EntryType Error,Warning
    foreach ($event in $SystemEvents) {
    $Member = New-Object PSObject -Property @{
    TimeGenerated = [String]$event.TimeGenerated
    EntryType = [String]$event.EntryType
    Source = [String]$event.Source
    EventID = [String]$event.EventID
    }
    $Info += $Member
    }
    Start-Sleep -m 250
    if($SysError){$SBPStatus.Text = "[$ComputerName] $SysError"}
    else{
    $Info | %{
    $Item = New-Object System.Windows.Forms.ListViewItem($_.$Col0)
    ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field = $Col.Text;$Item.SubItems.Add($_.$Field)}
    $lvMain.Items.Add($Item)
    }
    $SBPStatus.Text = "Ready"
    }
    }

    ReplyDelete
  37. Hello,

    Thank you for this very useful tool, I think it's amazing.
    One issue I have with it is I noticed that User Logon seems to be the last time explorer.exe process started. I tested this by login on to computer, running Admin Tool to collect System Info (button). I killed explorer.exe process then started it using Task Manager. Re-ran Admin Tool and it now shows different time for user logon.

    Is this a bug or is this how the tool functions? If this is how the tool functions then admins can't rely on this piece of information as it is inaccurate.

    Thank you!

    ReplyDelete
  38. Hi Rich

    Great tool but cannot get it to run nicely when compiled as an exe.
    Seems to be working OK but does not display any data or output in the grid.

    Any ideas?
    Fancy compiling it and posting it?

    Cheers, Boball.

    ReplyDelete
  39. It is a wonderful scritpt no doubt bu send message did not work for me and wondering if you can incorporate the printer info in this. I know there is another script that from the script center give you many other info such as serial numbers of hardware eg: cpu monitor and info about printer. Can u incorporate any of these.

    ReplyDelete
  40. Hi Rich,
    Windows System Administration is an excellent tool! Thank you. On the Local Admins section, is it possible to add the ability to give a user temporary admin rights, like one day or one week? and after the the admin rights expired automatically... Best regards Culem

    Show less





    culem embra

    10:48 AM















    Hi Rich,
    is it possible to add the ability to give a user temporary admin rights, like one day or one week? and after that the admin rights expired automatically... Maybe a new button, "Temp Admins" ?

    Need to broadcast message to all computers on the network, is it possible?

    ReplyDelete
  41. I have found this tool very useful. I am trying to add the ability to stop, start, and restart service commands to the service window. I was able to add the items tot he right click context menu but when i click on the command I get this error in the console.
    You cannot call a method on a null-valued expression.
    At W:\AWSA\AWSA.ps1:653 char:43
    + foreach ($Sel in $lvMain.SelectedItems){($Info | ?{$_.Status -eq
    $Sel.Text}).S ...
    +
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


    cmdlet Stop-Service at command pipeline position 1
    Supply values for the following parameters:
    InputObject[0]:

    Here is my code.
    $btnServices_Click={
    Get-ComputerName
    Initialize-Listview
    $SBPStatus.Text = "Retrieving Services..."
    Update-ContextMenu (Get-Variable cmsService*)
    $XML.Options.Services.Property | %{Add-Column $_}
    Resize-Columns
    $Col0 = $lvMain.Columns[0].Text
    $Info = Get-WmiObject Win32_Service -ComputerName $ComputerName -ErrorVariable SysError | Sort Name
    Start-Sleep -m 250
    if($SysError){$SBPStatus.Text = "[$ComputerName] $SysError"}
    else{
    $Info | %{
    $Item = New-Object System.Windows.Forms.ListViewItem($_.$Col0)
    ForEach ($Col in ($lvMain.Columns | ?{$_.Index -ne 0})){$Field = $Col.Text;$Item.SubItems.Add($_.$Field)}
    $lvMain.Items.Add($Item)
    }
    $SBPStatus.Text = "Ready"
    }
    }
    $cmsServiceStop_Click={
    foreach ($Sel in $lvMain.SelectedItems){($Info | ?{$_.Status -eq $Sel.Text}).Stop()}
    Stop-Service
    }
    $cmsServiceRestart_Click={
    foreach ($Sel in $lvMain.SelectedItems){($Info | ?{$_.Status -eq $Sel.Text}).Restart()}
    ReStart-Service
    }
    $cmsServiceStart_Click={
    foreach ($Sel in $lvMain.SelectedItems){($Info | ?{$_.Status -eq $Sel.Text}).Start()}
    Start-Service
    }

    ReplyDelete
  42. HI Rick,

    Amazing work here.
    You have created one of the best tools way back in 2012. I know i am very late to ask this question in 2016.

    But my Query is very simple one.
    How to enable Copy the data feature in the GUI.
    I have guys who need to copy lots of data about system info. If this feature is enabled it would do wonders to my guys.

    Thanks in Advance

    ReplyDelete
  43. Hi Rick,

    I have added the following button, in order to get local group members information:

    #===================================================================
    $btnGM_Click={
    Get-ComputerName
    Initialize-Listview
    $XML.Options.GroupMembers.Property | %{Add-Column $_}
    Resize-Columns
    $Col0 = $lvMain.Columns[0].Text
    $Colx = $lvMain.Columns[0].Text
    $SBPStatus.Text = "Retrieving Group and Group Memebers..."
    # List local group members on the local or a remote computer
    $OutFile = "C:\Scripts\PowerShell\Get_Local_Group\out-file.txt"
    remove-item $outFile -force

    $computer = [ADSI]("WinNT://" + $ComputerName + ",computer")


    $group = $computer.psbase.children |where{$_.psbase.schemaclassname -eq "group"}

    foreach ($member in $group.psbase.syncroot)
    {$member.name | Out-File -FilePath $OutFile -Append
    }

    # Get-ComputerName
    # Initialize-Listview
    # $XML.Options.GroupMembers.Property | %{Add-Column $_}
    # Resize-Columns
    # $Col0 = $lvMain.Columns[0].Text

    $localgroupNames = Get-Content "C:\Scripts\PowerShell\Get_Local_Group\out-file.txt"
    foreach ($localgroupName in $localgroupNames){

    if ($computerName -eq "") {$computerName = "$env:computername"}

    if([ADSI]::Exists("WinNT://$computerName/$localGroupName,group")) {

    $group = [ADSI]("WinNT://$computerName/$localGroupName,group")
    $Info = @()
    $Group.Members() |
    % {
    $AdsPath = $_.GetType().InvokeMember("Adspath", 'GetProperty', $null, $_, $null)
    # Domain members will have an ADSPath like WinNT://DomainName/UserName.
    # Local accounts will have a value like WinNT://ComputerName/UserName.
    $Prop = $AdsPath.split('/',[StringSplitOptions]::RemoveEmptyEntries)

    $Name = $Prop[-1]
    $Domain = $Prop[-2]
    $class = $_.GetType().InvokeMember("Class", 'GetProperty', $null, $_, $null)

    # $Group = [ADSI]("WinNT://$computerName/$localGroupName,group")
    $member = New-Object PSObject
    $member | Add-Member -MemberType NoteProperty -Name "LocalGroup" -Value $computerName\$localGroupName
    $member | Add-Member -MemberType NoteProperty -Name "Domain Group/User" -Value $name
    $member | Add-Member -MemberType NoteProperty -Name "Domain" -Value $domain
    $member | Add-Member -MemberType NoteProperty -Name "Class" -Value $class

    $Info += $Member
    } # %
    $Info | %{
    $Item = New-Object System.Windows.Forms.ListViewItem($_.$Col0)
    ForEach ($Col in ($lvMain.Columns | ?{$_.index -ne 0})){$Field = $Col.Text;$Item.SubItems.add($_.$Field)}

    $lvMain.Items.Add($Item)

    }


    $Item1 = New-Object System.Windows.Forms.ListViewItem($_.$Colx)
    if($Info.count -eq 0){
    ForEach ($Col in ($lvMain.Columns | ?{$_.index -eq 0})){$Field = $Col.Text;$Item1.SubItems.Add($computerName + "\" + $localGroupName) }

    } # if($Info.count -eq 0)
    $lvMain.Items.Add($Item1)

    }

    }

    $SBPStatus.Text = "Ready"
    }
    # =====================================================================
    I also have added required parameters to the .xml file.

    It is bringing the required result; only problem is the group does not have member assigned it is shifting one column right

    Can you plese help me to fix the issue?

    I will look forward to hear from you.

    Thanks Shaikh

    ReplyDelete
  44. Hi Rich, great tool.
    I would like to create button to make changes on the remote computer.
    For example change the registry value.
    in our environment IE advanced tab is disabled by default. We admins can enable by connecting to the machine from backend or use the PSE command to make changes.

    we use the below command in cmd

    Psexec \\computername reg add "hklm\system\currentcontrolset\services\csc\parameters" /v "FormatDataBase" /t REG_DWORD /d 1 /f

    how could I assign or create a button to execute by using this tool.
    thanks in advance.

    ReplyDelete
  45. Hi Rick,

    About to run "Local Admins" this function always show "Could not retrieve local administrators "

    Can you fix this issue?

    ReplyDelete
  46. Love the tool, use it every day!
    Gave it to a friend in work, but when he right clicks and chooses "Run with Powershell", the black window opens and closes almost immediately. Mine, works fine on Windows 7 and 10. He's using Windows 7 and is admin on his PC.
    Any help would be appreciated.

    ReplyDelete
  47. PS, works if I load it in ISE and run it from there, just not when I right click and say run in powershell.

    ReplyDelete