Files

30 lines
1.4 KiB
PowerShell
Raw Permalink Normal View History

2023-11-01 15:33:03 -04:00
#. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
2023-11-01 15:19:22 -04:00
# https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/6IFPpIksTDfsCzp1JwIH5k.html
2023-11-01 15:16:39 -04:00
$URL = 'https://damassets.autodesk.net/content/dam/autodesk/external-assets/support-articles/licensing-support-tool/AdskLicensingSupportTool-2.3.0.692-win.zip'
2022-09-08 14:42:31 -04:00
# Download the zip archive
$LicensingSupportTool = Download-File -URL $URL
2022-09-08 14:42:31 -04:00
# Extract the downloaded zip file
2023-10-06 16:06:44 -04:00
Expand-Archive -Path $LicensingSupportTool
2022-09-08 14:42:31 -04:00
$WorkingDir = '{0}\{1}' -f (Split-Path -Path $LicensingSupportTool -Parent), "AdskLicensingSupportTool"
2022-09-08 14:42:31 -04:00
$ALST = "${WorkingDir}\AdskLicensingSupportTool.exe"
If ( Test-Path $ALST ) {
2023-10-05 13:11:38 -04:00
Write-Output "Resetting all Autodesk product licenses to named-user licenses"
2022-09-08 14:42:31 -04:00
Try { Start-Process $ALST -ArgumentList '-r ALL:User' -Wait }
2023-10-05 13:17:18 -04:00
Catch { Write-Error $_.Exception.Message }
}
If ( Test-Path $LicensingSupportTool ) {
2023-10-05 13:11:38 -04:00
Write-Output "Deleting ""${LicensingSupportTool}"""
Try { Remove-Item $LicensingSupportTool -Force -ErrorAction SilentlyContinue }
2023-10-05 13:17:18 -04:00
Catch { Write-Error $_.Exception.Message }
2022-09-08 14:42:31 -04:00
}
If ( Test-Path $WorkingDir ) {
2023-10-05 13:11:38 -04:00
Write-Output "Deleting ""${WorkingDir}"""
2022-09-08 14:42:31 -04:00
Try { Remove-Item $WorkingDir -Force -Recurse -ErrorAction SilentlyContinue }
2023-10-05 13:17:18 -04:00
Catch { Write-Error $_.Exception.Message }
}