I'm pretty new to powershell but i've been messing around with it for a bit and wanted to ask for some advice, right now i'm looking to do some of my own datamining (although waiting on admin approval before I fully commit) however i'm having one issue and i wanted to see if someone could help me.
Right now I have simple code in order to pull from a webpage and download locally:
I've got it set up to that each instant will be adding a sum because I plan to produce a huge list.
My issue is that I want to pull from webpages you can only view once logged in, is there a way to view information from this game via PS without logging in or the more likely one, is there a way to pull information by logging in via PS?
New-Object : Cannot find type [System.Net]: verify that the assembly containing this type is loaded. At line:3 char:11 + $cookie = New-Object System.Net + ~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
The property 'Name' cannot be found on this object. Verify that the property exists and can be set. At line:5 char:1 + $cookie.Name = "session" + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound
The property 'Value' cannot be found on this object. Verify that the property exists and can be set. At line:6 char:1 + $cookie.Value = "sessionvalue" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound
The property 'Domain' cannot be found on this object. Verify that the property exists and can be set. At line:7 char:1 + $cookie.Domain = "domain" + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound
You cannot call a method on a null-valued expression. At line:9 char:1 + $sessions.Add($cookie); + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull
Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At line:11 char:19 + Invoke-WebRequest $url -WebSession $session -OutFile $fil + ~~~~ + CategoryInfo : InvalidData: (:) [Invoke-WebRequest], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestC ommand