# -*- coding: utf-8 -*-

name = 'get-acl-for-share-file'
description = 'get acl for share file'
args = dict(
	filename=dict(help='name of the directory', required=True),
	server=dict(help='host server', required=True),
	username=dict(help='log on as user', required=True),
	userpwd=dict(help='password for user', required=True),
	share=dict(help='share name', required=True),
)
ps = '''
$passwd = convertto-securestring -AsPlainText -Force -String %(userpwd)s
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "%(username)s@%(domain)s",$passwd
New-PSDrive -Name P -PSProvider FileSystem -Root \\\\%(server)s\\%(share)s -Credential $cred
Get-acl P:\\%(filename)s
'''
