This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param([String]$FileName='ADGroups.csv') | |
| Import-Module ActiveDirectory 2>$nul | |
| $groups=ForEach ($i in Get-ADGroup -Filter 'groupcategory -eq "security"' -searchbase "OU=Domain Users,dc=ORGANITATION,dc=local" | Where-Object { !($_.Name -like "*Domain*")} ){ | |
| Get-ADGroupMember $i | Where-Object {($_.objectClass -eq "user")} | Select @{n='DistributionName';e={$i.Name}},Name,SamAccountName | |
| } | |
| $groups |Export-CSV $FileName -NoTypeInformation -Encoding UTF8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param([String]$printerTarget='',[String]$printServer='') | |
| $conex="\\$printServer\$printerTarget" | |
| if ((Get-Printer).Name -eq $conex){ | |
| "Printer already installed: $($printerTarget)" | |
| }else{ | |
| $printClass = [wmiclass]"Win32_Printer" | |
| $printClass.AddPrinterConnection($conex) | Out-Null | |
| (Get-WmiObject -Class Win32_Printer -Filter "ShareName='$($printerTarget)'").SetDefaultPrinter() | Out-Null | |
| "Installed: $($printerTarget)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param([String]$FileName='DistributionLists.csv') | |
| Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 2>$nul | |
| $groups=ForEach ($i in Get-DistributionGroup){ | |
| Get-DistributionGroupMember $i | Select @{n='DistributionName';e={$i.Name}},@{n='DistributionMail';e={$i.PrimarySmtpAddress}},Name,PrimarySmtpAddress | |
| } | |
| $groups |Export-CSV $FileName -NoTypeInformation -Encoding UTF8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| acl clients src <IP> | |
| http_access allow clients | |
| http_port 8080 | |
| via off | |
| forwarded_for off | |
| follow_x_forwarded_for deny all | |
| request_header_access X-Forwarded-For deny all | |
| header_access X_Forwarded_For deny all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from urllib import request as urlrequest | |
| proxy_host = 'ip:port' | |
| url = 'http://www.httpbin.org/ip' | |
| #If returns 2 IP means that X-Forwarded isn't disabled | |
| req = urlrequest.Request(url) | |
| req.set_proxy(proxy_host, 'http') |
NewerOlder