From deed6bc03455d9cb51726228a14e20e1a0ba6b1d Mon Sep 17 00:00:00 2001 From: Tim Eertmoed Date: Thu, 24 Oct 2024 12:40:13 +0200 Subject: [PATCH] docs/powershell.md aktualisiert --- docs/powershell.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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