Get-ADGroupMember 'Domain Admins'
Set-ExecutionPolicy RemoteSigned -Scope Process
systeminfo
Get-ScheduledTask
Get-Credential
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-ADGroup -Filter *
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Write-Host 'Operation terminée'
Get-Credential
Start-Sleep -Seconds 10
Get-WmiObject Win32_OperatingSystem
whoami
Get-WmiObject Win32_OperatingSystem
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Import-Module ActiveDirectory
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
systeminfo
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
New-Item -Path C:\\Temp -ItemType Directory
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Start-Sleep -Seconds 10
Get-Process -Name powershell
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Set-Location C:\\Temp
Test-NetConnection google.com
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-LocalGroupMember -Group 'Administrators'
Get-Service | Where-Object {.Name -like '*crypt*'}
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-Content C:\\Scripts\\deploy.ps1
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
whoami
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Remove-Item C:\\Temp\\old_log.log -Force
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
whoami
Get-Service | Where-Object {.Name -like '*crypt*'}
Get-Process -Name powershell
Get-NTFSAccess -Path C:\\SYSVOL
Get-Content C:\\Scripts\\deploy.ps1
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-ChildItem -Recurse C:\\Scripts\\
Get-NetFirewallProfile
Set-Location C:\\Temp
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-Command -Module ActiveDirectory
Get-ADUser -Filter 'Enabled -eq True'
Get-NetFirewallProfile
Get-Service | Where-Object {.Status -eq 'Running'}
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ChildItem -Recurse C:\\Scripts\\
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-Service -Name WinRM | Format-List *
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Import-Module ActiveDirectory
Get-ADOrganizationalUnit -Filter *
New-Item -Path C:\\Temp -ItemType Directory
Set-Location C:\\Temp
Get-NTFSAccess -Path C:\\SYSVOL
Get-ScheduledTask
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-SmbSession
Get-SmbShare
Get-HotFix -Id KB5005565
Get-ChildItem -Recurse C:\\Scripts\\
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-ADGroup -Filter *
systeminfo
Get-NTFSAccess -Path C:\\SYSVOL
Get-HotFix -Id KB5005565
Get-Service -Name WinRM | Format-List *
systeminfo
Get-Date
Get-Service | Where-Object {.Status -eq 'Running'}
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-ADUser -Filter 'Enabled -eq True'
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Get-FileHash -Path C:\\Windows\\System32\\notepad.exe -Algorithm SHA256
Get-ProcessMitigation -Name powershell.exe
Get-ADUser svc_backup -Properties lastLogonTimestamp
whoami
Get-Service | Where-Object {.Status -eq 'Running'}
Test-Connection -ComputerName dc01.novatech.local
Get-EventLog -LogName System -Newest 50
Get-SmbShare
hostname
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-NetIPAddress
Get-NetIPAddress
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-ProcessMitigation -Name powershell.exe
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-ADGroup -Filter *
Restart-Service -Name 'WinRM'
Get-ChildItem -Recurse C:\\Scripts\\
Get-ScheduledTask
Restart-Service -Name 'WinRM'
Get-WmiObject Win32_OperatingSystem
New-Item -Path C:\\Temp -ItemType Directory
Get-ADServiceAccount -Filter * -Properties *
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-Service | Where-Object {.Status -eq 'Running'}
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
