![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Not updating drive listing? I'm tring to use TrueCrypt with powershell. TrueCrypt is an encryption program which in my case is encrypting a whole drive/partition meaning the drive lester only shows up after I run the program. I'm running it inside powershell, but I can't seem to access the drive unless I restart powershell. Get-PSDrive shows the drive (O but I can't access it. Isthere a way to get it to refresh or aworkaround without restarting powershell? Thanks PS C:\> Invoke-Expression $TCCmdLine | Out-Null PS C:\> Sleep 5 #give it some time to mount the drive, just in case PS C:\> Get-PSDrive | Format-Table -auto Name Provider Root CurrentLocation ---- -------- ---- --------------- A FileSystem A:\ Alias Alias C FileSystem C:\ cert Certificate \ D FileSystem D:\ E FileSystem E:\ Env Environment F FileSystem F:\ Function Function G FileSystem G:\ H FileSystem H:\ HKCU Registry HKEY_CURRENT_USER HKLM Registry HKEY_LOCAL_MACHINE O FileSystem O:\ Variable Variable PS C:\> dir o: Get-ChildItem : Cannot find drive. A drive with name 'o' does not exist. At line:1 char:4 + dir <<<< o: |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Not updating drive listing? > PS C:\> dir o: > Get-ChildItem : Cannot find drive. A drive with name 'o' does not exist. > At line:1 char:4 > + dir <<<< o: What is "invoke-expression $tccmdline" doing? I would do a remove-item, then re-add with new-item. Marco |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Not updating drive listing? >> PS C:\> dir o: >> Get-ChildItem : Cannot find drive. A drive with name 'o' does not exist. >> At line:1 char:4 >> + dir <<<< o: > What is "invoke-expression $tccmdline" doing? > I would do a remove-item, then re-add with new-item. $tccmdline contains the cmdline for the truecrypt program, something along the lines of "TrueCrypt.exe /v \Device\Harddisk2\Partition1 /l O: /k keyfile /m /rm /a /s /q", this part of the script works fine (no change if I put the direct program cmdline instead of using invoke). This program ends up mounting drive O: in windows I'm not sure what you mean by using remove-item/new-item, but I will try using remove/new-psdrive and see if that helps. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Not updating drive listing? > I'm not sure what you mean by using remove-item/new-item, but I will try > using remove/new-psdrive and see if that helps. Yes, sorry, I really meant -psdrive and not -item... I should type what I mean. Marco |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| CD/DVD drive Volume not updating | Vista General | |||
| CD/DVD drive Volume not updating in My Compuater/Explorer Window | General Discussion | |||
| Hard disk displayed as removal drive after updating vista | Vista hardware & devices | |||
| Listing all the SQL Servers | PowerShell | |||
| Drive size listing | PowerShell | |||