locked
No volumes returned from Get-Volume RRS feed

  • Question

  • Hello all, I am trying to delegate a certain task to be automated via a scheduled task run under a service account. I have set up a  session configuration that allows the service account to connect via powershell remoting, but the problem is that when running get-volume there are no volumes returned. I can run the same command as an administrator and I get all the volumes. I have already assigned permissions to the ROOT:/Microsoft/Windows/Storage namespace in WMI, and no errors are being reported when the command is run.

    Any idea what permissions need to be given to allow the service account to pull the volumes?

    Thursday, June 13, 2019 10:45 PM

All replies

  • Not enough information. 

    When running a task you need to be sure you are saving the errors. No output does not tell us anything.  An exception early in the script can result in no output.  Without the exceptions there is no way to analyze this.


    \_(ツ)_/

    Thursday, June 13, 2019 11:57 PM
  • There is no exception.... at any point. It acts like it completes successfully but does not return a value.
    Friday, June 14, 2019 1:45 PM
  • Here is a transcript of what is happening... this is it, notice there is no complicated script. I'm doing this interactively.

    **********************
    Windows PowerShell transcript start
    Start time: 20190614084639
    Username: LEGACY01\svcacctemployeesetup
    RunAs User: LEGACY01\svcacctemployeesetup
    Configuration Name:
    Machine: WMJFKNHE (Microsoft Windows NT 10.0.17763.0)
    Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoExit -NoProfile
    Process ID: 12432
    PSVersion: 5.1.17763.503
    PSEdition: Desktop
    PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.17763.503
    BuildVersion: 10.0.17763.503
    CLRVersion: 4.0.30319.42000
    WSManStackVersion: 3.0
    PSRemotingProtocolVersion: 2.3
    SerializationVersion: 1.1.0.1
    **********************
    Transcript started, output file is C:\Users\svcacctemployeesetup\Documents\PowerShell_transcript.WMJFKNHE.PYb5SQTj.20190614084639.txt
    PS C:\WINDOWS\System32\WindowsPowerShell\v1.0> Enter-PSSession SPDC1002 -config employee_setup
    [SPDC1002]: PS>get-volume
    [SPDC1002]: PS>exit
    PS C:\WINDOWS\System32\WindowsPowerShell\v1.0> Stop-Transcript
    **********************
    Windows PowerShell transcript end
    End time: 20190614084706
    **********************

    Friday, June 14, 2019 1:52 PM