diff --git a/docs/powershell.md b/docs/powershell.md index fa407b6..f6b529d 100644 --- a/docs/powershell.md +++ b/docs/powershell.md @@ -176,4 +176,25 @@ New-ADGroup -Name "Trans_R" -GroupScope DomainLocal -GroupCategory Security -Pat Add-ADGroupMember -Identity "2-Kp-Chef" -Members "2-Kp-KpFw", "2-Kp-KpEinsOffz" ``` +#### Creat File-Share + +###### Set-vars + +$PATH='C:\SharedFolder' +$NAME='MyShare' +$PERM='[FLAG]' //[F (Full), M (RW), R (Read) or RX (Read and Execute)] +New-Item -Path $PATH -ItemType Directory +New-SmbShare -Name $NAME -Path $PATH -FullAccess "Authenticated Users" +icacls $PATH /grant "DOMAIN\YourGroupName":(OI)(CI)$PERM + + +```ruby +$PATH='C:\SharedFolder' +$NAME='MyShare' +$PERM='[FLAG]' //[F (Full), M (RW), R (Read) or RX (Read and Execute)] +New-Item -Path $PATH -ItemType Directory +New-SmbShare -Name $NAME -Path $PATH -FullAccess "Authenticated Users" +icacls $PATH /grant "DOMAIN\YourGroupName":(OI)(CI)$PERM +``` + \ No newline at end of file