Windows 10: Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator?

Discus and support Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator? in Windows 10 Ask Insider to solve the problem; submitted by /u/krk_computers [link] [comments] https://www.reddit.com/r/Windows10/comments/v0t3pn/inside_windows_sandbox_how_can_i_run_powershell/ Discussion in 'Windows 10 Ask Insider' started by /u/krk_computers, May 30, 2022.

  1. Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator?

    /u/krk_computers, May 30, 2022
    #1
  2. sgartner Win User

    Windows Sandbox can't run PowerShell?!?

    When running in Windows Sandbox I can't run any PowerShell scripts at all. I get an error that states that, "Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell." and I have .net version 4.8.03752
    installed on the host machine (and then presumably on the sandbox machine). So far I've found it impossible to reinstall any version of .net 4.0 in the sandbox, I get "Same or higher version of .NET Framework 4 has already been installed on this computer."

    I assume PowerShell is supported in the sandbox? That would be a pretty annoying limitation to not be able to run PowerShell...

    Thanks,
     
    sgartner, May 30, 2022
    #2
  3. CMD and PowerShell

    Hi Andre,

    Done. The result: in control panel there's now an administrator account (local). Signing in to that account, and using win key+X I can run PowerShell (as admin) without a problem.

    I signed out of that account and signed in to my own original administrator account: win key + X cannot run PowerShell as administrator, same notification that there's no connected application. I can get to PowerShell ISE, though, and by typing CMD in Start
    I can run the command prompt as administrator.

    The only difference between the 2 accounts is that in the local administrator account I can with Win key+X run PowerShell (as admini) whereas in my own account I cannot.

    [In both account in taskbar settings "replace command prompt with PowerShell:" is on.]
     
    dschaareman, May 30, 2022
    #3
  4. Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator?

    Why does Powershell Install-Module fail inside Windows Sandbox

    Outside sandbox windows powershell is happy to Install-Module ; inside Sandbox the ability to do this is missing? The versions appear to be identical. I'm trying to automate a build process inside Sandbox using a Powershell script that installs and builds
    a number of things and I need to install 7Zip4Powershell.

    Running outside of sandbox:

    Code:
    PS C:\Users\eddy> echo $PSVersionTable
    
    Name                           Value
    
    ----                           -----
    
    PSVersion                      5.1.18362.752
    
    PSEdition                      Desktop
    
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    
    BuildVersion                   10.0.18362.752
    
    CLRVersion                     4.0.30319.42000
    
    WSManStackVersion              3.0
    
    PSRemotingProtocolVersion      2.3
    
    SerializationVersion           1.1.0.1
    
    PS C:\Users\eddy> Install-Module
    
    cmdlet Install-Module at command pipeline position 1
    
    Supply values for the following parameters:
    
    Name[0]:
    [b]Whereas inside sandbox:[/b]PS C:\Users\WDAGUtilityAccount> echo $PSVersionTable
    
    Name                           Value
    
    ----                           -----
    
    PSVersion                      5.1.18362.752
    
    PSEdition                      Desktop
    
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    
    BuildVersion                   10.0.18362.752
    
    CLRVersion                     4.0.30319.42000
    
    WSManStackVersion              3.0
    
    PSRemotingProtocolVersion      2.3
    
    SerializationVersion           1.1.0.1
    
    PS C:\Users\WDAGUtilityAccount> Install-Module
    
    Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or
    
    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
    
    again.
    
    At line:1 char:1
    
    + Install-Module
    
    + ~~~~~~~~~~~~~~
    
        + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    
        + FullyQualifiedErrorId : CommandNotFoundException
    
    PS C:\Users\WDAGUtilityAccount>
     
    EddyLangley, May 30, 2022
    #4
Thema:

Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator?

Loading...
  1. Inside Windows Sandbox, how can I run PowerShell or Cmd as a non-administrator? - Similar Threads - Inside Sandbox run

  2. how to run as administrator in the cmd ?

    in Windows 10 Gaming
    how to run as administrator in the cmd ?: I not the administrator on the PC I purchased new in store? command prompt chkdsk: Access Denied as you do not have sufficient privileges or the disc may be locked by another process. You have to invoke this utility running in elevated mode and make sure the disk is unlocked....
  3. how to run as administrator in the cmd ?

    in Windows 10 Software and Apps
    how to run as administrator in the cmd ?: I not the administrator on the PC I purchased new in store? command prompt chkdsk: Access Denied as you do not have sufficient privileges or the disc may be locked by another process. You have to invoke this utility running in elevated mode and make sure the disk is unlocked....
  4. Windows Sandbox - how to run Defender inside?

    in Windows 10 Software and Apps
    Windows Sandbox - how to run Defender inside?: NOTE: a previous similar question was answered incorrectly and that thread is now locked. This is not a question about running defender in sandbox mode.This question pertains to the Windows 11 feature: Windows Sandbox.One use of a sandbox is to go to URL's you not sure are...
  5. Windows Sandbox - how to run Defender inside?

    in Windows 10 Gaming
    Windows Sandbox - how to run Defender inside?: NOTE: a previous similar question was answered incorrectly and that thread is now locked. This is not a question about running defender in sandbox mode.This question pertains to the Windows 11 feature: Windows Sandbox.One use of a sandbox is to go to URL's you not sure are...
  6. settings, cmd as administrator, powershell as administrator is not opening

    in Windows 10 Gaming
    settings, cmd as administrator, powershell as administrator is not opening: i can not open my settings app.also no option is showing to start cmd or powershell as administrator. https://answers.microsoft.com/en-us/windows/forum/all/settings-cmd-as-administrator-powershell-as/4e840f44-6303-46b7-a043-4c90e9e935c2
  7. settings, cmd as administrator, powershell as administrator is not opening

    in Windows 10 Software and Apps
    settings, cmd as administrator, powershell as administrator is not opening: i can not open my settings app.also no option is showing to start cmd or powershell as administrator. https://answers.microsoft.com/en-us/windows/forum/all/settings-cmd-as-administrator-powershell-as/4e840f44-6303-46b7-a043-4c90e9e935c2
  8. settings, cmd as administrator, powershell as administrator is not opening

    in Windows 10 Customization
    settings, cmd as administrator, powershell as administrator is not opening: i can not open my settings app.also no option is showing to start cmd or powershell as administrator. https://answers.microsoft.com/en-us/windows/forum/all/settings-cmd-as-administrator-powershell-as/4e840f44-6303-46b7-a043-4c90e9e935c2
  9. How can i make to run a powershell comand as administrator on startup?

    in Windows 10 Ask Insider
    How can i make to run a powershell comand as administrator on startup?: . submitted by /u/gerardit04 [link] [comments] https://www.reddit.com/r/Windows10/comments/hsi58r/how_can_i_make_to_run_a_powershell_comand_as/
  10. Windows Sandbox can't run PowerShell?!?

    in Windows 10 Customization
    Windows Sandbox can't run PowerShell?!?: When running in Windows Sandbox I can't run any PowerShell scripts at all. I get an error that states that, "Version v4.0.30319 of the .NET Framework is not installed and it is required to run version 3 of Windows PowerShell." and I have .net version 4.8.03752 installed on...

Users found this page by searching for:

  1. windows sandbox windows 11 net framework