Powershell script to install multiple *.cab files

Welcome Forums General PowerShell Q&A Powershell script to install multiple *.cab files

Viewing 3 reply threads
  • Author
    Posts
    • #199766
      Participant
      Topics: 1
      Replies: 2
      Points: 17
      Rank: Member

      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

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

      Can someone guide me here please ?

      Thanks..

    • #199781
      Participant
      Topics: 4
      Replies: 70
      Points: 192
      Helping Hand
      Rank: Participant

      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

      2. validate if filepath exist

      Get-Help Test-Path

      3. 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

      6. 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.

    • #199919
      Participant
      Topics: 1
      Replies: 2
      Points: 17
      Rank: Member

      @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

    • #200309
      Participant
      Topics: 1
      Replies: 2
      Points: 17
      Rank: Member

      I made it .. Thanks

Viewing 3 reply threads
  • You must be logged in to reply to this topic.