Search found 194 matches
- Tue Feb 06, 2018 11:31 am
- Forum: PowerShell GUIs
- Topic: Job pinger against multiple DNS
- Replies: 13
- Views: 4541
Re: Job pinger against multiple DNS
So I was thinking about that as well but that's how it's always been and it's always pulled the correct suffix and attached to the computer name so I would always ( always ) end up with PC1.lan.net is online! or PC.wlan.net is offline! since wlan.net is the last suffix in my list This is the script ...
- Tue Feb 06, 2018 10:50 am
- Forum: PowerShell GUIs
- Topic: Job pinger against multiple DNS
- Replies: 13
- Views: 4541
Re: Job pinger against multiple DNS
Seems like it doesn't go into the foreach ($suffix IN $suffixes) Param ( [string[]]$Computers, [string[]]$suffixes ) foreach ($computer in $Computers) { IF (Test-Connection $computer -Count 1 -Quiet) { "$computer ASDF" } else { foreach ($suffix IN $suffixes) { if (Test-Connection "$co...
- Tue Feb 06, 2018 8:54 am
- Forum: PowerShell GUIs
- Topic: Job pinger against multiple DNS
- Replies: 13
- Views: 4541
Job pinger against multiple DNS
So I have a script I've been using for over a year now that's perfect. I'm attempting to move it into a Job so my form doesn't freeze. In the ISE, it returns the correct results If I put it in a job, it returns the PC is not online JobPingIT.psf I know it can see the SUFFIXES because if I change lin...
- Fri Jan 19, 2018 8:01 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Re: Switch statement
So I just looked into this mxtrinidad
and two different models did not retrieve SystemFamily, SystemSKUNumber whereas the regkeys are created based off of SCCM ( which is what I've been told )
So using the regkey works perfectly for me
Unless there is some reason to use gwmi over remote registry
and two different models did not retrieve SystemFamily, SystemSKUNumber whereas the regkeys are created based off of SCCM ( which is what I've been told )
So using the regkey works perfectly for me
Unless there is some reason to use gwmi over remote registry
- Fri Jan 19, 2018 7:25 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Re: Switch statement
You can easily use a combobox as a label. You can also just filter the CSV: $label.Text = ($csv | Where{$_.Column1 -eq 'somevalue'}).Column2 Yeeeeees! $computers = 'Server1 $csv = Import-Csv '\\remotepath\Get-AppsModelSwitch.csv' -Delimiter ',' -Header @("Name", "Value") $key = ...
- Fri Jan 19, 2018 6:52 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
- Fri Jan 19, 2018 6:42 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Re: Switch statement
Hmmm.. I guess I'm confused. This is mostly my script to update the label. $computers = 'Computer1' $key = 'HARDWARE\DESCRIPTION\System\BIOS' $valuename = 'SystemProductName' $Model = foreach ($computer in $computers) { $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $compute...
- Fri Jan 19, 2018 6:15 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Re: Switch statement
Well I'm updating a label, so it can't be either of those. Remember, I'm turning a reg key value, into an "easy on the eyes" label
- Fri Jan 19, 2018 5:50 am
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Re: Switch statement
What is your question or are you just discussing what you would like to do? My question is how do I move my switch statement from inside the script of my .exe to an external .txt or .csv file This is what I currently have in my form that I want to move external $Model = switch ($model.trim()) { 'HP...
- Thu Jan 18, 2018 9:40 pm
- Forum: PowerShell GUIs
- Topic: Switch statement
- Replies: 11
- Views: 4324
Switch statement
Wasn’t sure if I should post this in the GUI or Script forum so I apologize. I’m creating a form for techs to use and gather info from computers. One of my labels is for the Model of the PC. Due to the fact some SystemProductName (regkey value) are numbers (Lenovo) I’m forced to use switch statement...