Automatyczne mapowanie dysku vhd podczas startu systemu Windows

Fajna sprawa „dyski” vhd można w łatwy sposób mapować nawet po ścieżce UNC z innego servera zawartość pliku mapowanie_vhd.txt

select vdisk file=”\\net_share\backup.vhd”
attach vdisk
exit

łatwo z poziomu powershella dodać taska mapującego dysk po starcie systemu z opóźnieniem 4 minuty:

schtasks /create /tn „mapowanie_vhd” /tr „diskpart.exe /s 'c:\skrypty\mapowanie_vhd.txt'” /sc ONSTART /ru administrator /rp hasło_administratora /DELAY 0004:00

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>