Compare commits

3 Commits

Author SHA1 Message Date
Meik
ddbc680181 Refresh 3.0.2.0 release artifacts 2026-03-30 08:56:22 +02:00
Meik
6409a7d46c Update 3.0.2.0 release artifacts 2026-03-30 08:48:18 +02:00
Meik
f286aee604 Update setup artifacts 2026-03-30 01:38:31 +02:00
5 changed files with 262 additions and 17 deletions

View File

@@ -252,6 +252,7 @@
<Name>C4IT_Classification</Name>
<UsedInTypePDRDataQueryType>2b3d0515-1e4a-c42d-ea1d-08d7798a331c</UsedInTypePDRDataQueryType>
<IsSystem>0</IsSystem>
<Title>Classification</Title>
<Sorting>0</Sorting>
<Position>27</Position>
<Alignment>0</Alignment>
@@ -259,7 +260,7 @@
<Width>120</Width>
<ShowFilter>0</ShowFilter>
<DisplayType>0</DisplayType>
<TitleType>1</TitleType>
<TitleType>0</TitleType>
<DisplayImage>0</DisplayImage>
<SearchDisplayType>0</SearchDisplayType>
<IsKeyword>0</IsKeyword>
@@ -364,6 +365,7 @@
<ID>120e3cb6-bd2b-f111-2986-00155d320605</ID>
<Owner>8898b212-c592-4a59-901a-f0ddfd67dbf3</Owner>
<LCID>7</LCID>
<Title>Klassifikation</Title>
</PDRDataQueryClassColumn-CI>
<PDRDataQueryClassColumn-CI>
<ID>8da15e45-0d4c-ea11-4981-000c2980fd94</ID>
@@ -381,7 +383,7 @@
<AllowCache>0</AllowCache>
<CultureSensitive>0</CultureSensitive>
<CacheInterval>60</CacheInterval>
<Tag>7b91182f-64e7-49f5-8ae9-f46e50dbac73</Tag>
<Tag>2df140c9-a676-4377-ae87-e004bd8db9e7</Tag>
<Priority>0</Priority>
</PDRDataQueryClassBase>
<PDRDataQueryClassBase-CI>

View File

@@ -1,9 +1,9 @@
[MRU List]
MRU1=C:\Users\dm134\AppData\Local\Temp\tmpB1CE.tmp.exe
MRU2=C:\Users\dm134\AppData\Local\Temp\tmpB064.tmp.exe
MRU3=
MRU4=
MRU5=
MRU6=
MRU7=
MRU8=
MRU1=C:\Users\dm134\AppData\Local\Temp\tmpDF2B.tmp.exe
MRU2=C:\Users\dm134\AppData\Local\Temp\tmpDE6D.tmp.exe
MRU3=C:\Users\dm134\AppData\Local\Temp\tmpE01D.tmp.exe
MRU4=C:\Users\dm134\AppData\Local\Temp\tmpDE64.tmp.exe
MRU5=C:\Users\dm134\AppData\Local\Temp\tmpDEA2.tmp.exe
MRU6=C:\Users\dm134\AppData\Local\Temp\tmpDDE4.tmp.exe
MRU7=C:\Users\dm134\AppData\Local\Temp\tmpB1CE.tmp.exe
MRU8=C:\Users\dm134\AppData\Local\Temp\tmpB064.tmp.exe

View File

@@ -0,0 +1,219 @@
# Als Administrator ausführen
# Testaufbau für Standalone DFS Namespace auf Windows Server 2016
$ErrorActionPreference = "Stop"
# =========================
# Konfiguration
# =========================
$ServerFqdn = "srvwsm001.imagoverum.com"
$NamespaceName = "DFS"
$NamespacePath = "\\$ServerFqdn\$NamespaceName"
$RootPath = "C:\$NamespaceName"
$Shares = @(
@{ Name = "share1"; Path = "C:\share1" },
@{ Name = "share2"; Path = "C:\share2" }
)
# =========================
# Hilfsfunktionen
# =========================
function Write-Step {
param([string]$Text)
Write-Host "`n=== $Text ===" -ForegroundColor Cyan
}
function Ensure-WindowsFeatureInstalled {
param([string]$FeatureName)
$feature = Get-WindowsFeature -Name $FeatureName
if (-not $feature) {
throw "Windows-Feature '$FeatureName' wurde nicht gefunden."
}
if ($feature.Installed) {
Write-Host "Feature '$FeatureName' ist bereits installiert." -ForegroundColor Yellow
}
else {
Write-Host "Installiere Feature '$FeatureName'..." -ForegroundColor Green
Install-WindowsFeature -Name $FeatureName -IncludeManagementTools | Out-Null
Write-Host "Feature '$FeatureName' wurde installiert." -ForegroundColor Green
}
}
function Ensure-DirectoryExists {
param([string]$Path)
if (Test-Path -LiteralPath $Path) {
Write-Host "Ordner existiert bereits: $Path" -ForegroundColor Yellow
}
else {
New-Item -Path $Path -ItemType Directory -Force | Out-Null
Write-Host "Ordner angelegt: $Path" -ForegroundColor Green
}
}
function Ensure-ModifyAclEveryone {
param([string]$Path)
if (-not (Test-Path -LiteralPath $Path)) {
throw "Pfad nicht gefunden: $Path"
}
$acl = Get-Acl -Path $Path
$inheritanceFlags = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
$propagationFlags = [System.Security.AccessControl.PropagationFlags]::None
$rights = [System.Security.AccessControl.FileSystemRights]::Modify
$accessType = [System.Security.AccessControl.AccessControlType]::Allow
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
"Everyone",
$rights,
$inheritanceFlags,
$propagationFlags,
$accessType
)
$existing = $false
foreach ($entry in $acl.Access) {
if (
$entry.IdentityReference.Value -eq "Everyone" -and
$entry.AccessControlType -eq "Allow" -and
(($entry.FileSystemRights -band [System.Security.AccessControl.FileSystemRights]::Modify) -ne 0)
) {
$existing = $true
break
}
}
if ($existing) {
Write-Host "NTFS-Recht bereits vorhanden: Everyone Modify auf $Path" -ForegroundColor Yellow
}
else {
$acl.AddAccessRule($rule) | Out-Null
Set-Acl -Path $Path -AclObject $acl
Write-Host "NTFS-Recht gesetzt: Everyone Modify auf $Path" -ForegroundColor Green
}
}
function Ensure-SmbShareExists {
param(
[string]$Name,
[string]$Path
)
$share = Get-SmbShare -Name $Name -ErrorAction SilentlyContinue
if (-not $share) {
New-SmbShare -Name $Name -Path $Path -FullAccess "Everyone" | Out-Null
Write-Host "SMB-Share angelegt: \\$ServerFqdn\$Name -> $Path" -ForegroundColor Green
return
}
Write-Host "SMB-Share existiert bereits: \\$ServerFqdn\$Name" -ForegroundColor Yellow
if ($share.Path -ne $Path) {
throw "Share '$Name' existiert bereits, zeigt aber auf '$($share.Path)' statt '$Path'. Bitte manuell korrigieren."
}
$shareAccess = Get-SmbShareAccess -Name $Name -ErrorAction SilentlyContinue
$everyoneFull = $shareAccess | Where-Object {
$_.Name -eq "Everyone" -and $_.AccessControlType -eq "Allow" -and $_.AccessRight -eq "Full"
}
if (-not $everyoneFull) {
Grant-SmbShareAccess -Name $Name -AccountName "Everyone" -AccessRight Full -Force | Out-Null
Write-Host "Share-Recht ergänzt: Everyone Full auf \\$ServerFqdn\$Name" -ForegroundColor Green
}
else {
Write-Host "Share-Recht bereits vorhanden: Everyone Full auf \\$ServerFqdn\$Name" -ForegroundColor Yellow
}
}
function Ensure-DfsRootExists {
param(
[string]$NamespacePath,
[string]$TargetPath
)
$root = Get-DfsnRoot -Path $NamespacePath -ErrorAction SilentlyContinue
if ($root) {
Write-Host "DFS Namespace existiert bereits: $NamespacePath" -ForegroundColor Yellow
return
}
if (-not (Get-SmbShare -Name $NamespaceName -ErrorAction SilentlyContinue)) {
throw "Root-Share '$NamespaceName' existiert nicht. DFS Root kann nicht erstellt werden."
}
New-DfsnRoot -Path $NamespacePath -TargetPath $TargetPath -Type Standalone | Out-Null
Write-Host "DFS Namespace angelegt: $NamespacePath" -ForegroundColor Green
}
function Ensure-DfsFolderExists {
param(
[string]$FolderPath,
[string]$TargetPath
)
$folder = Get-DfsnFolder -Path $FolderPath -ErrorAction SilentlyContinue
if (-not $folder) {
New-DfsnFolder -Path $FolderPath -TargetPath $TargetPath | Out-Null
Write-Host "DFS-Ordner angelegt: $FolderPath -> $TargetPath" -ForegroundColor Green
return
}
Write-Host "DFS-Ordner existiert bereits: $FolderPath" -ForegroundColor Yellow
$targets = Get-DfsnFolderTarget -Path $FolderPath -ErrorAction SilentlyContinue
$targetExists = $targets | Where-Object { $_.TargetPath -eq $TargetPath }
if (-not $targetExists) {
New-DfsnFolderTarget -Path $FolderPath -TargetPath $TargetPath | Out-Null
Write-Host "DFS-Target ergänzt: $FolderPath -> $TargetPath" -ForegroundColor Green
}
else {
Write-Host "DFS-Target bereits vorhanden: $FolderPath -> $TargetPath" -ForegroundColor Yellow
}
}
# =========================
# Start
# =========================
Write-Step "DFS Rolle sicherstellen"
Ensure-WindowsFeatureInstalled -FeatureName "FS-DFS-Namespace"
Write-Step "Root-Ordner und Shares sicherstellen"
Ensure-DirectoryExists -Path $RootPath
Ensure-ModifyAclEveryone -Path $RootPath
Ensure-SmbShareExists -Name $NamespaceName -Path $RootPath
Write-Step "Zielordner und Shares sicherstellen"
foreach ($s in $Shares) {
Ensure-DirectoryExists -Path $s.Path
Ensure-ModifyAclEveryone -Path $s.Path
Ensure-SmbShareExists -Name $s.Name -Path $s.Path
}
Write-Step "DFS Namespace sicherstellen"
Ensure-DfsRootExists -NamespacePath $NamespacePath -TargetPath "\\$ServerFqdn\$NamespaceName"
Write-Step "DFS Ordner sicherstellen"
foreach ($s in $Shares) {
$dfsFolderPath = "$NamespacePath\$($s.Name)"
$targetPath = "\\$ServerFqdn\$($s.Name)"
Ensure-DfsFolderExists -FolderPath $dfsFolderPath -TargetPath $targetPath
}
Write-Step "Ergebnis"
Write-Host "Namespace: $NamespacePath" -ForegroundColor Green
foreach ($s in $Shares) {
Write-Host " - $NamespacePath\$($s.Name) -> \\$ServerFqdn\$($s.Name)" -ForegroundColor Green
}
Write-Host "`nFertig." -ForegroundColor Green