Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Clears the console
- Clear-Host
- function requestMonitors()
- {
- $monitorlists = New-Object System.Collections.ArrayList
- [int] $monitors = Read-Host("How many monitors do you have? ")
- if ( [int]$monitors -ge 1 )
- {
- for ($i=1; $i -le $monitors; $i++)
- {
- $input = Read-Host "What is the serial number of the " $i "Monitor? "
- $monitorlists += $input
- }
- foreach($serialnumber in $monitorlists)
- {
- Write-Host($serialnumber)
- Write-Host("`n")
- }
- return $monitorlists
- }
- else
- {
- Write-Host("You expect me to believe you don't use any monitors... ")
- requestMonitors
- }
- }
- $myList = requestMonitors
- $key = Read-Host "Hit enter to Exit or e to export list"
- if($key -eq "e"){
- $myList | Out-File -FilePath ExportedList.txt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement