Skip to content

Commit

Permalink
Create SystemInfo.ps1
Browse files Browse the repository at this point in the history
Gets System Info from each computer on the domain
  • Loading branch information
Nik-enterprise-dev committed Mar 13, 2021
0 parents commit bc40c9f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SystemInfo.ps1
@@ -0,0 +1,7 @@
Import-Module ActiveDirectory
$userName = 'nik'
$userPassword = 'ToastyBoi!'
$psCreds = ConvertTo-SecureString $userPassword -AsPlainText -Force
$Computers = New-Object -TypeName "System.Collections.ArrayList"
$Computer = $(Get-ADComputer -Filter * | Select-Object Name)
for ($index = -1; $index -lt $Computer.count; $index++) { Invoke-Command -ComputerName $index {systeminfo} }

0 comments on commit bc40c9f

Please sign in to comment.