• 0 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: July 6th, 2023

help-circle















  • UmeU@lemmy.worldtoTechnology@lemmy.world*deleted by creator*
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    It’s only happened twice, after updates, that windows turned one drive back on and remapped my desktops. In those cases I have just turned it back off and remapped back to normal. Then env:username works again and I think the only difference is the space in the path with one drive, though it could be something else breaking when the desktop gets remapped.

    I’m probably using powershell all wrong anyways because I am an amateur.

    I use it to grab a file from an sftp by calling on winSCP, then convert from csv to xlsx using the excel module, then run a bunch of VBA to reformat the file, then save the xlsx with a date stamp. I use task scheduler to run it daily and I have it on like 10 machines.

    Works great when one drive doesn’t mess with my desktop path.



  • UmeU@lemmy.worldtoTechnology@lemmy.world*deleted by creator*
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    Even something as simple as:

    move-item “C:\Users\computername\Desktop\afiletomove.csv” (“C:\Users\computername\Desktop\destinationFolder\newFileName (0:MMddyyyy).csv” -f (get-date))

    Stops working as intended when your desktop no longer resides at that path.

    Also, I have the same functions running on multiple machines with different names so I have to dynamically resolve the path and piece it together using strings.


  • UmeU@lemmy.worldtoTechnology@lemmy.world*deleted by creator*
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    I have like 10 machines at 5 different locations. In order to share my 365 subscription across multiple machines, I have to have them signed into a Microsoft account. I need excel and ms access working on all my machines.

    It’s happen twice since I implemented windows 11, both times after major windows updates.

    Not too much trouble to re disable one drive and switch everything back to normal but it breaks a bunch of stuff for me when it happens.


  • UmeU@lemmy.worldtoTechnology@lemmy.world*deleted by creator*
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    8 months ago

    One drive is the one that really ruffles my feathers.

    It turns itself back on randomly, which wouldn’t be too much of a problem except for that it fucking remaps the desktop… a file that was previously located at C:\user\desktop\ is now at C:\user\One Drive\desktop…

    Note the space in the path, they didn’t even have the decency to use an underscore… \one_drive\… even though it’s one of their own rules in powershell scripting.

    For those of us using powershell to automate stuff this remapping is a nightmare and should be illegal.

    Too bad I am in the US and will just have to continue to get support calls from time to time when a users desktop gets remapped behind the scenes.

    Maybe there is a way using powershell and windows scheduled tasks to check to see if one drive turned itself back on, then auto turn it off and remap the desktop back to normal.

    The absurdity of having windows check to see if windows screwed itself up, then if so have it fix itself is just laughable.