Grab *all* cookies from WebSession object

Been wanting to pull cookies from Websession without knowing the domain. I’ve been attempting to make a POSH version of this following solution: https://stackoverflow.com/questions/13675154/how-to-get-cookies-info-inside-of-a-cookiecontainer-all-of-them-not-for-a-spe/36665793#36665793 However I’m having difficulty translating the InvokeMember into something appropriate for Powershell as I’m not familiar with reflection/invocation. Any ideas? submitted by /u/virgnar [link] [comments]

Dont want info for every server.

If I want a message only when a DHCP is active, how do I do? Dont want info for every server: $servers = Get-Content -Path C:tmpservers.csv foreach ($server in $servers) { Invoke-Command -ComputerName $server -ScriptBlock { Get-NetIPInterface | Select-Object InterfaceAlias, AddressFamily, dhcp, ConnectionState | Where-Object {$.InterfaceAlias -eq “ethernet” -and $.AddressFamily -eq “ipv4” -and $_.Dhcp -eq […]

Issue Deserializing Json to Dynamic

Hello, When i deserialize using System.Web.Helpers.Json i get nice clean dynamics like this https://imgur.com/Rj9bbD0. When i deserialize using Newtonsoft.Json i get dynamics bloated with all kinds of extra data, making it harder to get to the pertinent information. Like this https://imgur.com/RB0Gv5I My question, does anyone know a way to have the newtonsoft library create clean […]