=====Links===== Algemeen: \\ [[http://msdn2.microsoft.com/en-us/library/default.aspx|MSDN Library]] \\ [[http://www.microsoft.com/technet/scriptcenter/default.mspx|Script Center]] \\ [[http://gallery.technet.microsoft.com/ScriptCenter/en-us/|TechNet Script Center Gallery]] \\ [[http://www.cruto.com/|Cruto.com - Developer Resources]] \\ [[http://www.activexperts.com/activmonitor/windowsmanagement/scripts/|ActiveXperts - Scripts Collection (1)]] \\ [[http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/|ActiveXperts - Scripts Collection (2)]] \\ [[http://www.adminscripteditor.com/langhome.asp?l=v|Admin Script Editor > VBScript Home Page]] \\ [[http://www.visualbasicscript.com/m_47117/tm.htm|Frequently Asked Stuff]] \\ [[http://www.microsoft.com/downloads/details.aspx?familyid=D187C9D7-FFA8-49CD-BB33-363DB8FA481E&displaylang=en|Do-It-Yourself Script Center Kit]] \\ [[http://www.w3schools.com/vbscript/vbscript_ref_functions.asp|W3 Schools - VBScript Functions]] \\ [[http://cwashington.netreach.net/|Win32 Scripting]] \\ [[http://msdn.microsoft.com/en-us/magazine/cc301529.aspx|MSDN Cutting Edge - Extend the WSH Object Model with Custom Objects]] \\ [[http://www.codeproject.com/|The Code Project - Free Source Code and Tutorials]] \\ FTP: \\ [[http://support.microsoft.com/kb/96269|Microsoft Support - Using FTP Batch Scripts]] \\ [[http://www.mail-production.com/commandftp.html|DOS FTP Automation]] \\ Logon Scripts: \\ [[http://www.computerperformance.co.uk/Logon/logon_scripts.htm|Logon Scripts - with VBScript]] \\ Specifiek VbScript voor printers: \\ [[http://www.activexperts.com/activmonitor/windowsmanagement/scripts/printing/printserver/|ActiveXperts - Print Server Scripting]] \\ [[http://www.computerperformance.co.uk/Logon/LogonScript_Printer_Multiple.htm|Windows Logon Scripts - Create Multiple Printers]] \\ [[http://www.computerperformance.co.uk/Logon/LogonScript_Printer_Method.htm|VBS Logon Script - AddWindowsPrinterConnection]] \\ [[http://www.oreilly.com/pub/h/1151|Add Printers Based on Name of Computer]] \\ [[http://www.dx21.com/scripting/adsi/index.asp|ADSI Scripting]] \\ Specifiek VbScript voor Active Directory: \\ [[http://www.computerperformance.co.uk/vbscript/index.htm|VBScript - For Windows Networks]] \\ [[http://www.msexchange.org/articles/Scripting-Exchange-VBScript-ADSI-Part1.html|Scripting Exchange Using VBScript and ADSI (Part 1)]] \\ [[http://www.msexchange.org/articles/Scripting-Exchange-VBScript-ADSI-Part2.html|Scripting Exchange Using VBScript and ADSI (Part 2)]] \\ [[http://www.msexchange.org/articles/Scripting-Exchange-VBScript-ADSI-Part3.html|Scripting Exchange Using VBScript and ADSI (Part 3)]] \\ [[http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/usersgroups/users/|ActiveXperts - Scripts to manage Active Directory Users]] \\ [[http://www.rlmueller.net/WinNT_Binding.htm|Binding to Active Directory objects with the WinNT provider]] \\ [[http://www.cruto.com/resources/vbscript/vbscript-examples/vbscript-sitemap.asp|VbScript examples]] \\ [[http://www.wisesoft.co.uk/Scripts/activedirectoryschema.aspx|WiseSoft - Interactive Active Directory Schema Guide]] \\ [[http://www.microsoft.com/technet/scriptcenter/guide/sas_ads_emwf.mspx?mfr=true|Microsoft - Searching Active Directory]] \\ [[http://www.gfi.com/nsm/scripting/adsi/|GFi - ADSI]] \\ [[http://www.codeproject.com/database/connectionstrings.asp|ADO Connection Strings]] A list of ODBC DSN Connection Strings.\\ [[http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B300197|How to ping an IP address with Visual Basic by using ICMP]] \\ [[http://www.robvanderwoude.com/|Rob van der Woude's Scripting Pages]] \\ ======AutoIt====== =====Voorbeelden===== msiexec /i "dirnaam" /opties uitvoeren? Probeer: Run("msiexec /i installer.msi /qb!", "c:\directory") Of: Run("msiexec /i " & chr(34) & "c:\directory\installer.msi" & chr(34) & " /qb!", "c:\temp") ====Notities==== GUICtrlRead(ControlID) returned geen 0 bij geen invoer in GUICtrlCreateInput box, maar niks, If GUICtrlRead($UNCDropBox) = "" Then werkt If GUICtrlRead($UNCDropBox) = 0 Then werkt niet ======VBScript===== [[http://www.robvanderwoude.com/vbsaddons.html|VBScript Compatible Extensions]] \\ =====Voorbeeld===== VBScript voor het opvragen van naam, ip adres en IPEnabled van alle netwerkkaarten op de pc met behulp van WMI. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration",,48) For Each objItem in colItems Wscript.Echo "Caption: " & objItem.Caption For Each strAddress in objItem.IPAddress Wscript.Echo strAddress Next Wscript.Echo "IPEnabled: " & objItem.IPEnabled next Bron:[[http://www.microsoft.com/technet/scriptcenter/topics/msh/multivalued.mspx|Hip, Hip, Array - Retrieving Multi-Valued WMI Properties from Windows PowerShell]] \\ ======WMI====== =====Links===== [[http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx|Secrets of Windows Management Instrumentation]] \\ [[http://msdn2.microsoft.com/en-us/library/Aa286547.aspx|MSDN - Windows Management Instrumentation (WMI)]] \\ [[http://msdn2.microsoft.com/en-us/library/ms974579.aspx|WMI Scripting Primer: Part 1]] \\ [[http://msdn2.microsoft.com/en-us/library/ms974592.aspx|WMI Scripting Primer: Part 2]] \\ [[http://msdn.microsoft.com/en-us/library/aa394572(VS.85).aspx|MSDN - WMI Reference]] \\ [[http://msdn2.microsoft.com/en-us/library/aa392902.aspx|Querying with WQL]] \\ ActiveXpert [[http://www.activexperts.com/activmonitor/windowsmanagement/wmi/samples/hw/|WMI Samples - Hardware]] \\ [[http://ewbi.blogs.com/develops/2003/12/wmi_and_network.html|Detecting IP Network Availability]] \\ [[http://www.mml.ru/WMIF2K/|WMI Filtering for Windows 2000]] emulates the effect of WMI Filtering for computer accounts running Windows 2000 and later OS. \\ [[http://www.leastprivilege.com/PermaLink.aspx?guid=56c18c35-7aee-4878-b6c3-1c691312798e|leastprivilege.com - Connecting to WMI ... and security]] \\ [[http://blogs.technet.com/askds/archive/2008/09/11/fun-with-wmi-filters-in-group-policy.aspx|Ask the Directory Services Team - Fun with WMI Filters in Group Policy]] \\ =====Blogposts/Articles===== [[http://clintboessen.blogspot.com/2009/11/wmi-error-invalid-class-0x80041010-fix.html|Clint Boessen's Blog - WMI Error Invalid Class 0x80041010 fix]] \\ =====Tools===== [[http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang=en|WMI Admin Tools]] \\ [[http://www.microsoft.com/downloads/details.aspx?familyid=D7BA3CD6-18D1-4D05-B11E-4C64192AE97D&displaylang=en|The WMI Diagnosis Utility -- Version 2.0]] \\ [[http://www.microsoft.com/downloads/details.aspx?familyid=2CC30A64-EA15-4661-8DA4-55BBC145C30E&displaylang=en|WMI Code Creator v1.0]] \\ [[http://www.microsoft.com/downloads/details.aspx?familyid=09DFC342-648B-4119-B7EB-783B0F7D1178&displaylang=en|Scriptomatic 2.0]] \\ [[http://gpoguy.com/free-tools/free-tools-library/wmi-filter-validation-utility/|WMI Filter Validation Utility]] \\ =====Voorbeeld script===== WMI-filter voor GPO. Root\CimV2; Select * from Win32_OperatingSystem where Caption = "Microsoft Windows XP Professional" Bron:[[http://www.windowsitpro.com/Article/ArticleID/46475/46475.html|How can I restrict the application of Group Policy Object (GPOs) depending on the client machine's OS?]] \\ Volgende werkt jammergenoeg niet: SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPAddress LIKE '%192.168%' Reden: "LIKE can't be used for "IPAddress", because this property is an array and arrays are not supported by WQL." Bron:[[http://www.pcreview.co.uk/forums/thread-531879.php|Help with WQL query]] \\ **WMI-Filter voor Windows Server 2008** \\ select * from Win32_OperatingSystem where Caption like '%2008%' ====Filteren op XP en SP niveau==== XP Service Pack 1 en 0: Query = "Select * from WIN32_OperatingSystem where ServicePackMajorVersion<=1 and Version='5.1.2600'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMV2"; XP Service Pack 2, 3 en hoger: Query = "Select * from WIN32_OperatingSystem where ServicePackMajorVersion>=2 and Version='5.1.2600'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMV2"; XP Service Pack 1: Query = "Select * from WIN32_OperatingSystem where ServicePackMajorVersion=1 and Version='5.1.2600'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMV2"; XP Service Pack 2: Query = "Select * from WIN32_OperatingSystem where ServicePackMajorVersion=2 and Version='5.1.2600'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMV2"; XP Service Pack 3: Query = "Select * from WIN32_OperatingSystem where ServicePackMajorVersion=3 and Version='5.1.2600'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMV2"; Bron:[[http://forums.whirlpool.net.au/forum-replies-archive.cfm/394114.html|SBS 2003 Group Policy Help]] \\ ===OS Captions==== Windows XP (SP3) Microsoft Windows XP Professional Windows Server 2003 (x64): Microsoft(R) Windows(R) Server 2003 Standard x64 Edition Microsoft(R) Windows(R) Server 2003 Enterprise x64 Edition Windows Server 2008 (x86 en x64): Microsoft® Windows Server® 2008 Standard Microsoftr Windows Serverr 2008 Enterprise Bron: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") For Each objOS in colOS WScript.Echo objOS.Caption Next Set colOS = Nothing Set colSystem = Nothing Set objWMIService = Nothing ====Filteren op het geïnstalleerd zijn van twee applicaties==== Zet tweemaal een controle op een bestand in het filter. Beide controles moeten true zijn om de hele controle op true te laten uitkomen: instance of MSFT_Rule { Query = "Select * From CIM_Datafile Where Name = 'C:\\\\Program Files\\\\Microsoft Office\\\\Office11\\\\winword.exe'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMv2"; }, instance of MSFT_Rule { Query = "Select * From CIM_Datafile Where Name = 'C:\\\\Program Files\\\\Altiris\\\\Software Virtualization Agent\\\\svscmd.exe'"; QueryLanguage = "WQL"; TargetNameSpace = "root\\CIMv2"; }