Below is a VBScript that can be used to collect logs from Automation to the SMP (Under NSCap by default) for review in case of imaging issues. It will work with both DS 7.1 and DS 7.5
To create the task:
- In the SMP Console, select Manage | Jobs and Tasks
- Right-click on Samples\Deployment Solution (or another folder of your choice) and choose New\Task
- Scroll to the bottom of the list, or nearly so, and select a Script Task.
- On the right, select VBScript from the drop list by Script Type.
- Copy the text from the table below and paste it into the empty text box below the drop box. Do NOT make any changes under Advanced.
- Select Save
- Read the text at the top of the task. There are a few things that you should modify for your own environment and comments for how to do so are provided in the task text:
- AdminAcct
- AdminPwd
- Prod
- LogsFolder - this one is where we will create a folder in NSCap to store the files
- (optional) storage location. This is not exposed in the top section but is later during the drive mapping. If you would prefer NOT to save these logs in NSCap, obviously, this can be modified. This is however the easiest location to find files during troubleshooting, and the files are not, in general, large enough to cause problems even over WAN links.
The task is complete and ready to be run.
NOTE: This task is intended to be run in automation, not in production.
Task Text:
Dim fso, f, WshShell, WshNetwork, oDrives, vMap, LogsFolder, NewFolder, Prod, Destination, AdminAcct, AdminPwd '--------------------------------------------------- ' ' Below are some variables you need to be aware of and customize before running this script ' '--------------------------------------------------- AdminAcct = "YourAccount" 'Must have rights to map a drive back to NSCap AdminPwd = "YourPassword" 'Associated password to the above account ' Prod may need to be changed to D or whatever your production drive is while in automation ' or run GHConfig which I don't yet know how to do here. ' Most Win7 Systems have a recovery partition, so Prod would be D: instead of C Prod = "c:" LogsFolder = "z:\AutomationLogs" 'Folder under NSCap to store the logs on the NS/SMP '--------------------------------------------------- ' End Customizations Section '--------------------------------------------------- NewFolder = "%COMPNAME%_" & Replace("%NOW%",":","") Destination = LogsFolder & "\" & NewFolder Set fso = CreateObject("Scripting.FileSystemObject") Set WshNetwork = WScript.CreateObject("WScript.Network") vMap = "Yes" Set oDrives = WshNetwork.EnumNetworkDrives For i = 0 to oDrives.Count - 1 Step 2 IF oDrives.Item(i) = "Z:" THEN vMap = "No" Next IF vMap = "Yes" THEN WshNetwork.MapNetworkDrive "z:", "\\%NOTIFICATIONSERVER%\NSCap", ,AdminAcct ,AdminPwd If (fso.FolderExists(LogsFolder)) Then Else fso.CreateFolder(LogsFolder) End If fso.CreateFolder(Destination) On Error Resume Next fso.Copyfolder Prod & "\Windows\Panther", Destination & "\Panther" 'MiniSetup or SOI troubleshooting fso.copyfolder "x:\Program Files\Altiris\Altiris Agent\Logs", Destination 'for DS 7.1 fso.copyfolder "x:\Program Files\Symantec\Deployment\Logs", Destination & "\Logs" 'for DS 7.5 fso.copyfile "x:\ghosterr.txt", Destination 'Ghost troubleshooting |