Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell causes a: to seek when it starts; how do I stop this?

Tags:

powershell

I've written a powershell script that I've turned into a scheduled task. So far, so good. The issue I have is that every time Powershell is started, it causes my floppy drive to seek; this means every five minutes (on the task schedule), I get a little "grind" from the floppy drive.

How do I disable this behavior?

    C:\fa>powershell -noprofile
    Windows PowerShell
    Copyright (C) 2006 Microsoft Corporation. All rights reserved.

    PS C:\fa> exit

    C:\fa>

When I do this test, I get a seek when I start and when I exit. I assume the error would go away if I had a floppy disk to put in the drive.

As a poor work-around, I disabled the floppy drive in BIOS. I've removed the red herring about the drive not being available; this was because of another issue.

The suggested way to find what, in my profile, points to A:, turned up nothing.

PS C:\fa2> dir Env:\ | ?{$_.Value -like "A:\*"}
PS C:\fa2>

this was, of course, after I re-enabled the floppy drive in BIOS.

like image 583
Ry Jones Avatar asked Dec 02 '25 22:12

Ry Jones


1 Answers

I'd say its the drive enumeration that happens at runtime. Powershell builds a list of drives and creates aliases for each one so you can type "A:" and have it work like cmd.exe. I think this because if you start Powershell on a clustered server, that does not own a shared drive (is owned by the other node), it issues an error saying that the drive is not accessible. Yet, everything is normal in the shell.

That being said I've never seen this behaviour (floppy drive seek on load) on any of the hundreds of machines I administer.

like image 120
James Pogran Avatar answered Dec 06 '25 05:12

James Pogran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!