toto spustit v kazdej ucebni v powershell ako Administrator stiahnut z www3 instalacky R a RStudio , kleopatra aris vsetko co sa instaluje v danom semestri do priecinka Downloads POZNAMKA: v LS netreba odinstalovat Omegu ---------------------------------------------------- Remove-LocalUser -Name "student" Remove-LocalUser -Name "studentekf" Remove-LocalUser -Name "studentEN" Remove-LocalUser -Name "ekfen01" Remove-LocalUser -Name "ekfen02" Remove-LocalUser -Name "ekfen03" Remove-LocalUser -Name "ekfen04" Remove-LocalUser -Name "ekf1" Remove-LocalUser -Name "ekf2" Remove-LocalUser -Name "ekf3" Remove-LocalUser -Name "ekf4" Remove-LocalUser -Name "ekf5" Remove-LocalUser -Name "ekf6" Remove-LocalUser -Name "ekf7" Remove-LocalUser -Name "ekf8" Remove-LocalUser -Name "ekf9" Remove-LocalUser -Name "ekf10" Remove-LocalUser -Name "ekf11" Remove-LocalUser -Name "ekf12" Remove-LocalUser -Name "ekf13" Remove-LocalUser -Name "ekf14" Remove-LocalUser -Name "ekf15" Remove-LocalUser -Name "ekf16" -----------------------------pred zmazanim priecinkov musim vynutit prava admina prichybovej hlaske pri konkretnom uzivatelovi spustit tieto dva riadky a potom znova remove ----------------------------------------- alebo rucne zmazem uzivatelov rychlejsie Takeown /F "C:\Users\student" /R /D Y Takeown /F "C:\Users\studentekf" /R /D Y Takeown /F "C:\Users\studenten" /R /D Y Takeown /F "C:\Users\ekfen01" /R /D Y Takeown /F "C:\Users\ekfen02" /R /D Y Takeown /F "C:\Users\ekfen03" /R /D Y Takeown /F "C:\Users\ekfen04" /R /D Y Takeown /F "C:\Users\ekf1" /R /D Y Takeown /F "C:\Users\ekf2" /R /D Y Takeown /F "C:\Users\ekf3" /R /D Y Takeown /F "C:\Users\ekf4" /R /D Y Takeown /F "C:\Users\ekf5" /R /D Y Takeown /F "C:\Users\ekf6" /R /D Y Takeown /F "C:\Users\ekf7" /R /D Y Takeown /F "C:\Users\ekf8" /R /D Y Takeown /F "C:\Users\ekf9" /R /D Y Takeown /F "C:\Users\ekf10" /R /D Y Takeown /F "C:\Users\ekf11" /R /D Y Takeown /F "C:\Users\ekf12" /R /D Y Takeown /F "C:\Users\ekf13" /R /D Y Takeown /F "C:\Users\ekf14" /R /D Y Takeown /F "C:\Users\ekf15" /R /D Y Takeown /F "C:\Users\ekf16" /R /D Y icacls "C:\Users\student" /grant administrators:F /T icacls "C:\Users\studentekf" /grant administrators:F /T icacls "C:\Users\studenten" /grant administrators:F /T icacls "C:\Users\ekfen01" /grant administrators:F /T icacls "C:\Users\ekfen02" /grant administrators:F /T icacls "C:\Users\ekfen03" /grant administrators:F /T icacls "C:\Users\ekfen04" /grant administrators:F /T icacls "C:\Users\ekf1" /grant administrators:F /T icacls "C:\Users\ekf2" /grant administrators:F /T icacls "C:\Users\ekf3" /grant administrators:F /T icacls "C:\Users\ekf4" /grant administrators:F /T icacls "C:\Users\ekf5" /grant administrators:F /T icacls "C:\Users\ekf6" /grant administrators:F /T icacls "C:\Users\ekf7" /grant administrators:F /T icacls "C:\Users\ekf8" /grant administrators:F /T icacls "C:\Users\ekf9" /grant administrators:F /T icacls "C:\Users\ekf10" /grant administrators:F /T icacls "C:\Users\ekf11" /grant administrators:F /T icacls "C:\Users\ekf12" /grant administrators:F /T icacls "C:\Users\ekf13" /grant administrators:F /T icacls "C:\Users\ekf14" /grant administrators:F /T icacls "C:\Users\ekf15" /grant administrators:F /T icacls "C:\Users\ekf16" /grant administrators:F /T ------------------------------- Remove-Item -Path "C:\Users\student" -Recurse -Force Remove-Item -Path "C:\Users\studentekf" -Recurse -Force Remove-Item -Path "C:\Users\studentEN" -Recurse -Force Remove-Item -Path "C:\Users\ekfen01" -Recurse -Force Remove-Item -Path "C:\Users\ekfen02" -Recurse -Force Remove-Item -Path "C:\Users\ekfen03" -Recurse -Force Remove-Item -Path "C:\Users\ekfen04" -Recurse -Force Remove-Item -Path "C:\Users\ekf1" -Recurse -Force Remove-Item -Path "C:\Users\ekf2" -Recurse -Force Remove-Item -Path "C:\Users\ekf3" -Recurse -Force Remove-Item -Path "C:\Users\ekf4" -Recurse -Force Remove-Item -Path "C:\Users\ekf5" -Recurse -Force Remove-Item -Path "C:\Users\ekf6" -Recurse -Force Remove-Item -Path "C:\Users\ekf7" -Recurse -Force Remove-Item -Path "C:\Users\ekf8" -Recurse -Force Remove-Item -Path "C:\Users\ekf9" -Recurse -Force Remove-Item -Path "C:\Users\ekf10" -Recurse -Force Remove-Item -Path "C:\Users\ekf11" -Recurse -Force Remove-Item -Path "C:\Users\ekf12" -Recurse -Force Remove-Item -Path "C:\Users\ekf13" -Recurse -Force Remove-Item -Path "C:\Users\ekf14" -Recurse -Force Remove-Item -Path "C:\Users\ekf15" -Recurse -Force Remove-Item -Path "C:\Users\ekf15" -Recurse -Force Remove-Item -Path "C:\Users\ekf16" -Recurse -Force ** treba este y a potom vsetkych uzivatelov, ktory tu maju priecinok -------------------------------------------------------------------------- skontrolovat registre duplicitnych uzivatelov zmazat Regedit Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ 147-232-012-225\Remote Desktop Users ----------------------------------------------------------------------------------------------------------------------- $Password = Read-Host -AsSecureString "student" New-LocalUser -Name "student" -Password $Password -FullName "student" -Description "student" -PasswordNeverExpires -UserMayNotChangePassword $Password = Read-Host -AsSecureString "ekfstudent" New-LocalUser -Name "studentekf" -Password $Password -FullName "studentekf" -Description "studentekf" -PasswordNeverExpires -UserMayNotChangePassword $Password = Read-Host -AsSecureString "studenten" New-LocalUser -Name "studentEN" -Password $Password -FullName "studentEN" -Description "studentEN" -PasswordNeverExpires -UserMayNotChangePassword pridat uzivatelov na vzdialeny pristup Add-LocalGroupMember -Group "Remote Desktop Users" -Member "student" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "studentekf" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "studentEN" Add-LocalGroupMember -Group "Users" -Member "studentEN" Add-LocalGroupMember -Group "Users" -Member "student" Add-LocalGroupMember -Group "Users" -Member "studentekf" $Password = Read-Host -AsSecureString "ekfen01" New-LocalUser -Name "ekfen01" -Password $Password -FullName "ekfen01" -Description "ekfen01" -PasswordNeverExpires -UserMayNotChangePassword $Password = Read-Host -AsSecureString "ekfen02" New-LocalUser -Name "ekfen02" -Password $Password -FullName "ekfen02" -Description "ekfen02" -PasswordNeverExpires -UserMayNotChangePassword $Password = Read-Host -AsSecureString "ekfen03" New-LocalUser -Name "ekfen03" -Password $Password -FullName "ekfen03" -Description "ekfen03" -PasswordNeverExpires -UserMayNotChangePassword $Password = Read-Host -AsSecureString "ekfen04" New-LocalUser -Name "ekfen04" -Password $Password -FullName "ekfen04" -Description "ekfen04" -PasswordNeverExpires -UserMayNotChangePassword Add-LocalGroupMember -Group "Users" -Member "ekfen01" Add-LocalGroupMember -Group "Users" -Member "ekfen02" Add-LocalGroupMember -Group "Users" -Member "ekfen03" Add-LocalGroupMember -Group "Users" -Member "ekfen04" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "ekfen01" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "ekfen02" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "ekfen03" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "ekfen04" -------------------------------------------------------------------------- $Password = Read-Host -AsSecureString "ucitelxxv" New-LocalUser -Name "ucitel" -Password $Password -FullName "ucitel" -Description "ucitel" -PasswordNeverExpires -UserMayNotChangePassword Add-LocalGroupMember -Group "Users" -Member "ucitel" Add-LocalGroupMember -Group "Administrators" -Member "ucitel" Add-LocalGroupMember -Group "Remote Desktop Users" -Member "ucitel" -------------------------------------------------------------------------- Start-Process C:\"Program Files"\R\R-4.4.1\unins000.exe Start-Process C:\"Program Files"\RStudio\Uninstall.exe Start-Process C:\"Program Files (x86)"\Gpg4win\gpg4win-uninstall.exe Start-Process C:\Users\admin\Downloads\R-4.4.2-win.exe Start-Process C:\Users\admin\Downloads\RStudio-2024.12.0-467.exe Start-Process C:\Users\admin\Downloads\gpg4win-4.4.0.exe Start-Process C:\Users\admin\Downloads\yEd-3.25_with-JRE23_64-bit_setup.exe Remove-Item -Path "C:\Omega\Omega.license" -Force Start-Process C:\Omega\Omega.exe -- 9d36-a341-595d-4b99 spustit Omegu a zadat kod winget install --id Microsoft.PowerBI ------------------- pod kontom student a anglickych zadat licenciu pre Aris Aris Login: helpdesk.ekf@tuke.sk Pass:ekfAris2020 pri instalacii Nastavit SAP Application Server: M31z Instance number: 31 System ID: M31 SAProuter String: /H/cloud.ucc.ovgu.de/S/3299 ------------------------------ windows update Install-Module -Name PSWindowsUpdate -Force -AllowClobber Import-Module PSWindowsUpdate Get-WindowsUpdate Install-WindowsUpdate -AcceptAll -AutoReboot ------------------------------------------------------------------------------------------------------------------- $URL = "http://www3.ekf.tuke.sk/ucebna/obr/N32_007/ekf.png" # Adresa súboru $OutputPath = "c:\Users\Public\Pictures\ekf.png" Invoke-WebRequest -Uri $URL -OutFile $OutputPath Spustit: gpedit.msc Enable a cesta ---------------------migracia kont pokus neuspesne neprenieslo vsetko cd "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\amd64" .\scanstate.exe d:\ /o /c /i:MigDocs.xml /i:MigApp.xml /i:miguser.xml priecinok USMT nahram priamo do admina ale v ceste neuvadzam nazov priecinku USMT stiahnem tu https://media.ekf.tuke.sk/fsdownload/sKzdyDhCl/ucebna .\loadstate.exe c:\users\admin /c /lac /i:MigDocs.xml /i:MigApp.xml /i:miguser.xml /v:13 /all ------------------------------------------------------------------------------------------------------------------------------------------------- Scheduler pre povolenie vzdialeneho pristupu pre studentov zakaze a povoli cas na pre pouzite Remote User Desktop ------------------------------------------------------------------------------------------------------------------------------------------------- 1. vytvorit dva subory v notepad: povolit_pristup.ps1 a zakazat_pristup.ps1 -- .ps1 je koncovka pre powershell script 2. obsah suboru povolit_pristup.ps1: # Povolenie vzdialeného prístupu # net localgroup "Remote Desktop Users" "studentekf" /add Add-LocalGroupMember -Group "Remote Desktop Users" -Member "studentekf" 3. obsah subor zakazat_pristup.ps1 # Zakázanie vzdialeného prístupu # net localgroup "Remote Desktop Users" "studentekf" /delete Remove-LocalGroupMember -Group "Remote Desktop Users" -Member "studentekf" 4. v Scheduleri nastavit: General: Description: nazov ulohy, Security options: Run wheter user is logged on or not --- zadat admin heslo Configure for: Windows 10 Triggers: cas a datum, Action: Start a program Program/script: powershell a v Add arguments (optional): cesta k suboru C:\Users\admin\Documents\povolit_pristup.ps1 ------------------------------------------------------------------------------------------------------------------------------------------------------