The following snippet creates a directory and shares that directory:
$path = 'C:TempWmiPermissions' New-Item $path -ItemType Directory Invoke-CimMethod Win32_Share -MethodName Create -Arguments @{ Name = 'WmiPerms' Path = $path Type = 0 }
The following snippet creates a directory and shares that directory:
$path = 'C:TempWmiPermissions' New-Item $path -ItemType Directory Invoke-CimMethod Win32_Share -MethodName Create -Arguments @{ Name = 'WmiPerms' Path = $path Type = 0 }