VBA find the REAL last used cell - Tek-Tips
VBA identify UsedRange OR last/first column/row etc. Tek-Tips
VBA So where exactly do I put this macro code then?? Tek-Tips
VBA Tips A Pop-up Calendar for Excel
Pearson Software Consulting, LLC excel pages
Anthony's Excel VBA Page - Excel Tutorial - Excel Consultant - Excel Consulting
Range Object and Cells Property
Help and Tips on Excel MacrosThe Programming Tools
Testing Macros in the Visual Basic Editor for Excel
"Dell OpenManage Deployment Toolkit, Utiliity"
Introduction Dell OpenManage Deployment Toolkit Version 1.3 Command Line Interface Reference Guide
Query Active Directory for Information About a User
Searching Active Directory
Band-in-a-Box QuickStart Tutorial: 128k WMV .zip download
Making a New Song Arrangement
Creating Exchange Users with Excel (Part 1)
==========================================
Looping Through Cells in a Named Range
http://www.mindspring.com/~tflynn/excelvba.html
The following example loops through each cell in a named range by using a For Each...Next loop. If the value of any cell in the range exceeds the value of limit, the cell color is changed to yellow.
Sub ApplyColor()
Const Limit As Integer = 25
For Each c In Range("MyRange")
If c.Value > Limit Then
c.Interior.ColorIndex = 27
End If
Next c
End Sub
Saturday, December 8, 2007
Monday, December 3, 2007
group policy
Advanced Group Policy Management (AGPM).
The Optimized Desktop combines the Windows Vista Enterprise and the Microsoft Desktop Optimization Pack to provide powerful technologies that help you secure, efficiently manage, and lower the costs of your organization's desktop infrastructure.
Welcome to GPOGUY.COM
Enforce system policies with the Group Policy Diagnostic Best Practice Analyzer
Top Group Policy Downloads
Windows Server 2003 Group Policy old home
Windows Server Group Policy new home
Microsoft Developer Network group policy
14-Part Webcast Series About Group Policy
petri gpo intro
grouppolicy - Group Policy Wiki
best practices
Best Practices for Designing Group Policy
Best Practices for Configuring Group Policy Objects
Best Practices for Configuring Group Policy Objects
Download details Group Policy Diagnostic Best Practice Analyzer for Windows Server 2003 (KB940122)
Introduce best practices for Group Policy configuration with the help of this PowerPoint presentation, from TechRepublic - Downloads - TechRepublic
Community
•
Group Policy Team Blog
•
Group Policy Wiki
Getting Started
•
Download Group Policy Management Console (GPMC)
•
Step-by-Step Guide to Using Group Policy Management Console
•
Checklist: Using Group Policy Management Console
•
Group Policy Management Console Overview
The Optimized Desktop combines the Windows Vista Enterprise and the Microsoft Desktop Optimization Pack to provide powerful technologies that help you secure, efficiently manage, and lower the costs of your organization's desktop infrastructure.
Welcome to GPOGUY.COM
Enforce system policies with the Group Policy Diagnostic Best Practice Analyzer
Top Group Policy Downloads
Windows Server 2003 Group Policy old home
Windows Server Group Policy new home
Microsoft Developer Network group policy
14-Part Webcast Series About Group Policy
petri gpo intro
grouppolicy - Group Policy Wiki
best practices
Best Practices for Designing Group Policy
Best Practices for Configuring Group Policy Objects
Best Practices for Configuring Group Policy Objects
Download details Group Policy Diagnostic Best Practice Analyzer for Windows Server 2003 (KB940122)
Introduce best practices for Group Policy configuration with the help of this PowerPoint presentation, from TechRepublic - Downloads - TechRepublic
Community
•
Group Policy Team Blog
•
Group Policy Wiki
Getting Started
•
Download Group Policy Management Console (GPMC)
•
Step-by-Step Guide to Using Group Policy Management Console
•
Checklist: Using Group Policy Management Console
•
Group Policy Management Console Overview
Sunday, December 2, 2007
Perform an AD Search Using Alternate Credentials
Perform a Search Using Alternate Credentials
Microsoft Windows XP - Create a shortcut using runas command parameters
'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2007
'
' NAME:
'
' AUTHOR: mike mccafferty , mmcc
' DATE : 12/2/2007
'
' COMMENT: sites of interest
' http://www.windowsitlibrary.com/Content/2026/08/2.html
' using runAs with a shortcut
' http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_security_runas_shortcut.mspx?mfr=true
' ADU&C runas /user:DomainName\administrator "mmc %windir%\system32\dsa.msc"
' ADU&C runas /netonly /user:DomainName\UserName "mmc.exe dsa.msc"
'
'==========================================================================
Sub WMIalternateCreds1()
' From the book "Windows XP Cookbook"
' ISBN: 0596007256
' Note that you cannot use this to connect to the local machine.
' ------ SCRIPT CONFIGURATION ------
strServer = "" ' e.g. wks01
strUser = "" ' e.g. AMER\rallen.adm
strPasswd = ""
' ------ END CONFIGURATION ---------
on error resume next
set objLocator = CreateObject("WbemScripting.SWbemLocator")
set objWMI = objLocator.ConnectServer(strServer, "root\cimv2", _
strUser, strPasswd)
if Err.Number <> 0 then
WScript.Echo "Authentication failed: " & Err.Description
end if
' Now you can use the objWMI object to get an instance of a class
' or perform a WQL query. Here is an example:
colDisks = objWMI.InstancesOf("Win32_LogicalDisk")
End Sub
Sub ADalternateCreds2()
Dim objConn
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=ADSDSOObject;" & _
"User ID=MyUserID;Password=MyPassword;"
objConn.Open
End Sub
Sub ADalternateCreds3()
' You get a choice, you can either
' hard-code the Domain Name (or a Domain Controller Name) only,
' then get the Distinguished Name from Root DSE:
'
Const DOMAIN_NAME = ""
Set objLDAP = GetObject("LDAP:")
Set objRootDSE = objLDAP.OpenDSObject("LDAP://" & DOMAIN_NAME &_
"/RootDSE", strUsername, strPassword)
'Or Hardcode both, and just connect directly to the target container:
Const DOMAIN_NAME = ""
Const CONTAINER_PATH = "OU=SomeOU,DC=SomeDomain,DC=local"
Set objLDAP = GetObject("LDAP:")
Set objRootDSE = objLDAP.OpenDSObject("LDAP://" & DOMAIN_NAME &_
"/" & CONTAINER_PATH, strUsername, strPassword)
' You would have to specify a value for strUsername and strPassword in all cases.
'
' Personally, I favour pulling the Distinguished Name from RootDSE rather than hard-coding it. It just makes things easier to maintain for me.
'
' Chris
End Sub
Sub ADalternateCreds1()
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Properties("User ID") = "Administrator"
objConnection.Properties("Password") = "+77m5trgJo!"
objConnection.Properties("Encrypt Password") = TRUE
objConnection.Properties("ADSI Flag") = 1
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
"SELECT Name FROM 'LDAP://dc=fabrikam,dc=com' WHERE objectCategory='user'"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("Name").Value
objRecordSet.MoveNext
Loop
end sub
Microsoft Windows XP - Create a shortcut using runas command parameters
'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2007
'
' NAME:
'
' AUTHOR: mike mccafferty , mmcc
' DATE : 12/2/2007
'
' COMMENT: sites of interest
' http://www.windowsitlibrary.com/Content/2026/08/2.html
' using runAs with a shortcut
' http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_security_runas_shortcut.mspx?mfr=true
' ADU&C runas /user:DomainName\administrator "mmc %windir%\system32\dsa.msc"
' ADU&C runas /netonly /user:DomainName\UserName "mmc.exe dsa.msc"
'
'==========================================================================
Sub WMIalternateCreds1()
' From the book "Windows XP Cookbook"
' ISBN: 0596007256
' Note that you cannot use this to connect to the local machine.
' ------ SCRIPT CONFIGURATION ------
strServer = "
strUser = "
strPasswd = "
' ------ END CONFIGURATION ---------
on error resume next
set objLocator = CreateObject("WbemScripting.SWbemLocator")
set objWMI = objLocator.ConnectServer(strServer, "root\cimv2", _
strUser, strPasswd)
if Err.Number <> 0 then
WScript.Echo "Authentication failed: " & Err.Description
end if
' Now you can use the objWMI object to get an instance of a class
' or perform a WQL query. Here is an example:
colDisks = objWMI.InstancesOf("Win32_LogicalDisk")
End Sub
Sub ADalternateCreds2()
Dim objConn
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=ADSDSOObject;" & _
"User ID=MyUserID;Password=MyPassword;"
objConn.Open
End Sub
Sub ADalternateCreds3()
' You get a choice, you can either
' hard-code the Domain Name (or a Domain Controller Name) only,
' then get the Distinguished Name from Root DSE:
'
Const DOMAIN_NAME = "
Set objLDAP = GetObject("LDAP:")
Set objRootDSE = objLDAP.OpenDSObject("LDAP://" & DOMAIN_NAME &_
"/RootDSE", strUsername, strPassword)
'Or Hardcode both, and just connect directly to the target container:
Const DOMAIN_NAME = "
Const CONTAINER_PATH = "OU=SomeOU,DC=SomeDomain,DC=local"
Set objLDAP = GetObject("LDAP:")
Set objRootDSE = objLDAP.OpenDSObject("LDAP://" & DOMAIN_NAME &_
"/" & CONTAINER_PATH, strUsername, strPassword)
' You would have to specify a value for strUsername and strPassword in all cases.
'
' Personally, I favour pulling the Distinguished Name from RootDSE rather than hard-coding it. It just makes things easier to maintain for me.
'
' Chris
End Sub
Sub ADalternateCreds1()
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Properties("User ID") = "Administrator"
objConnection.Properties("Password") = "+77m5trgJo!"
objConnection.Properties("Encrypt Password") = TRUE
objConnection.Properties("ADSI Flag") = 1
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
"SELECT Name FROM 'LDAP://dc=fabrikam,dc=com' WHERE objectCategory='user'"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("Name").Value
objRecordSet.MoveNext
Loop
end sub
Log Parser 2.2
WindowsDevCenter.com -- Using Log Parser 2.2
Log Parser 2.2 and ASP.NET
TechNet Webcast: Efficient Data Mining with Log Parser 2.2 (Level 300)
Microsoft TechNet column Tales from the Script - January 2005 All You Need is Log (Well, Log Parser)
Finding Duplicate Names in Active Directory - blog.scottlowe.org - The weblog of a senior engineer specializing in virtualization, storage, and servers
Complex Queries Against Active Directory - blog.scottlowe.org - The weblog of a senior engineer specializing in virtualization, storage, and servers
Log Parser 2.2 and ASP.NET
TechNet Webcast: Efficient Data Mining with Log Parser 2.2 (Level 300)
Microsoft TechNet column Tales from the Script - January 2005 All You Need is Log (Well, Log Parser)
Finding Duplicate Names in Active Directory - blog.scottlowe.org - The weblog of a senior engineer specializing in virtualization, storage, and servers
Complex Queries Against Active Directory - blog.scottlowe.org - The weblog of a senior engineer specializing in virtualization, storage, and servers
Saturday, December 1, 2007
regularExpressions 2
regex101
Regular Expression Visualizers for VS 2005
parse-textObject – AWK with a vengeance.
Carl J » 21+ FREE Regular Expression Tools & Resources (for .Net Developers)
For those starting out with Regex'es or those who are old hands here are some resources to help.
.NET Framework Developer's Guide .NET Framework Regular Expressions
Character Classes such as . \d \s [ ] defined.
Quantifiers such as + * ? { }
Options such as Multiline Compiled SingleLine
.Net Classes such as Regex Match MatchCollection GroupCollection
Examples
Tutorials
30 Minute Regex Tutorial on CodeProject.
.Net Coders Regex Overview breaks down groups and matches in one of the best overviews of the topics.
Introduction to Regular Expressions on CodeProject.
Understanding Basic Regular Expression Syntax (Section 3.10.) in the CodeProject's book chapter preview Microsoft Visual C# .NET 2003 Developer's Cookbook. Its a preview of Chapter 3: Strings and Regular Expressions.
Eric Gunnerson's Regex 101. A listing of differing match topics. Great for a beginner to look at after acquiring the basics of Regex, many examples.
How to: Search Strings Using Regular Expressions (C# Programming Guide) in MSDN Library.
Topics
Regular Expressions and the If Conditional on OmegaCoder's blog.
Want faster regular expressions? Maybe you should think about that IgnoreCase option...
(Compilation) For an overview of the three different modes, interpreted, on-the-fly compiled and precompiled see the MSDN article CLR Inside Out, "Base Class Library Performance Tips and Tricks"
(Compilation To an Assembly) section 3.13. Building a Regular Expression Library in the CodeProject's book chapter preview Microsoft Visual C# .NET 2003 Developer's Cookbook. Its a preview of Chapter 3: Strings and Regular Expressions.
Regex and Balanced Matching by Ryan Byington (MSFT) see als How to use RegexOptions IgnorePatternWhitspace from the Base Class Library (BCL) Team Blog.
A look into Matching Balanced Constructs with .NET Regular Expressions by Wes Haggard.
Regex Hangs My Expression by David Gutierrez in the BCL team blog.
The RegexOptions.Compiled Flag and Slow Performance on 64-Bit .NET Framework 2.0 BCL Team Blog
Programs (Not Sponsored or Endorsed by Microsoft) Just listed; no order implied.
Regular Expression Designer (.Net 1)
Expresso (.Net 2)(Free but registration) Used by most regex'ers; tool updated in 2007 to version 3.
RegEx Buddy ($)
Regular Expression WorkBench (.Net 1.1)(Free)
Regular Expression Visualizer for VS2005 by Roy Osherove. Write up about it here at Visual Studio Hacks. Its a VS2005 add-in.
Regulator also by Osherove, which is a stand alone regex tester.
Web Based Regex Testers
.Net Coders Expression Tester
Regex Testor by RegExLib.com main site has library of regex'es for browsing.
Other Non Regex Tools
GPLEX Lexical Analyzer for when Regex comes up short and a forum post that gives an example of its usage.
Forums
RegexAdvice.com is where the core regexer's, many different languages not just .net, give advice. Let them know you are using the .Net version.
Google Groups Regex Discussing Regular Expressions in variuos tools (perl, php, egrep, PowerGREP, .NET, procmail etc. etc). Let's help each other build effective regexes!
ASP Message Board : Regular expressions general discussions.
Books
Regular Expressions with .NET (ebook) by Dan Appleman.
Mastering Regular Expressions by Jeffrey Friedl.
Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta.
Regular Expression Recipes: A Problem-Solution Approach (ebook) by Nathan Good.
Regular Expression Visualizers for VS 2005
parse-textObject – AWK with a vengeance.
Carl J » 21+ FREE Regular Expression Tools & Resources (for .Net Developers)
For those starting out with Regex'es or those who are old hands here are some resources to help.
.NET Framework Developer's Guide .NET Framework Regular Expressions
Character Classes such as . \d \s [ ] defined.
Quantifiers such as + * ? { }
Options such as Multiline Compiled SingleLine
.Net Classes such as Regex Match MatchCollection GroupCollection
Examples
Tutorials
30 Minute Regex Tutorial on CodeProject.
.Net Coders Regex Overview breaks down groups and matches in one of the best overviews of the topics.
Introduction to Regular Expressions on CodeProject.
Understanding Basic Regular Expression Syntax (Section 3.10.) in the CodeProject's book chapter preview Microsoft Visual C# .NET 2003 Developer's Cookbook. Its a preview of Chapter 3: Strings and Regular Expressions.
Eric Gunnerson's Regex 101. A listing of differing match topics. Great for a beginner to look at after acquiring the basics of Regex, many examples.
How to: Search Strings Using Regular Expressions (C# Programming Guide) in MSDN Library.
Topics
Regular Expressions and the If Conditional on OmegaCoder's blog.
Want faster regular expressions? Maybe you should think about that IgnoreCase option...
(Compilation) For an overview of the three different modes, interpreted, on-the-fly compiled and precompiled see the MSDN article CLR Inside Out, "Base Class Library Performance Tips and Tricks"
(Compilation To an Assembly) section 3.13. Building a Regular Expression Library in the CodeProject's book chapter preview Microsoft Visual C# .NET 2003 Developer's Cookbook. Its a preview of Chapter 3: Strings and Regular Expressions.
Regex and Balanced Matching by Ryan Byington (MSFT) see als How to use RegexOptions IgnorePatternWhitspace from the Base Class Library (BCL) Team Blog.
A look into Matching Balanced Constructs with .NET Regular Expressions by Wes Haggard.
Regex Hangs My Expression by David Gutierrez in the BCL team blog.
The RegexOptions.Compiled Flag and Slow Performance on 64-Bit .NET Framework 2.0 BCL Team Blog
Programs (Not Sponsored or Endorsed by Microsoft) Just listed; no order implied.
Regular Expression Designer (.Net 1)
Expresso (.Net 2)(Free but registration) Used by most regex'ers; tool updated in 2007 to version 3.
RegEx Buddy ($)
Regular Expression WorkBench (.Net 1.1)(Free)
Regular Expression Visualizer for VS2005 by Roy Osherove. Write up about it here at Visual Studio Hacks. Its a VS2005 add-in.
Regulator also by Osherove, which is a stand alone regex tester.
Web Based Regex Testers
.Net Coders Expression Tester
Regex Testor by RegExLib.com main site has library of regex'es for browsing.
Other Non Regex Tools
GPLEX Lexical Analyzer for when Regex comes up short and a forum post that gives an example of its usage.
Forums
RegexAdvice.com is where the core regexer's, many different languages not just .net, give advice. Let them know you are using the .Net version.
Google Groups Regex Discussing Regular Expressions in variuos tools (perl, php, egrep, PowerGREP, .NET, procmail etc. etc). Let's help each other build effective regexes!
ASP Message Board : Regular expressions general discussions.
Books
Regular Expressions with .NET (ebook) by Dan Appleman.
Mastering Regular Expressions by Jeffrey Friedl.
Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta.
Regular Expression Recipes: A Problem-Solution Approach (ebook) by Nathan Good.
Active Directory (AD) Organizational Units,
Subscribe to:
Posts (Atom)