Difference between revisions of "Powershell"

From Mesopoly 3.0
Jump to navigation Jump to search
(Created page with "$mminfo24 = (mminfo -s servername-X)| Out-String $numbass = ($mminfo24.Split(" "))[6] Write-Host $numbass $Username="maybedomain\yourcoolusername" $Password="yourcoolpassword...")
 
 
Line 1: Line 1:
 +
<pre>
 
$mminfo24 = (mminfo -s servername-X)| Out-String
 
$mminfo24 = (mminfo -s servername-X)| Out-String
 
$numbass = ($mminfo24.Split(" "))[6]
 
$numbass = ($mminfo24.Split(" "))[6]
Line 17: Line 18:
 
$WebClient.DownloadString($url)
 
$WebClient.DownloadString($url)
 
##$WebClient.DownloadFile($url, $path)
 
##$WebClient.DownloadFile($url, $path)
 +
</pre>

Latest revision as of 13:02, 2 August 2016

$mminfo24 = (mminfo -s servername-X)| Out-String
$numbass = ($mminfo24.Split(" "))[6]
Write-Host $numbass

$Username="maybedomain\yourcoolusername"
$Password="yourcoolpassword"
$WebProxy = New-Object System.Net.WebProxy("http://wproxy11:8080",$true)
##$url="http://www.vinodol.com/rosnumba?brojka=$numbass"
$url="http://www.vinodol.com/"


$WebClient = New-Object net.webclient

$WebClient.Proxy=$webproxy
$WebClient.proxy.Credentials = New-Object System.Net.NetworkCredential($Username, $Password)
##$path="C:\Users\a_zlatkoi\test.xml"
$WebClient.DownloadString($url)
##$WebClient.DownloadFile($url, $path)