Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by drwtsn32

  1. D

    Find the Last Modified Date/Time of a file via download link

    Sorry, just noticed your reply. It works for me on both powershell 5 and 7.3. What version are you using?
  2. D

    Debugging Powershell scripts

    I was curious if VS Code could debug regular batch files. I found this which links back to JP Soft lol.
  3. D

    Debugging Powershell scripts

    VS Code is the best powershell script debugger!
  4. D

    TCEDIT your PowerShell Profile

    Never mind, looks like "profile.ps1" is just one of the possible profiles it tries to load at startup. The preferred (most specific) name is "Microsoft.PowerShell_profile.ps1"
  5. D

    TCEDIT your PowerShell Profile

    Interesting, are you specifying a different one on the command line when starting powershell?
  6. D

    TCEDIT your PowerShell Profile

    Sounds like the file doesn't exist. That file doesn't have to be present. $PROFILE will just show you where PowerShell will attempt to load it from, assuming it exists.
  7. D

    Crash after using pshell

    Indirectly it helped me.. I never knew about oh-my-posh and Terminal-Icons. They're awesome! Thanks for sharing.
  8. D

    removing a file

    Think NTFS permissions. ACL = access control list.
  9. D

    Copy command in BTM file fails occasionally

    What's the point of backing up an OST file? That's an offline cache copy of a server-side mailbox. If the OST is ever deleted, Outlook will just re-cache your data and make a new OST file.
  10. D

    COMMAND.COM IS 40 YEARS OLD

    You can do something similar in PowerShell. In my PS startup script I have something like this: New-PSDrive -Name 'desk' -PSProvider FileSystem -Root "$env:USERPROFILE\Desktop" New-PSDrive -Name 'docs' -PSProvider FileSystem -Root "$env:USERPROFILE\Documents" This lets me do a "cd desk:" to...
  11. D

    Find the Last Modified Date/Time of a file via download link

    We're talking about the HTTP protocol, and it's not the same as traditional file open/close calls on a regular filesystem. With HTTP you can do a GET on a url and it will initiate the transfer. I was afraid that's when "OpenRead" might be doing. But maybe that doesn't occur until - as you...
  12. D

    Find the Last Modified Date/Time of a file via download link

    Yeah, I understand it's an alias. But the question is if that function triggers a full download or not, just to get the last modified timestamp from the header. The HTTP HEAD command ensures you're only getting the header.
  13. D

    Find the Last Modified Date/Time of a file via download link

    This is pretty cool! But won't this download the entire file? $http.OpenRead('%1') Maybe it would be better to use the HEAD method. I don't know if that is possible with WebClient, but you can do it with WebRequest: $http = [System.Net.WebRequest]::Create('%1'); $http.Method = 'HEAD'...
  14. D

    robocopy cancelling batch file processing

    I'd also compare MT/no MT when doing updates (instead of just the initial data copy). Maybe you don't actually do update "syncs" with robocopy, but I sometimes use it in that way and MT can make a huge difference (sometimes).
  15. D

    robocopy cancelling batch file processing

    Its benefit depends on a lot of factors. It sometimes makes no difference. I would just time two runs, one with no MT switch and the other with /MT:2 to see if there is any difference.
Back
Top