Creating a shared directory

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 
} 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.26.22