microsoft:allgemeines:powershell
This is an old revision of the document!
PowerShell Befehle
Befehl | Beschreibung |
---|---|
get-netconnectionprofile set-netconnectionprofile -InterfaceIndex 28 -NetworkCategory Private | Netzwerk auf privat oder öffentlich stellen |
Set-NetConnectionProfile -Name <Name des Netzwerks> -NetworkCategory <public oder private> | Netzwerk auf privat oder öffentlich stellen |
Get-ADDomainController | Informationen zu den DCs und der Domäne |
Get-ADForest | Select ForestMode | Forest-Funktionsebene |
Get-ADDomain | select DomainMode | Domain-Funktionsebene |
Get-Childitem -file C:\Path\To\Folder\ | Gibt alle Dateien im Ordner “Folder” aus |
Get-Childitem -folder C:\Path\To\Folder\ | Gibt alle Ordner im Ordner “Folder” aus |
Get-Childitem c:\Path\To\Folder\*.wav | Gibt alle WAV-Files im Ordner “Folder” aus |
Get-WindowsFeature FS-SMB1 | Status von SMBv1 prüfen |
Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol | SMBv1 aktivieren |
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol | SMBv1 dektivieren |
Get-Content C:\log.txt –Wait | (Log-)File Inhalt “live” ausgeben |
Get-Content C:\log.txt -Tail 3 | Letzte 3 Zeilen eines (Log-)Files ausgeben |
gcim Win32_OperatingSystem | select Version, InstallDate, OSArchitecture | Info über Betriebssystem |
New-SelfSignedCertificate -Subject wsus.oes.ml-bw.de -DnsName wsus.oes.ml-bw.de -CertStoreLocation cert:\LocalMachine\My -KeyAlgorithm RSA -KeyLength 2048 -KeyExportPolicy Exportable -NotAfter (Get-Date).AddYears(10) | Self Signed Cert 10 Jahre |
microsoft/allgemeines/powershell.1691192193.txt.gz · Last modified: 2024/02/17 19:03 (external edit)