Console Capture This topic contains 3 replies, has 3 voices, and was last updated by Barry Walledge 3 months, 2 weeks ago.Viewing 4 posts - 1 through 4 (of 4 total)Author PostsJune 14, 2016 at 3:17 pm #42902 Barry WalledgeParticipantHi GuysNot sure if this is possible but I am calling a vpn command line tool via:cmd /c '"C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" -s > Login error.Is there anyway to capture this text and exit based upon >>Login error.?I can output this to a file but this process runs infinitum and I cant find away to read the file to search for the text and thus end the process.Is this even possible? Can you suggest any better way?ThanksBarryJune 14, 2016 at 3:29 pm #42906 Don JonesKeymasterGenerally,$x = [command]Will capture the command output, as text, in $x. You would then need to parse it once the command completes. However, if the command never completes... I'm not sure what you'd do.June 14, 2016 at 8:45 pm #42942 Geir Endre JenssenParticipantAnyConnect has its own Eventlog. Get-WinEvent -Logname 'Cisco AnyConnect Secure Mobility Client' Maybe you can use an event in it to trigger some action when that Login error occurs.June 15, 2016 at 12:36 pm #43032 Barry WalledgeParticipantHi GeirMany thanks for your excellent idea. I've been able to use that and now have a working solution.Many thanksBarryAuthor PostsViewing 4 posts - 1 through 4 (of 4 total)You must be logged in to reply to this topic.