import depuis ancien GitHub
This commit is contained in:
28
check-missing-package-files/readme.md
Normal file
28
check-missing-package-files/readme.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Check EPM Package Files — README
|
||||
|
||||
Validate that **Ivanti EPM** package file references exist (HTTP/HTTPS and UNC).
|
||||
The script connects to SQL, reads `[dbo].[PACKAGE]` and `[dbo].[PACKAGE_FILES_HASH]`, and reports missing files.
|
||||
|
||||
## Requirements
|
||||
- Windows PowerShell 5.1
|
||||
- Network access to SQL (`EPM2021` DB in the sample)
|
||||
- SQL account with read access to `dbo.PACKAGE` and `dbo.PACKAGE_FILES_HASH`
|
||||
|
||||
## Configure
|
||||
Edit these variables at the top of the script:
|
||||
```powershell
|
||||
$dataSource = "sql.leblogosd.lan" # SQL Server / instance
|
||||
$user = "compteSQL" # SQL login
|
||||
$PassSQL = "Password" # SQL password (plaintext in sample)
|
||||
$database = "EPM2021" # EPM database
|
||||
```
|
||||
## What it does
|
||||
- SELECT * FROM dbo.PACKAGE and SELECT * FROM dbo.PACKAGE_FILES_HASH
|
||||
- For each package/file hash:<br>
|
||||
-- If FULL_PATH starts with http → Invoke-WebRequest (200 = OK, else MISSING)<br>
|
||||
-- If FULL_PATH starts with \\ → Test-Path on UNC (exists = OK, else MISSING)<br>
|
||||
|
||||
## What it does
|
||||
```powershell
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Check-EpmPackageFiles.ps1
|
||||
```
|
||||
Reference in New Issue
Block a user