win_stat change return islink to islnk to match stat (#23196)

This commit is contained in:
Jordan Borean 2017-04-04 04:38:34 +10:00 committed by Matt Davis
commit 4d1b97d1ae
5 changed files with 317 additions and 427 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)

View file

@ -1,6 +0,0 @@
$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)