r/sysadmin•
AtlasK

Help with Automating post MDT

Hello All,

I had some questions. At my job we have a MDT process. we have two sections one before we add the user and one after.

I want to try to automate the one before.

It involves -Checking for windows update -Install think vantage update software, open it to check and uncheck the required updates -uninstalled a program that comes with our image -installing a program from a network drive where we have most of our programs.

How can I automate this so the computer checks and downloads all updates (If possible without language packs). to uninstall a program, install a program and then leaves the think-vantage update windows open so i can select updates?

I don't have access to a server so it would be saved on the network drive and ran locally on each machine.

Thanks

Posted Feb 26, 2016, 9:43 PM UTC

110
houstonauSysadmin•

Why in gods name are you installing that ThinkVantage garbage? I would get rid of that shit immediately, there is nothing on there that is required for the machine to operate.

Look into the Powershell Application Deployment Toolkit. It's a sort of Powershell wrapper for a lot of the functions you asked for.

If you already have MDT though, you can eassily add steps to the tasksequence to do updates, uninstall / reinstall applications.

For example with the PSADT I mentioned above if you want to uninstall an MSI application you can use the built in function:

Remove-MSIApplications -Name "putapplicationnamehere"

It's that easy. Comes with some pretty robust logging built in too so easy to troubleshoot. It includes a PS1 file and an EXE wrapper so you can run it directly from an MDT tasksequence with no modification at all.

2
AtlasKOP•

Company policy. I want to cheat and create a image but I can't as we don't have any access to the MDT. So I can't go that route. So yeah it has to be local. I'll definitely check out powershell?

0
volantitsDirector of Turning Things Off and On Again•

How can someone with no access to MDT can make modification to deployment process is beyond me thought.

And also, if you want to uninstall a program that came with the deployment image why not just build a new image with that thing uninstalled beforehand, that way you have your image clean.

But then again you dont have access to MDT. Are you here to break the law? /s

1
AtlasKOP•

There's a dedicated team handling MDT. We have spoken to them about creating new and updated images but there's no progress being made at all.

I can make deployment changes because our group is looking for a way to automate the Post MDT process (which involves everything I said up there and more.

1
motoxrdr21Jack of All Trades•

While I could see why this is company policy, you have to realize it's a double-edged sword. Lenovo has had there fair share of security issues recently, including two privilege escalation vulnerabilities in System Update that were found 3 months ago.

1
AKGeek•

Powershell would be my first guess, but I have yet to tackle after deployment tasks.

1
AtlasKOP•

Would VBS scripts work in powershell? any site with tutorials you would recommend?

-1
AKGeek•

That I am unsure of, you can run a VBS script from powershell.

https://technet.microsoft.com/en-us/scriptcenter/bb410849.aspx

1
dogfish182•

why would you run a vb script in powershell? powershell should do anything vb script can do directly

1
JacksonClarkson•
  • "Checking for windows update": Use the DISM command to inject Windows Updates into your WIM file once a month. This way the OS is being installed with the updates already in place.

  • "Install think vantage update software": You want the Lenovo ThinInstaller instead. You use the Update Retriever part of it to download the drivers & apps on a network share that the ThinInstaller silently installs for you during a Task Sequence.

  • "installing a program from a network drive": You need to "package" your apps for silent install. This can be a very simple thing or a very difficult thing. Once you've done that, you can either import the app to the Deployment Workbench and have it run somewhere in the Task Sequence or have the Task Sequence run the silent install command from wherever your network share is storing your apps.

  • "uninstall a program": Incorrect strategy. For OS deployments, you want to start with as light a deployment as possible and then add to it as needed by way of various Task Sequences (you can even create one that only installs apps you select and doesn't do anything else.) Why is the program installed in the first place?

  • "I don't have access to a server so it would be saved on the network drive and ran locally on each machine.": You don't really need a server as MDT is just a collection of scripts that sit in folders. Having a Windows Server for it can really speed things up though as you'll be able to PXE-boot machines and then trigger the Task Sequence. In your case, leave everything on a network share somewhere and from the target machine, run the scripts: "\share\mdt\prod\scripts\litetouch.wsf"

1