Search:

Type: Posts; User: jnich

Search: Search took 0.00 seconds.

  1. Thread: Powershell string parsing by jnich
    Forum: General Support
    Replies 5 Views 1,769

    I saw your reply, but forgot to mark as solved....

    I saw your reply, but forgot to mark as solved. Instead of escaping everything as admin, I wrote a simple batch script which can be executed as admin. I'm used to the Linux way, but I need to learn...
  2. Thread: Powershell string parsing by jnich
    Forum: General Support
    Replies 5 Views 1,769

    The only issue with split is that I don't know...

    The only issue with split is that I don't know how many spaces are between the columns. For instance, if I want what is in the third column, this example would not work.

    $a = "ABC 69278 DEF ...
  3. Thread: Powershell string parsing by jnich
    Forum: General Support
    Replies 5 Views 1,769

    Powershell string parsing

    Lets say I have a string with several columns separated by spaces. The number of spaces and the data in each column are unknown. How would you grab what's in col3 using PowerShell? I know how I would...
  4. Thread: && Weirdness by jnich
    Forum: General Support
    Replies 11 Views 4,224

    Please forget the programs I'm using since they...

    Please forget the programs I'm using since they are irrelevant to the issue at hand.

    mkdir new && cd new && echo 'test' > 1.txt
    Why would this work as a regular user?

    runas /user:Administrator...
  5. Thread: && Weirdness by jnich
    Forum: General Support
    Replies 11 Views 4,224

    I'm keenly aware. My intention is to write a one...

    I'm keenly aware. My intention is to write a one liner or batch script which does manual routine maintenance like defrag (on HDD), disk clean, defender update and scan, and windows update. I would...
  6. Thread: && Weirdness by jnich
    Forum: General Support
    Replies 11 Views 4,224

    Yes, the ordering was not very bright on my part....

    Yes, the ordering was not very bright on my part. The outcome is still the same with only the first command being run.
  7. Thread: && Weirdness by jnich
    Forum: General Support
    Replies 11 Views 4,224

    That's good to know, but it appears to skip over...

    That's good to know, but it appears to skip over the second command in PowerShell.



    If I use & instead of && in CMD, it still skips the second command and gives me this error.
    >The system...
  8. Thread: && Weirdness by jnich
    Forum: General Support
    Replies 11 Views 4,224

    && Weirdness

    runas /user:Administrator "defrag c: /V" This works.

    runas /user:Administrator "cleanmgr /VERYLOWDISK" This works.

    runas /user:Administrator "defrag c: /V" && "cleanmgr /VERYLOWDISK" This does...
  9. Thread: CLI runas admin by jnich
    Forum: User Accounts and Family Safety
    Replies 10 Views 8,863

    This is where my troubles began. According to...

    This is where my troubles began. According to Windows, my user was the Administrator so running as that user and providing its password should have worked. I tried several times, just to be sure...
  10. Thread: CLI runas admin by jnich
    Forum: User Accounts and Family Safety
    Replies 10 Views 8,863

    Thank you lx07! I needed to set a password for...

    Thank you lx07! I needed to set a password for Administrator member reboot and runas /user:Administrator to get it working. I'm sorry for the confusion. chkdsk was just an example.
  11. Thread: CLI runas admin by jnich
    Forum: User Accounts and Family Safety
    Replies 10 Views 8,863

    CLI runas admin

    net localgroup administrators

    Members
    -----------------------------
    Administrator
    user


    runas /user:Administrator "chkdsk c:"
    <enter user, which should be administrator, pass>
Results 1 to 11 of 11
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:45.
Find Us




Windows 10 Forums