Remove-Item C:\\Temp\\old_log.log -Force
Set-Location C:\\Temp
Get-Service -Name WinRM | Format-List *
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-HotFix -Id KB5005565
Get-Date
systeminfo
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
whoami
Import-Module ActiveDirectory
Get-Credential
systeminfo
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-SmbShare
Get-EventLog -LogName Application -Newest 50
Get-ChildItem -Recurse C:\\Scripts\\
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-Command -Module ActiveDirectory
Write-Host 'Operation terminée'
Write-Host 'Operation terminée'
Restart-Service -Name 'WinRM'
Get-EventLog -LogName Application -Newest 50
Get-Command -Module ActiveDirectory
Get-NetIPAddress
Get-WmiObject Win32_OperatingSystem
Get-Service | Where-Object {.Name -like '*crypt*'}
Remove-Item C:\\Temp\\old_log.log -Force
Set-ExecutionPolicy RemoteSigned -Scope Process
Write-Host 'Operation terminée'
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ADServiceAccount -Filter * -Properties *
Start-Sleep -Seconds 10
New-Item -Path C:\\Temp -ItemType Directory
Get-ADPrincipalGroupMembership svc_backup
Import-Module ActiveDirectory
Get-ADServiceAccount -Filter * -Properties *
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-EventLog -LogName Application -Newest 50
ipconfig /all
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-SmbShare
Get-ADComputer -Filter *
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Get-HotFix -Id KB5005565
Get-Service -Name WinRM | Format-List *
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-Process -Name powershell
Get-NetIPAddress
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ADPrincipalGroupMembership svc_backup
Get-Date
Get-ProcessMitigation -Name powershell.exe
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Get-Content C:\\Users\\svc_backup\\AppData\\Local\\Temp\\deploy.log
Get-Service -Name WinRM | Format-List *
Test-Connection -ComputerName dc01.novatech.local
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Start-Sleep -Seconds 10
Get-NetFirewallProfile
Get-CimInstance -ClassName Win32_QuickFixEngineering
ipconfig /all
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-Process -Name powershell
Get-ADGroup -Filter *
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
whoami
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-ADOrganizationalUnit -Filter *
Get-EventLog -LogName System -Newest 50
Get-ADUser -Filter 'Enabled -eq True'
Start-Sleep -Seconds 10
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
systeminfo
Get-Process | Where-Object {.CPU -gt 100}
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Restart-Service -Name 'WinRM'
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-Service | Where-Object {.Status -eq 'Running'}
Write-Host 'Operation terminée'
Get-Credential
Get-ScheduledTask
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Get-ChildItem -Recurse C:\\Scripts\\
Get-ADServiceAccount -Filter * -Properties *
Get-EventLog -LogName System -Newest 50
Get-ADOrganizationalUnit -Filter *
Get-Service -Name WinRM | Format-List *
Test-NetConnection google.com
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-EventLog -LogName System -Newest 50
Disconnect-PSDrive Z
Get-Service -Name WinRM | Format-List *
cls
Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) -EntryType Error
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ADPrincipalGroupMembership svc_backup
Get-EventLog -LogName Security -InstanceId 4672 -Newest 50
Write-Host 'Operation terminée'
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-NetIPAddress
Get-ChildItem -Recurse C:\\Scripts\\
Get-ADComputer -Filter *
Get-WmiObject Win32_OperatingSystem
Get-SmbSession
ipconfig /all
Get-ScheduledTask
Get-ADServiceAccount -Filter * -Properties *
hostname
Get-EventLog -LogName Application -Newest 50
Set-Location C:\\Temp
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
Get-NetFirewallProfile
Set-Location C:\\Temp
