Logging on with Your Alter Ego



Logging on with Your Alter Ego
Nothing is more important than a WMI or ADSI connections, the use of alternative credentials. One thorny point alternate certificate is obtained Password Remember, you never hard-code passwords into the script.

Following is a handy feature, you can use the collection of password from the command line (can only run on XP or 2003, and the script is currently being run by the cscript, rather than wscript): function getpassword (strusername) bleak objscriptpw, strpassword a objscriptpw = createobject ( "scriptpw.password") wscript.echo "Password" _ strusername ", and press Enter:" strpassword = = objscriptpw.getpassword getpassword strpassword this function I use this feature Below made WMI connections, the use of alternative evidence (ie, other than the certificate of my script is implementation): bleak objlocator, objwmi a objlocator = createobject ( "wbemscripting.swbemlocator" ) error in the next year to resume a objwmi = objlocator.connectserver ( "server1" _ "rootcimv2", "administrator", _ getpassword ( " administrator ")) If mistakes <> 0, then wscript.echo" error message: " err.description otherwise You has been connected to - use o bjwmi.execquery for the implementation of the end if a similar trick works ADSI connections: constants ads_secure_authentication = 1 objroot bleak, objdomain a objroot = getobject ( "LDAP:") error in the next year to resume a objdomain = objroot.opendsobject (_ "LDAP: / / dc = company, dc = com ", _ " CN = admindon, Europe = administrator, DC = company, dc = com ", _ getpassword (" @ company admindon . com "), _ ads_secure_authentication) If mistakes <> 0, then wscript.echo" error message: " err.description otherwise You have connections - o bjdomain in this , for example, represents the domain If the end these are easier to maintain your position reusable library script clips.


Latest Industry News:
- Taking the Plunge
- Cisco Fleshes Out NAC
- Vista Updated to Display Low-End Graphics Desktop
- Is Somebody Watching Me?
- Cisco's Completely Unsurprising Consumer Play
- Programmer Stole, Sold Sentry Insurance Customer Data, Company Says
- Cisco Revamps Application Network Services Platform
- Microsoft Announces ISA Server Exam
- Take Command of GPO Processing
- Windows Update Woes
- CT Solutions
- HP Joins the 1U Server Crowd
- Managing Aspections
- New Web Site Opens Technology to Women, Minority-Owned Businesses
- NSF Awards Spelman $2.5 Million for Informatics Project
- Lindows Changes Name to Linspire
- MBSA 2.0 Posted to the Web
- Cisco Workers Pushed on Video Conference
- 'Astoria' CTP Gains Silverlight Compatibility
- FoxPro 9 Service Pack, "Sedna" Beta Released