Automation

 View Only
  • 1.  Power Policy on Horizon VDI

    Posted 24 days ago

    HI gurus

    can I get help  modifying the power policy on a Horizon pool from power off to no action using powercli?

    is this even possible 

    Thanks a bunch 



  • 2.  RE: Power Policy on Horizon VDI
    Best Answer

    Posted 24 days ago

    Did you try with

    Get-HVPool -PoolName <poolName> | 
    Set-HVPool -Key 'desktopSettings.sessionSettings.powerPolicy' -Value 'NO_ACTION'
    


    I currently have no View environment in my lab to test, so the casing of the Key or the string for Value could be off.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 3.  RE: Power Policy on Horizon VDI

    Posted 23 days ago

    I did chief but I git the following which is more than I can understand:

    Set-HVPool -Key 'desktopSettings.sessionSettings.powerPolicy' -Value 'NO_ACTION'
    Updating the Pool:  LunarPod
    Exception calling "Desktop_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidArgument
    ErrorMessage : Invalid member name.
    ParameterName : desktopSettings.sessionSettings.powerPolicy"
    At C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:6524 char:8
    +        $desktop_helper.Desktop_Update($services,$item,$updates)
    +        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : VimException

    any though would be appreciated 




  • 4.  RE: Power Policy on Horizon VDI

    Posted 23 days ago

    Like I said earlier, I can't test.
    The Key seems to be incorrect.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 5.  RE: Power Policy on Horizon VDI

    Posted 23 days ago

    where do i get documentation to learn where to get this key like you come up with, how did you know how to even start with the 

    desktopSettings



  • 6.  RE: Power Policy on Horizon VDI

    Posted 23 days ago
    Edited by LucD 23 days ago

    I have no clue, it is based on online examples and blog posts.
    Your guess is as good as mine.



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 7.  RE: Power Policy on Horizon VDI

    Posted 23 days ago

    Thanks a bunch boss, appreciated 




  • 8.  RE: Power Policy on Horizon VDI

    Posted 23 days ago
    Edited by Fborges555 23 days ago

    Your recommendation was on point a few tweaks and we are happy and working 

    -key Set-HVPool -Key 'desktopSettings.logoffSettings.powerPolicy' -Value 'TAKE_NO_POWER_ACTION' thanks a bunch chief 

    u d mn




  • 9.  RE: Power Policy on Horizon VDI

    Posted 23 days ago

    Great!



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------