mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 03:53:59 -07:00
Added win_find module (#19144)
This commit is contained in:
parent
57a5490c41
commit
1ce5fcf061
11 changed files with 1452 additions and 0 deletions
7
test/integration/targets/win_find/files/set_share.ps1
Normal file
7
test/integration/targets/win_find/files/set_share.ps1
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue