Jump to content


Search the Community

Showing results for tags 'vbs'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Cloud
    • Azure
    • Microsoft Intune
    • Office 365
  • General Stuff
    • General Chat
    • Events
    • Site News
    • Windows News
    • Suggestion box
    • Jobs
  • MDT, SMS, SCCM, Current Branch &Technical Preview
    • How do I ?
    • Microsoft Deployment Toolkit (MDT)
    • Official Forum Supporters
    • SMS 2003
    • Configuration Manager 2007
    • Configuration Manager 2012
    • System Center Configuration Manager (Current Branch)
    • Packaging
    • scripting
    • Endpoint Protection
  • Windows Client
    • how do I ?
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows Vista
    • Windows XP
    • windows screenshots
  • Windows Server
    • Active Directory
    • Microsoft SQL Server
    • System Center Operations Manager
    • KMS
    • Windows Deployment Services
    • NAP
    • Failover Clustering
    • PKI
    • Windows Server 2008
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Hyper V
    • Exchange
    • IIS/apache/web server
    • System Center Data Protection Manager
    • System Center Service Manager
    • System Center App Controller
    • System Center Virtual Machine Manager
    • System Center Orchestrator
    • Lync
    • Application Virtualization
    • Sharepoint
    • WSUS

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 5 results

  1. Hi all, I have to uninstall a software on all our computers (2000+) but the uninstall has to be interactive. The reason for this is because after that particular software is removed many programs stop working (Citrix applications, IE, Google Chrome, etc...) If I deploy the uninstall script silently the software is removed but users will start calling our helpdesk because all these programs will stop working. I have created a HTA file and a VBS script with information presented to user. User can choose to postpone the uninstall 5x or to uninstall immediately. If postponed 5 times the uninstall is forced. The HTA file + script work flawlessly if ran manually and user is local administrator. I was planning to deploy a scheduled task with SCCM that will run the HTA file at logon with the SYSTEM account because non of our users is local admin. Problem is that when running something with the SYSTEM account it is not presented on the desktop. The process is running but it is not interactive. You don't see it. Is there any way to acomplish this? Thank you
  2. Hello, I have trouble getting a VBS script to work in SCCM 2012, this script worked without problems in sccm in 2007. It is used when we want to install an operating system to harddrive to be installed to another computer of the same model. In Task sequence it runns before "Apply Operating System". The Command Line: cscript.exe %deployroot%\scripts\EnterComputerName.vbs Here is the script: 'Code Snippet Dim env, objRegEx Dim Matches, Match Dim strPattern, strInputBox, strReason Dim boolLength, boolValid Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI") ProgressUI.CloseProgressDialog Set env = CreateObject("Microsoft.SMS.TSEnvironment") Set objRegEx = New RegExp 'Define valid patterns as and character not in (a-z, A-Z, 0-9, or -) strPattern = "[^a-zA-Z0-9-]" Do strReason = "" strInputBox = InputBox("Enter desired machine name." & VbCrLf & VbCrLf & "Machine names must be 3-14 characters, and include a-z, 0-9, - ONLY." & VbCrLf & VbCrLf & "Machine name WILL be upper case.","Machine Name") ' If strInputBox = "" Then TemplateQuit(0) ' Check length - must be less than 15 charatcers If Len(strInputBox) <= 14 Then boolLength = True Else strReason = strReason & "Machine name too long. Please choose a name from 3-14 characters in length." & VbCrLf boolLength = False End If ' Check character validity boolValid = True ' Return all matches for invalid characters objRegEx.Global = True objRegEx.Pattern = strPattern ' Generate collection of matches Set Matches = objRegEx.Execute(strInputBox) ' Check for matches on invalid characters For Each Match In Matches strReason = strReason & "Invalid character """ & Match.Value & """ found. Please use only a-z, A-Z, 0-9, and -." & VbCrLf boolValid = False Next If Not (boolLength And boolValid) Then MsgBox "Invalid name """ & strInputBox & """ entered!" & VbCrLf & VbCrLf & strReason,vbCritical+vbOKOnly,"Invalid Name Entered" Loop While Not (boolLength And boolValid) MsgBox "Computer name set to " & UCase(strInputBox) & ".",vbInformation+vbOKOnly,"Computer Name Set" env("OSDComputerName") = UCase(strInputBox) I hope someone can help me with this. Thanks!
  3. Hi guys. I have been working on deploying bitlocker on running windows 7 machines using a task sequence. I have only found guides showing how to do this via scripts, or how to do this when deploying a computer. Not how to push this on active running windows 7 machines. Im hoping that this thread could help me with some issues i have, and hopefully assist others. Im using scripts from here: http://archive.msdn.microsoft.com/bdedeploy/Release/ProjectReleases.aspx?ReleaseId=3205 So there are a couple of Scenarios i have to consider when deploying bitlocker: * Computers with a bitlocker partition, but not active TPM chip * Computer with active TPM chip but no partition * Computers that does not have active TPM chip or a bitlocker partition (would be most common) Im running allot of batch files, this is because it gives me better logging possibilities. I want to store what happens on a network drive so in case of problems we can easy find out what have happened. Plus, i just like batch files. Outline of the current tasksequence (all steps have continue on error) Connect to network folder (maps a network folder, in my case W: in order to later copy log files to network share). Create a folder. Command line, that runs a .bat with a service account that´s local admin on machine folder.bat :md c:\Bitlockertemp Create partition (have issues with this step). Command line: Partition.bat >>c:\Bitlockertemp\DOSpartition.txt Disable 64-bit file system redirection, running with service account. Partition.bat: PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1;C:\WINDOWS\system32\en-us; bdehdcfg.exe -target default This should either create a bitlocker partiotion, or say that you already have one Enable TPM (and bitlocker if possible), command line: enable.bat >>c:\Bitlockertemp\DOSLogEnable.txt . Running with service account This will either enable TPM and require a restart, or enable bitlocker Enable.bat: cscript.exe %~dp0EnableBitLocker.vbs /on:tpm /l:C:\bitlockertemp\BitLocker.log echo off if EXIST w:\%computername%\bitlocker-backup-key-package1 (echo "Already done") ELSE ( %~dp0keyupload.bat>>c:\Bitlockertemp\DOSLogKeyupload.txt) echo on Net use w: /delete /y rd c:\bitlockertemp /s /q Keyupload.bat: echo off md w:\%computername% cscript %~dp0GetBitLockerKeyPackage.vbs C:\Bitlockertemp\bitlocker-backup-key-package >> c:\Bitlockertemp\BitLockerKey.txt copy c:\Bitlockertemp\BitLockerKey.txt w:\%computername% copy c:\Bitlockertemp\DOSpartition.txt w:\%computername% copy c:\Bitlockertemp\DOSLogEnable.txt w:\%computername% copy c:\Bitlockertemp\DOSLogKeyupload.txt w:\%computername% copy c:\Bitlockertemp\bitlocker-backup-key-package1 w:\%computername% copy c:\Bitlockertemp\BitLocker.log w:\%computername% copy c:\Bitlockertemp\ADupload.log w:\%computername% rd c:\bitlockertemp /s /q The get GetBitLockerKeyPackage.vbs is for checking if AD have recived the bitlocker key 5. Restart computer, set to " The currently installed defualt operating system" Notify the user before restarting "Your computer is being restarted, if prompted to press F1, please do so" 6.Connect to Network Folder again 7. Enable bitlocker, runs enable.bat again, same as step 4 8. Disconnect network drive, simple command: Net use w: /delete /y My current issue: It´s with creating a bitlocker partition, Running just "bdehdcfg.exe -target default" , fails. I had to add PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1;C:\WINDOWS\system32\en-us; In order to get it to actually run. But the issue im seeing is that when running this the computer stops at creating partition. Nothing happens, the tasksequence does not stop. Not sure if the whole tasksequence is fubar or if I am on the right track. Running the scrips by double clicking on them works like a charm. And the rest of the steps seems to work fine. Any assistance or input would be appreciated. Edit: Im running SCCM 2007
  4. Hi! I'm having some issues with a .vbscript made for renaming computer during a task sequence. The issue is that it works for renaming virtual machines, but also a physical HP, the way it's supposed to (name of choosing + last 6 digits of serialnumber). However it fails on a customers physical Lenovo machine. The Lenovo machine sets the first part of name correctly, but completely ignores the fact that it's supposed to cut the serialnumber to the last 6 digits, meaning sometimes the machinename goes above 15 characters. The vbscript is run right after formating the disk, as seen on this pic: The script is: ----------------------------------------------------------- Set env = CreateObject("Microsoft.SMS.TSEnvironment") Name = inputbox("Description here", "Title here",env("_SMSTSMachineName"),400,0) Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Bios") strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") For each objBIOS in colBIOS serial = objBIOS.SerialNumber Next serial = Replace(serial," ","",1,-1) strNewName = Left(Name,9) & Right(serial,6) env("OSDComputerName") = strNewName -------------------------------------------------------------- Picture from successfull rename (log) virtual machine: Text from logs: From the logs you can see the virtual machine successfully set the machinename during the MDT Gather-process. The task sequence execution engine successfully completed the action (Gather) in the group (Initialization) with exit code 0 Action output: Finished remapping variables. ZTIGather processing completed successfully. Property UserDomain is now = ADMIN Property UserID is now = ConfigMgr-NeXXXX <Message containing password has been suppressed> Process completed with exit code 0 Error executing web service http:/ /OPPXXXXXXXXXXXX/MDTMonitorEvent/PostEvent?uniqueID=&computerName=TEST-d7ea46&messageID=41001&severity=1&stepName=Gather&currentStep=16&totalSteps=156&id=C6FB2A42-B79B-E2AC-BB0C-1A2F2ED7EA46,00:50:56:AA:69:1E&messageZTIGather processing completed successfully.&dartIP=&dartPort=&dartTicket=&vmHost=&vmName=: The operation timed out (-2147012894) Event 41001 sent: ZTIGather processing completed successfully. Command line returned 0 Entering ReleaseSource() for D:\_SMSTaskSequence\Packages\OPS0001A reference count 1 for the source D:\_SMSTaskSequence\Packages\OPS0001A before releasing Delete source directory D:\_SMSTaskSequence\Packages\OPS0001A Released the resolved source D:\_SMSTaskSequence\Packages\OPS0001A. Picture from "failed" (log) rename Lenovo: as you can see, there are 11 characters in the serial number The task sequence execution engine successfully completed the action (Gather) in the group (Initialization) with exit code 0 Action output: shed remapping variables. ZTIGather processing completed successfully. Property UserDomain is now = ADMIN Property UserID is now = ConfigMgr-NeXXXXX <Message containing password has been suppressed> Process completed with exit code 0 Error executing web service http:/ /OPPXXXXXXXXXXXXXX/MDTMonitorEvent/PostEvent?uniqueID=&computerName=USK-COAIN013GYT&messageID=41001&severity=1&stepName=Gather&currentStep=16&totalSteps=156&id=F449XXXXX-XXXX-11E0-9DC4-0XX07F19C838,E4:XX:XX:33:XX:80&messageZTIGather processing completed successfully.&dartIP=&dartPort=&dartTicket=&vmHost=&vmName=: The operation timed out (-2147012894) Event 41001 sent: ZTIGather processing completed successfully. Command line returned 0 Entering ReleaseSource() for D:\_SMSTaskSequence\Packages\OPS0001A reference count 1 for the source D:\_SMSTaskSequence\Packages\OPS0001A before releasing Delete source directory D:\_SMSTaskSequence\Packages\OPS0001A Released the resolved source D:\_SMSTaskSequence\Packages\OPS0001A. Anyone got any idea what might be wrong? Thanks in advance!
  5. Anyone know of an easy way to name a computer to its serial number during OSD? I have a vbs script that I used under Altiris but how/where would I inject this script during OSD?
×
×
  • Create New...