Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Tuesday, March 10, 2009

Thursday, February 26, 2009

getip




====================== ie progress msg/bar ==================







===================== network adaptot settings=================


Assign a Static IP Address
Assign the DNS Domain for a Network Adapter
Assign the WINS Server for a Network Adapter
Enable Dead Gateway Detection for All Network Adapters
Enable DHCP
Enable DNS on All Network Adapters

Enable WINS for All Network Adapters

. Send an empty array to the settings
errWins = objitem.SetWINSServers()

This eliminates the servers.


Sample scripts for configuring TCP/IP settings (IP address, DNS Server, WINS Server, etc.) on client computers.


Retrieving Network Configuration Information

Sample scripts for retrieving information about TCP/IP settings on client computers.






'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 2007
'
' NAME: getGatewayAD
'
' AUTHOR: mmccafferty1 , pps
' DATE : 3/3/2009
'
' COMMENT:
'
'==========================================================================

Sub getGatewayAD()

Set objShell = CreateObject("WScript.Shell")
Set objWshScriptExec = objShell.Exec("ipconfig /all")
Set objStdOut = objWshScriptExec.StdOut
Set objRegEx = CreateObject("VBScript.RegExp")

objRegEx.Global = True
objRegEx.Pattern = "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"


While Not objStdOut.AtEndOfStream
strLine = objStdOut.ReadLine
Set colMatches = objRegEx.Execute(strLine)

If InStr(strLine,"Gateway") And colMatches.Count > 0 Then
For Each strMatch in colMatches
Wscript.Echo strMatch.Value
arroctetts = Split(strMatch.Value,".")
Next
WScript.Echo UBound(arroctetts)
End If
Wend

For octett = 0 To UBound(arroctetts)
WScript.Echo octett & " " & arroctetts(octett)
Next

End Sub

Sub pingsubnet()
getGatewayAD
Dim WshShell, WshPing, strPingResults

Set WshShell = WScript.CreateObject("WScript.Shell")

'ping the subnet & put non ping addrs In a file
' Wscript.StdOut.Write strPingIP
For host = 2 To 254
Set WshPing = WshShell.Exec("ping -n 3 -w 1000 " & strPingIP) 'send 3 echo requests, waiting 1 sec each
strPingResults = LCase(WshPing.StdOut.ReadAll)
Next
End sub





Access 2007 Download: Access Runtime

Windows XP and Windows Server 2003 Behavior When Connected to Both Wired and Wireless Networks

How Can I Tell If a Wireless Network Adapter is Connected to the Network?

Querying wireless status in Windows with VBScript and WMI

MSNdis_80211_ServiceSetIdentifier

How Do I Find Information About the Network Adapter Cards on My Computer?
vba-ping

Function PingSilent(strComputer)




Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._

ExecQuery("select * from Win32_PingStatus where address = '"_

& strComputer & "'")



For Each objStatus in objPing

If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then

'WScript.Echo("Computer " & machine & " is not reachable")

PingSilent = 0

Else

'WScript.Echo("Computer " & machine & " is Live")

PingSilent = 1

End If

Next



End Function


IcmpSendEcho: Ping a Machine by IP Address

Thursday, December 4, 2008

shares group has access

DumpSec v2.8.6 

SomarSoft's DumpSec is a security auditing program for Microsoft Windows® NT/XP/200x. It dumps the permissions (DACLs) and audit settings (SACLs) for the file system, registry, printers and shares in a concise, readable format, so that holes in system security are readily apparent. DumpSec also dumps user, group and replication information. 


get server name

enumerate shares

fore each share

Dump all NTFS file permissions, printer permissions, share permissions to a db.


enumerate service accounts

Clean Up After Terminated Windows Administrators


Enumerate Service Accounts from jeff hick's scripts

Change passwords on service accounts. 


Listing 15.21 Changing a Service Account Password









Script to Audit Service Accounts




If you keep getting request to create multiple (service) accounts in AD , you got to think what PowerShell can do for this task. 
================================= scripts ================
 Go to a command line and type:
dsquery user -desc *service account* > serviceaccounts.txt

or

dsquery user -desc *service account* | dsget user -samid -desc
(Where | is shift-\)

*************************








Open Active Directory Users and Computers
Right-click Saved Queries
Select New, Query
Give it a name like "service accounts"
Click Define Query
Select Users, Contacts and Groups in Find box
Click Advanced tab
Click Field button
Select User, Description
Type *service account* in the value field
Click Add
Click OK
Now that you have a list, you can drag and drop these accounts into a new OU.

*********************************

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"
 
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
 
Set objRootDSE = GetObject("LDAP://RootDSE")
 
objCommand.CommandText = _
 " & objRootDSE.Get("defaultNamingContext") & ">;" & _
 "(&(objectCategory=person)(objectClass=user)(description=*service account*));" & _
 "displayName,distinguishedName;subtree"
 
Set objRecordSet = objCommand.Execute
 
strResults = """Display Name"",""Distinguished Name"""
If objRecordset.EOF Then
        Wscript.Echo "No user accounts found."
Else
        While Not objRecordset.EOF
                strResults = strResults & VbCrLf & """" & objRecordset.Fields("displayName") & """,""" & objRecordset.Fields("distinguishedName") & """"
                objRecordset.MoveNext
        Wend
End If
 
objConnection.Close
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("Results.csv", True)
objFile.Write strResults
objFile.Close
Set objFile = Nothing
 
MsgBox "Done. Please see Results.csv"



Wednesday, November 12, 2008

project - exchaneg automation

  • create a 15 element samacctIndex array and populate with 0
  • remove spaces from last name - use regx
    • combine 1st letter of frist name with revised last name -samacctMain
  • search 4 all samacctMain
    • 4 each samacctMain use regex 2 strip samacctIndex
      • put samacctIndex in samacctIndex(samacctIndex) element replacing 0
    • search 4 first 0 in samacctIndexarray the element # will become the samacctIndex
    • combine samacctMain+samacctIndex = samacctName
    • destroy & recreate a 15 element samacctIndex array and populate with 0
admin ou & groups

  • get all users with admin loc codes
    • ou they're in
      • groups they're in
      • other qualifiers i.e department responsibility
    • look 4 coreolation



HOW TO: Reconnect a mailbox to another user

VBScript to create a large number of mailbox-enabled user accounts

sorting excel data via VBA
sort method doc
Using VBA to Sort Data on Multiple Sheets
Sorting Cells using VBA
subroutine which will sort the active worksheet by first column, then remove any duplicates
re-sorts a named range when data is added

replace a user acct ctrl-F

Sorting a Range using VBA - Excel Help Forum

The Recipient Update Service and Linked Value Replication

Select a Product Advanced SearchHow to work with the Exchange Recipient Update Service

How to Manually Update the Recipient Update Service via script

Creating Exchange Users with Excel (Part 1)


exchange Management & Administration Articles

The SelfADSI Tutorial introduces administrators to the scripting in Active Directory environments and other LDAP directory systems. The aim is to understand and being able to develop directory scripts without having specific previous knowledge in ADS or LDAP. Preferred scripting language is Visual Basic Script (VBScript). ADS scripting / LDAP scripting is easy - learn it with SelfADSI.

The minimum attributes needed for RUS are mailNickname (Exchange Alias) and msExchHomeServerName

In this section of the SelfADSI Scripting tutorial the Exchange 2000/Exchange 2003 attributes of an Active Directory Services object will be described. These AD attributes and the additional tabs in the admin utility are only visible if Exchange has been installed in the Active Directory forest and if the according management tools exist on your machine - and if the regarding object is mail enabled.

http://www.microsoft.com/technet/scriptcenter/scripts/message/default.mspx?mfr=true

Alphabetical list of AD attributes


SelfADSI tutorial according "Creating mail enabled users".

A User Comes and a User Goes


http://www.petri.co.il/creating_exchange_users_with_excel.htm



http://msdn.microsoft.com/en-us/library/aa221612(office.11).aspx



http://msdn.microsoft.com/en-us/library/aa221357(office.11).aspx



http://www.ozgrid.com/



http://digiassn.blogspot.com/2006/01/multiple-row-selection-in-excel-vba.html

getting married

http://forums.msexchange.org/m_1800465423/tm.htm

http://forums.msexchange.org/m_180041600/tm.htm

http://forums.msexchange.org/m_1800412283/tm.htm

http://forums.msexchange.org/m_10075700/tm.htm



what is your recipient policy.