OSDeploy / OSD

OSD Shared Functions
MIT License
150 stars 61 forks source link

Diskpart Logs #49

Closed AkosBakos closed 6 months ago

AkosBakos commented 1 year ago

Would it be possible to forward the disc function logs into a log file? The transcript file starts after the diskpart section.

Before partitioning, like into the $env:TEMP folder would be great for troubleshooting: https://www.osdcloud.com/azure/technical/log-files

gwblok commented 6 months ago

Hey @AkosBakos, what are you looking for?
OSDCloud isn't using DiskPart by default.
Are you looking to just have a function dump the disk 0 (Get-Volume) output to a log before & after OSDCloud wipes and formats the drive?

AkosBakos commented 6 months ago

I was just looking for some information about the disk partitions, like what about the recovery partition. I think (Get-OSDGather -Full).DiskPartition could give some useful information.

OSDeploy commented 6 months ago

Of the thousands and thousands of times OSDCloud has been run, I don't think there's been much ask for this or much need for troubleshooting disk. While the detail would be nice to log, is the need for this real or synthetic? So I tagged this as an Enhancement and assigned it to you @AkosBakos

gwblok commented 6 months ago

@AkosBakos I'm working on adding that information when OSDCloud is run with: $Global:OSDCloud.DebugMode -eq $true

I can see how it would be helpful during debugging, but not during each run. I was already adding some other things for debugging, to help with another issue, so I added this in.

Before & After the format, the Partition information is captured into variables, later on, those get written to a log file.

Testing now.

OSDeploy commented 6 months ago

There's an OSD Function for that image

AkosBakos commented 6 months ago

Great stuff. I was just looking for this info, when the clients were having installed with OSDCloud.

I will build in into my OSDCloud OSDGather script and will send to the log files if later on someone needs it.