Skip to content

Instantly share code, notes, and snippets.

## http://wiki.openwrt.org/doc/howto/firstlogin
## First telnet (192.168.1.1:23)
login as: root
root@192.168.1.1's password:
BusyBox v1.22.1 (2014-06-03 08:07:42 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
##AH - AdilHindistan - 2014-06-04
## It's possible to use * when removing multiple printers with similar names (#requires -Module PrintManaement)
D:\> $ComputerName | % { Remove-Printer -ComputerName $_ -name zzz_adil_test* -PassThru}
Name ComputerName Type DriverName PortName Shared Published
---- ------------ ---- ---------- -------- ------ ---------
ZZZ_Adil_Test01 xyzzyzqvm001 Local HP Universal Printing ... IP_11.11.11.11 True False
ZZZ_Adil_Test3 xyzzyzqvm001 Local HP Universal Printing ... IP_11.11.11.14 True False
ZZZ_Adil_Test02 xyzzyzqvm001 Local HP Universal Printing ... IP_11.11.11.01 True False
##AH - AdilHindistan - 2014-05-28
## Delete Group Policy WMI Filters with PowerShell
$wmiFilterAttr = "msWMI-Name", "msWMI-Parm1", "msWMI-Parm2", "msWMI-Author", "msWMI-ID"
H:\> (Get-ADObject -ldapFilter "objectClass=msWMI-Som" -Properties $wmiFilterAttr).where({$_."mswmi-name" -match 'by ws name'})."mswmi-name"
By WS Name 1PARK%
By WS Name 1PK[13579BFJ]%
By WS Name 1PK[2468ACDGHNSV]%
By WS Name CCC1%
##AH - AdilHindistan - 05/19/2014
ISSUE #1:
SERVER
Cannot Access WSUS Node in mmc:
Causes:
1) Network Services lose access to WSUS Content directory
* Fix by restoring permissions
##AH - AdilHindistan - 2014-05-13
## Registry locs for installed software
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
Products table with entries from these registry keys:
##AH - AdilHindistan -2014-05-09
##Ref: http://www.howtogeek.com/school/sysinternals-pro/lesson7/
# Get Public IP displayed in BGINFO
Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://ifconfig.me/ip", False
o.send
echo o.responseText
@AdilHindistan
AdilHindistan / PS_ParameterSets
Created April 23, 2014 19:37
Sample for a complex PowerShell ParameterSet implementation
##AH - AdilHindistan
## Sample for a complex Parameter Set
## The best way to get it right is to write them down as shown in .NOTES
<#
.NOTES
Parameter Sets
P1: SourceDN DestinationDN SourcePercent Recurse
P2: SourceOU DestinationOU SourcePercent Recurse
##AH - Adil Hindistan ASP.NET Deep Dive
## Ref: Deep Dive: Improving Performance in Your ASP.NET App
## URL: http://channel9.msdn.com/Events/Build/2014/3-605 by @LeviBroderick
##Turn on OutputCaching
## RAMMFAR
Resides inside Web.Config = RunAllManagedModulesForAllRequests
IIS will run everything by Asp.net runtime (needed for PHP hosting) otherwise it's overhead as it will not serve the content like txt, images etc that IIS can serve without an ASP.NET call first.
Unless needed disable it so that ASP.NET does not intercept 'all' requests.
Detect if an Attribute is Replicated
isMemberOfPartialAttributeSet=TRUE -> Attribute is getting replicated to GC
objectClass=attributeSchema
## Useful Articles
http://www.theidentityguy.com/articles/2010/6/29/figuring-out-whats-in-the-pas.html
http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/22/how-can-i-determine-which-attributes-are-replicated-to-the-global-catalog.aspx
Also see gist: https://gist.github.com/AdilHindistan/9795565
##AH - AdilHindistan - PSMon
#post: http://www.adilhindistan.com/2013/08/work-around-printuidll-quirkiness-on-xp.html
Remove all under
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices\
RegSetValue - Add printers
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Devices\
HKCU\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts