def __virtual__():
    '''
    Requires Windows
    Requires Windows 8+ / Windows Server 2012+
    Requires PowerShell
    Requires PKI Client PowerShell module installed.
    '''
    if not salt.utils.platform.is_windows():
        return False, 'Only available on Windows Systems'

    if salt.utils.versions.version_cmp(__grains__['osversion'], '6.2.9200') == -1:
        return False, 'Only available on Windows 8+ / Windows Server 2012 +'

    if not __salt__['cmd.shell_info']('powershell')['installed']:
        return False, 'Powershell not available'

    if not salt.utils.powershell.module_exists('PKI'):
        return False, 'PowerShell PKI module not available'

    return __virtualname__
def __virtual__ ( ) : if not salt . utils . platform . is_windows ( ) : return False , 'Only available on Windows Systems' if salt . utils . versions . version_cmp ( __grains__ [ 'osversion' ] , '6.2.9200' ) == - 1 : return False , 'Only available on Windows 8+ / Windows Server 2012 +' if not __salt__ [ 'cmd.shell_info' ] ( 'powershell' ) [ 'installed' ] : return False , 'Powershell not available' if not salt . utils . powershell . module_exists ( 'PKI' ) : return False , 'PowerShell PKI module not available' return __virtualname__
Requires Windows
    Requires Windows 8+ / Windows Server 2012+
    Requires PowerShell
    Requires PKI Client PowerShell module installed.