Commit 9a66e82
authored
Code fixes - 2026.01 (#537)
This pull request introduces improvements to remote session handling,
logging, and output formatting in the SDN diagnostics and health
validation scripts. The main changes include enforcing credential
requirements for remote sessions, adding transcript logging, and
standardizing output visuals.
**Remote session validation and credential handling:**
- Added checks in both `Start-SdnDataCollection` and
`Debug-SdnFabricInfrastructure` to ensure that when running in a remote
session without CredSSP enabled, the user must supply the `-Credential`
parameter to avoid double-hop authentication issues. If not, the
functions throw a `NotSupportedException`.
[[1]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eR757-R767)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R403-R416)
- Set a default value for the `$Credential` parameter in
`Show-SdnGatewayUtilization` to prevent null credential issues.
**Logging and transcript improvements:**
- Introduced transcript logging at the start of data collection and
health validation processes, and ensured transcripts are stopped
appropriately to capture command output for troubleshooting.
[[1]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eR835)
[[2]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eR1160)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L411-L415)
**Output and formatting enhancements:**
- Updated bar chart characters in `Show-SdnGatewayUtilization` from
Unicode blocks (`█`, `░`) to ASCII characters (`=`, `.`) for improved
compatibility and readability.
[[1]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eL1464-R1477)
[[2]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eL1482-R1495)
[[3]](diffhunk://#diff-490865628c61b2e97c50f45b37d7086647c70b2444cbfb9c60cc8c682801356eL1493-R1506)
- Improved remediation message formatting in
`Test-SdnCertificateMultiple` by adding indentation for better clarity.
**Minor logic adjustments:**
- Moved the network controller confirmation check in
`Debug-SdnFabricInfrastructure` to occur only after remote session
validation, ensuring proper sequencing.
[[1]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R403-R416)
[[2]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60L411-L415)
[[3]](diffhunk://#diff-15898640fc68e07afa836ad8d93af4f22a4442978d9c233f39d48d44d85cfb60R433)
# Change type
- [x] Bug fix (non-breaking change)
- [ ] Code style update (formatting, local variables)
- [ ] New Feature (non-breaking change that adds new functionality
without impacting existing)
- [ ] Breaking change (fix or feature that may cause functionality
impact)
- [ ] Other
# Checklist:
- [x] My code follows the style and contribution guidelines of this
project.
- [x] I have tested and validated my code changes.1 parent 0485fe1 commit 9a66e82
2 files changed
+34
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
757 | 768 | | |
758 | 769 | | |
759 | 770 | | |
| |||
821 | 832 | | |
822 | 833 | | |
823 | 834 | | |
824 | | - | |
| 835 | + | |
| 836 | + | |
825 | 837 | | |
826 | 838 | | |
827 | 839 | | |
| |||
1145 | 1157 | | |
1146 | 1158 | | |
1147 | 1159 | | |
| 1160 | + | |
1148 | 1161 | | |
1149 | 1162 | | |
1150 | 1163 | | |
| |||
1255 | 1268 | | |
1256 | 1269 | | |
1257 | 1270 | | |
1258 | | - | |
| 1271 | + | |
1259 | 1272 | | |
1260 | 1273 | | |
1261 | 1274 | | |
| |||
1461 | 1474 | | |
1462 | 1475 | | |
1463 | 1476 | | |
1464 | | - | |
| 1477 | + | |
1465 | 1478 | | |
1466 | 1479 | | |
1467 | 1480 | | |
| |||
1479 | 1492 | | |
1480 | 1493 | | |
1481 | 1494 | | |
1482 | | - | |
| 1495 | + | |
1483 | 1496 | | |
1484 | 1497 | | |
1485 | 1498 | | |
| |||
1490 | 1503 | | |
1491 | 1504 | | |
1492 | 1505 | | |
1493 | | - | |
| 1506 | + | |
1494 | 1507 | | |
1495 | 1508 | | |
1496 | 1509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
403 | 417 | | |
404 | 418 | | |
405 | 419 | | |
| |||
408 | 422 | | |
409 | 423 | | |
410 | 424 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | 425 | | |
417 | 426 | | |
418 | 427 | | |
| |||
421 | 430 | | |
422 | 431 | | |
423 | 432 | | |
| 433 | + | |
424 | 434 | | |
425 | 435 | | |
426 | 436 | | |
| |||
1170 | 1180 | | |
1171 | 1181 | | |
1172 | 1182 | | |
1173 | | - | |
| 1183 | + | |
1174 | 1184 | | |
1175 | 1185 | | |
1176 | 1186 | | |
| |||
0 commit comments