Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

attribution de quota

$
0
0

New-FsrmQuotaTemplate -Name esis -Size 838860800 

(Get-ADUser -filter *).SamAccountName > NOMS.csv

$usr=Import-Csv NOMS.csv

 

 

foreach ($elmt in $usr) {

 

$nw=$elmt.'NOMS'

New-Item -ItemType directory -Name "$nw" -Path E:\Shares

}

 

 $cnt=Get-ChildItem -Path E:\Shares

 

 foreach ($bcl in $cnt){

 $nv=$bcl.Name

 New-SmbShare -Name "$nv" -Path  E:\shares\"$nv" -FullAccess "$nv"

 }

 

 $sb=(Get-SmbShare).Name

 Grant-SmbShareAccess -Name $sb -AccountName ESIS\Administrateur -AccessRight full -Confirm:$false

 

 

 

  (Get-SmbShare).Path > pt.csv

 

$fu=Import-Csv pt.csv

 

 

foreach ($ht in $fu) {

 

 

$jk=$ht.chemins

 

 New-FsrmQuota -Path "$jk"  -Template esis }

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles