Added win_find module (#19144)

This commit is contained in:
Jordan Borean 2017-02-09 08:19:08 +10:00 committed by John R Barker
commit 1ce5fcf061
11 changed files with 1452 additions and 0 deletions

View file

@ -0,0 +1,7 @@
$share_name = $args[1]
$share_stat = Get-WmiObject -Class Win32_Share -Filter "name='$share_name'"
If ($share_stat) {
$share_stat.Delete()
}
$wmi = [wmiClass] 'Win32_Share'
$wmi.Create($args[0], $share_name, 0)