Skip to content

Commit

Permalink
Merge pull request #574 from microsoft/dev
Browse files Browse the repository at this point in the history
updated DSU/IC links
  • Loading branch information
jaromirk authored Feb 5, 2024
2 parents 19d7b02 + d10a2d2 commit d1ae68f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 65 deletions.
24 changes: 8 additions & 16 deletions Scenarios/AzSHCI Deployment 22H2 Edition/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@
#Reset disks (to clear spaces metadata)
Invoke-Command -ComputerName $Servers -ScriptBlock {
Get-PhysicalDisk -CanPool $True | Reset-PhysicalDisk
$disks=Get-Disk | Where-Object IsBoot -eq $false
$disks | Set-Disk -IsReadOnly $false
$disks | Set-Disk -IsOffline $false
$disks | Clear-Disk -RemoveData -RemoveOEM -Confirm:0
$disks | get-disk | Set-Disk -IsOffline $true
}
}

Expand Down Expand Up @@ -256,23 +261,10 @@
#region prepare DSU binaries
#Download DSU
#https://github.com/DellProSupportGse/Tools/blob/main/DART.ps1

#grab DSU links from Dell website
$URL="https://dl.dell.com/omimswac/dsu/"
$Results=Invoke-WebRequest $URL -UseDefaultCredentials
$Links=$results.Links.href | Select-Object -Skip 1
#create PSObject from results
$DSUs=@()
foreach ($Link in $Links){
$DSUs+=[PSCustomObject]@{
Link = "https://dl.dell.com$Link"
Version = $link -split "_" | Select-Object -Last 2 | Select-Object -First 1
}
}
#download latest to separate folder
$LatestDSU=$DSUs | Sort-Object Version | Select-Object -Last 1
#download latest DSU to Downloads
$LatestDSU="https://dl.dell.com/FOLDER10889507M/1/Systems-Management_Application_RPW7K_WN64_2.0.2.3_A00.EXE"
if (-not (Test-Path $DSUDownloadFolder -ErrorAction Ignore)){New-Item -Path $DSUDownloadFolder -ItemType Directory}
Start-BitsTransfer -Source $LatestDSU.Link -Destination $DSUDownloadFolder\DSU.exe
Start-BitsTransfer -Source $LatestDSU -Destination $DSUDownloadFolder\DSU.exe

#upload DSU to servers
$Sessions=New-PSSession -ComputerName $Servers
Expand Down
41 changes: 8 additions & 33 deletions Scenarios/AzSHCI and Dell Servers Update/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,43 +57,18 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
}

#Find DSUs
$URL="https://dl.dell.com/omimswac/dsu/"
$htmlstring=$WebClient.DownloadString("$url")
$htmlobject = New-Object -Com "HTMLFile"
$htmlobject.IHTMLDocument2_write($htmlstring)
$Links=$htmlobject.links | Select-Object -Skip 1
$DSUs=@()
foreach ($Link in $Links){
$DSUs+=[PSCustomObject]@{
Link = "https://dl.dell.com/$($link.pathname)"
Version = [Version]($link.pathname -split "_" | Select-Object -Last 2 | Select-Object -First 1)
}
}
#download latest DSU
$LatestDSU=$DSUs | Sort-Object Version | Select-Object -Last 1
$WebClient.DownloadFile($LatestDSU.Link,"$DellToolsDownloadFolder\DSU.exe")
#DSU Binary: https://www.dell.com/support/kbdoc/en-us/000130590/dell-emc-system-update-dsu
#DSU Docs: https://www.dell.com/support/home/en-us/product-support/product/system-update/docs
#omimswac link for latest DSU is in user manual https://www.dell.com/support/home/en-us/product-support/product/openmanage-integration-microsoft-windows-admin-center/docs
$LatestDSU="https://downloads.dell.com/omimswac/dsu/Systems-Management_Application_GG4YM_WN64_2.0.2.2_A00.EXE"
$WebClient.DownloadFile($LatestDSU,"$DellToolsDownloadFolder\DSU.exe")

#grab IC (inventory collection tool. Required for offline patching)
if ($Offline){
#Find ICs
$URL="https://dl.dell.com/omimswac/ic/"
$htmlstring=$WebClient.DownloadString("$url")
$htmlobject = New-Object -Com "HTMLFile"
$htmlobject.IHTMLDocument2_write($htmlstring)
$Links=$htmlobject.links | Select-Object -Skip 1

$ICs=@()
foreach ($Link in $Links){
$ICs+=[PSCustomObject]@{
Link = "https://dl.dell.com/$($link.pathname)"
Version = [Version](($link.pathname -split "_" | Select-Object -Last 5 | Select-Object -First 4) -join ".")
}
}

#download latest
$LatestIC=$ICs | Sort-Object Version | Select-Object -Last 1
$WebClient.DownloadFile($LatestIC.Link,"$DellToolsDownloadFolder\IC.exe")
#download latest IC (link is in latest OMIMSWAC manual)
$LatestIC="https://downloads.dell.com/omimswac/ic/invcol_T4M1J_WIN64_23_03_00_44_A00.exe"
$WebClient.DownloadFile($LatestIC,"$DellToolsDownloadFolder\IC.exe")
}

#grab Dell Azure Stack HCI driver catalog https://downloads.dell.com/catalog/ASHCI-Catalog.xml.gz
Expand Down
20 changes: 4 additions & 16 deletions Scenarios/AzSHCI and MDT/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1062,30 +1062,18 @@ Invoke-Command -ComputerName $MDTServer -ScriptBlock {Set-Content -Path $using:D
#Download DSU
#https://github.com/DellProSupportGse/Tools/blob/main/DART.ps1

#grab DSU links from Dell website
$URL="https://dl.dell.com/omimswac/dsu/"
$Results=Invoke-WebRequest $URL -UseDefaultCredentials
$Links=$results.Links.href | Select-Object -Skip 1
#create PSObject from results
$DSUs=@()
foreach ($Link in $Links){
$DSUs+=[PSCustomObject]@{
Link = "https://dl.dell.com$Link"
Version = $link -split "_" | Select-Object -Last 2 | Select-Object -First 1
}
}
#download latest to separate folder
$LatestDSU=$DSUs | Sort-Object Version | Select-Object -Last 1
#download latest DSU to separate folder (link is in latest OMIMSWAC user guide https://www.dell.com/support/home/en-us/product-support/product/openmanage-integration-microsoft-windows-admin-center/docs)
$LatestDSU="https://downloads.dell.com/omimswac/dsu/Systems-Management_Application_GG4YM_WN64_2.0.2.2_A00.EXE"
$Folder="$env:USERPROFILE\Downloads\DSU"
if (-not (Test-Path $Folder)){New-Item -Path $Folder -ItemType Directory}
Start-BitsTransfer -Source $LatestDSU.Link -Destination $Folder\DSU.exe
Start-BitsTransfer -Source $LatestDSU -Destination $Folder\DSU.exe

#add DSU as application to MDT
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
if (-not(Get-PSDrive -Name ds001 -ErrorAction Ignore)){
New-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root "\\$MDTServer\DeploymentShare$" -Description "MDT Deployment Share" -NetworkPath "\\$MDTServer\DeploymentShare$" -Verbose | add-MDTPersistentDrive -Verbose
}
$AppName="Dell DSU $($LatestDSU.Version)"
$AppName="Dell DSU 2.0.2.2"
Import-MDTApplication -path "DS001:\Applications" -enable "True" -Name $AppName -ShortName "DSU" -Version $LatestDSU.Version -Publisher "Dell" -Language "" -CommandLine "DSU.exe /silent" -WorkingDirectory ".\Applications\$AppName" -ApplicationSourcePath $Folder -DestinationFolder $AppName -Verbose
#grap package ID for role config
$DSUID=(Get-ChildItem -Path DS001:\Applications | Where-Object Name -eq $AppName).GUID
Expand Down

0 comments on commit d1ae68f

Please sign in to comment.