Matt Damoz

1

votes
1

answer
92

views

Powershell websession

My question is, I'm logging into a website using invoke web-request. I'm able to successfully login to the website. My problem is that, when I go to a url, it thinks I'm not logged in. I'm using the same session variable to login and to go to the specific page. This is the screenshot showing I'm...
Matt Damoz
0

votes
0

answer
5

views

Meraki MX68 dropping internet

My MX68 keeps loosing internet once in a while each day. I have a cable going from our Comcast modem to WAN 1 on the MX68. Sometimes when I ping 10.1.10.1, I can't ping and the MX68 disconnects from the internet. If I unplug the cable on the modem connected to the MX68, and reconnect, I'll get in...
Matt Damoz
1

votes
2

answer
2.2k

views

Finding line numbers for string

I have a text file, 1=564 698=697 54=445 4=697 664=45 4=697 Notice how I have two occurrences of 4=697 $INI = '\\hqfs1\users\tantony\PowerShell\CalenderGroup\config.ini' $Read_INI = Get-Content $INI $find = $Read_INI | Where-Object {$_ -cmatch '^\d+=697$'} foreach($i in $find) { $Read_INI | Sel...
Matt Damoz
2

votes
0

answer
354

views

Run powershell when windows is locked?

Is it possible to run power shell while windows is locked? while (Get-Process | Where-Object { $_.Name -eq 'LogonUI' }) { Write-Host 'Windows locked out' }
Matt Damoz
2

votes
2

answer
45

views

while loop not terminating when user presses “n”

I'm trying to create a menu using a while loop. I want the menu to run till the user presses 'n' or 'N'. $MenuChoice while ($MenuChoice -ne 'n' -or $MenuChoice -ne 'N') { Write-Host 'Run again? y/n ' Read-Host $MenuChoice } The problem is that, it runs whether I press 'N' or 'Y'. Do I need to decla...
Matt Damoz