Powershell script to install multiple *.cab files

Hello Gurus ,

I am a beginner /noob in powershell and i have a requirement to write a powershell script to install windows updates by extracting the cab files from msu .

  1. Get the input from the user param ($sourcefilepath)

  2. validate if filepath exist

  3. If filepath exist , validate the file signature subject and extension

Got stuck here

4 Script should validate all the files from $sourcefilepath and verify its signature ( as microsoft )and extension as msu

5 if the above condition is met (Point 4), then , copy the files to the $destinationfolder

  1. Extract the cab files from each and install it one by one with results.

Can someone guide me here please ?

Thanks…

Very doable regardless of previous experience. I’ll try to give you some references for research.

  1. Get the input from the user param ($sourcefilepath)

Get-Help Read-Host

  1. validate if filepath exist

Get-Help Test-Path

  1. If filepath exist , validate the file signature subject and extension

Get-Help Get-Item / Pipe the file object to Get-Member and you will see an extension property

4 Script should validate all the files from $sourcefilepath and verify its signature ( as microsoft )and extension as msu

Get-Help Where-Object

5 if the above condition is met (Point 4), then , copy the files to the $destinationfolder

Get-Help About_if and Get-Help about Copy-Item

  1. Extract the cab files from each and install it one by one with results.

That should get you started, if you post back with some code, I might be able to help you some more.

@Mike : Thanks for your reply .

Here is my code , can you please go thru and shed some light on

Powershell script to install multiple *.cab file

I made it … Thanks