1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_stat/files/setup_share.ps1
Jordan Borean 971783a7fd Feature/win stat extra info (#19148)
* Added more return results to win_stat

* Changed Win2012 methods to support older versions in setup

* staging of the tests to work with older servers
2017-01-27 14:51:12 -08:00

6 lines
196 B
PowerShell

$share_stat = Get-WmiObject -Class Win32_Share -Filter "name='folder-share'"
If ($share_stat) {
$share_stat.Delete()
}
$wmi = [wmiClass] 'Win32_Share'
$wmi.Create($args[0], 'folder-share', 0)