Username: nsroot
Password: nsroot
Default login Citrix Netscaler
Reply
Username: nsroot
Password: nsroot
For($i = 1; $i -le 100; $i++)
{
Write-Progress -Activity "Progress bar" -status "Done $i" -percentComplete ($i)
write-host $i
Start-Sleep -s 2
}
$sn = "CZC12068T4"
$country = "DK"
$body = "rows%5B0%5D.item.serialNumber=" + $sn + "&rows%5B0%5D.item.countryCode=" + $country + "&rows%5B1%5D.item.serialNumber=&rows%5B1%5D.item.countryCode=US&rows%5B2%5D.item.serialNumber=&rows%5B2%5D.item.countryCode=US&rows%5B3%5D.item.serialNumber=&rows%5B3%5D.item.countryCode=US&rows%5B4%5D.item.serialNumber=&rows%5B4%5D.item.countryCode=US&rows%5B5%5D.item.serialNumber=&rows%5B5%5D.item.countryCode=US&rows%5B6%5D.item.serialNumber=&rows%5B6%5D.item.countryCode=US&rows%5B7%5D.item.serialNumber=&rows%5B7%5D.item.countryCode=US&rows%5B8%5D.item.serialNumber=&rows%5B8%5D.item.countryCode=US&rows%5B9%5D.item.serialNumber=&rows%5B9%5D.item.countryCode=US&submitButton=Submit"
$r=Invoke-WebRequest -Uri ("http://h20564.www2.hp.com/hpsc/wc/public/find") -Method POST -Body $body
$ss = $r.RawContent.IndexOf("Wty: HP Support for Initial Setup")
# Extra run, in case of not found.
if($ss -lt 100) {
$r=Invoke-WebRequest -Uri ("http://h20564.www2.hp.com/hpsc/wc/public/find") -Method POST -Body $body
$ss = $r.RawContent.IndexOf("Wty: HP Support for Initial Setup")
}
if($ss -gt 100) {
$result = $r.rawcontent.substring($ss+42,20)
$end = $result.IndexOf("</")
$result = $result.Substring(0,$end)
get-date -Date $result -UFormat "%Y/%m/%d"
}
else {
$result = "not found"
$result
}
net localgroup administrators
(Get-ADUser userName –Properties MemberOf | Select-Object MemberOf).MemberOf
Exchange management shell
get-mailpublicfolder mail@domain.com | get-publicfolderstatistics |select AdminDisplayName, FolderPath
If you want to set rights on Calendar object, you need to know the name of the folder.
The name of the folder is localized.
$username = "Test user"
$calname = Get-MailboxFolderStatistics -Identity $username -FolderScope calendar | where-object {$_.FolderType -eq "Calendar"}
$calendar = $username + ":\" + $calname.Name.toString()