CA-249860: Local root user can not restart the toolstack from XenCenter with AD enabled
CA-249860: Local root user can not restart the toolstack from XenCenter with AD enabled

Use the NewSession function which returns a session using the elevated credentials if they exist, otherwise using the connection's credentials

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

jijiang/xenadmin,huizh/xenadmin,minli1/xenadmin,stephen-turner/xenadmin,MihaelaStoica/xenadmin,MihaelaStoica/xenadmin,minli1/xenadmin,kc284/xenadmin,jijiang/xenadmin,xenserver/xenadmin,stephen-turner/xenadmin,huizh/xenadmin,stephen-turner/xenadmin,MihaelaStoica/xenadmin,minli1/xenadmin,MihaelaStoica/xenadmin,jijiang/xenadmin,stephen-turner/xenadmin,MihaelaStoica/xenadmin,huizh/xenadmin,huizh/xenadmin,kc284/xenadmin,MihaelaStoica/xenadmin,stephen-turner/xenadmin,xenserver/xenadmin,stephen-turner/xenadmin,huizh/xenadmin,huizh/xenadmin,kc284/xenadmin,kc284/xenadmin,minli1/xenadmin,jijiang/xenadmin,minli1/xenadmin,jijiang/xenadmin,xenserver/xenadmin,minli1/xenadmin,jijiang/xenadmin,kc284/xenadmin