Skip to content

Couple of suggestions #11

@krzydoug

Description

@krzydoug

I was excited to see your module, but then I realized you embed out-gridview unless you choose -NoPrompt. Then I see the function Get-HPDrivers does more than just get them, it will install them. I recommend removing Out-Gridview, any powershell user should be able to pass the drivers through Out-Gridview if they would like. The command Get-HPDrivers should do just that, get the drivers. Get-* commands for the most part should always be benign, safe to run as they just "get" information. Any changes should be handled by aptly named cmdlets such as Install-HPDrivers, Remove-HPDrivers, Set-HPDrivers, etc. Here's how I recommend the workflow looks

$driverList = Get-HPDrivers
$driversToInstall = $driverlist | Out-Gridview -Title "Select driver(s):" -OutputMode Multiple
$driversToInstall | Install-HPDrivers

Another small nitpick, It's best practice to name cmdlet singular nouns, (Get-HPDriver)

I appreciate you sharing your work and hope you consider implementing the suggestions here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions