Overblog
Suivre ce blog Administration + Créer mon blog

VBS: Get ID of user Active

Publié le par damcuvelier

wscript.echo "user active = " & getidusract() function getidusract() dim objExecObject,strLine,i For i=1 to 100000 Set objExecObject = WshShell.Exec("%comspec% /c qwinsta.exe " & i) Do Until objExecObject.StdOut.AtEndOfStream strLine = objExecObject.StdOut.ReadLine()...

Lire la suite

VBS: Read and Write in xml file

Publié le par damcuvelier

Public Const XML_FILE = "xmlconfigfile.xml" Public Const NODE_BIT = "/Config/Bitlocker" '-------------------------------------------------------------------- ' Function Name - ReadXML() '--------------------------------------------------------------------...

Lire la suite

VBS: Webservice script

Publié le par damcuvelier

public certificatesubject="AUTHENTIFICATION" public xmlnsvalue="http://webservice.groupdirectorycertificate.com" '========================================================================== ' Name: GetWebService ' Param: samaccountname: username User '==========================================================================...

Lire la suite

vbs: sccm 2007: Get argument if osd variable does not exist

Publié le par damcuvelier

Function GetTsVariable (ByVal strTsVariableName, ByRef strTsVariableValue) Dim objTSEnvironment On Error Resume Next Set objTSEnvironment = CreateObject("Microsoft.SMS.TSEnvironment") GetTsVariable = Err.number On Error GoTo 0 If GetTsVariable=0 Then...

Lire la suite

VBS : Some Usefull, Local & AD, group functions

Publié le par damcuvelier

strComputer = "." ============================================================= Get the SMBIOS asset tag from the Win32_SystemEnclosure class ============================================================= Dim objWMI : Set objWMI = GetObject("winmgmts:")...

Lire la suite

vbs: AD: get user DN

Publié le par damcuvelier

' Ce script permet d'obtenir le DN et donc l'OU d'un utilisateur ' à partir de son username ' usage: cscript getuserDN.vbs /Usr:'SAMAccount' ' exemple: cscript getuserDN.vbs /Usr:%username% Dim colNamedArguments : Set colNamedArguments = WScript.Arguments.Named...

Lire la suite

VBS: Lancer un script depuis un script et recuperer le resultat

Publié le par damcuvelier

Fonctionnement: Script 1 (cmd.vbs) execute une commande ou une fonction ou whatever Scritp A (execcmd.vbs) lance script 1 dans une variable et “joue” avec la variable. Très utile si on a un script A chapeau et X scripts autour avec chacun une fonction...

Lire la suite

SCCM 2007 : troubleshooting log files

Publié le par damcuvelier

SCCM troubleshooting log files ciamgr.log: Provides information about the addition, deletion, and modification of software update configuration items. distmgr.log : Provides information about the replication of software update deployment packages. objreplmgr.log...

Lire la suite

VBS : SQL: Do Multiple Query To a DATABASE

Publié le par damcuvelier

'################################# ' SQLQuery.vbs ' Use to Query SQL DataBase ' command line: ' cscript SQLQuery.vbs /DataSourceName:%DataSourceName% /ServerName:%ServerName% /Database:%Database% /ADOTable:%ADOTable% /column:%column% /search:%search%...

Lire la suite

<< < 10 20 30 31 32 33 34 35 36 37 38 39 40 > >>