Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Get-NTFSAccess -Path C:\\SYSVOL
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Start-Sleep -Seconds 10
Get-Acl -Path 'AD:\\OU=BadOU,DC=novatech,DC=local'
Get-Process | Where-Object {.CPU -gt 100}
Get-ADOrganizationalUnit -Filter *
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Get-Date
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-ADPrincipalGroupMembership svc_backup
Write-Host 'Operation terminée'
Get-Service -Name WinRM | Format-List *
cls
Get-SmbShare
Get-ScheduledTask
Get-Content C:\\Scripts\\deploy.ps1
hostname
Get-Process -Name powershell
Get-ADServiceAccount -Filter * -Properties *
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ADPrincipalGroupMembership svc_backup
Get-EventLog -LogName Application -Newest 50
Get-CimInstance -ClassName Win32_QuickFixEngineering
systeminfo
Get-ADPermission -Identity 'OU=BadOU,DC=novatech,DC=local' -User svc_backup
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Get-Date
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-Command -Module ActiveDirectory
Get-SmbOpenFile
Get-Process | Where-Object {.CPU -gt 100}
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-Date
Restart-Service -Name 'WinRM'
Start-Sleep -Seconds 10
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Write-Host 'Operation terminée'
Get-Date
systeminfo
Get-NetIPAddress
Restart-Service -Name 'WinRM'
Get-ADPrincipalGroupMembership svc_backup
Get-ADOrganizationalUnit -Filter *
Get-CimInstance -ClassName Win32_QuickFixEngineering
Get-EventLog -LogName Security -InstanceId 4648 -Newest 100
Remove-Item C:\\Temp\\old_log.log -Force
Get-ADObject -LDAPFilter '(objectCategory=computer)'
Get-Process -Name powershell
Get-ADOrganizationalUnit -Filter *
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Disconnect-PSDrive Z
whoami
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Write-Host 'Operation terminée'
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-ADGroupMember 'Domain Admins'
Get-ScheduledTask
Get-ProcessMitigation -Name powershell.exe
ipconfig /all
whoami
Get-WmiObject Win32_OperatingSystem
Get-LocalGroupMember -Group 'Administrators'
Get-NetFirewallRule | Where-Object {.Enabled -eq 'True'}
Get-Credential
Get-ChildItem -Recurse C:\\Scripts\\
Get-EventLog -LogName System -Newest 50
Start-Sleep -Seconds 10
Get-ADUser svc_backup -Properties lastLogonTimestamp
Get-WmiObject Win32_Service | Where-Object {.StartMode -eq 'Auto'}
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ADComputer -Filter *
Get-SmbShare
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-ADOrganizationalUnit -Filter *
Get-Process -Name powershell
Get-WmiObject -Class Win32_Process | Where-Object {.Name -like '*spoolsv*'}
Get-ProcessMitigation -Name powershell.exe
Invoke-WebRequest -Uri 'https://intranet.novatech.local' -UseDefaultCredentials
Get-ProcessMitigation -Name powershell.exe
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-LocalGroupMember -Group 'Administrators'
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-ScheduledTaskInfo -TaskName 'DailyBackupJob'
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-Date
Get-Date
New-PSDrive -Name Z -PSProvider FileSystem -Root \\\\DC01\\SYSVOL
Write-Host 'Operation terminée'
Get-Command -Module ActiveDirectory
Get-NetFirewallProfile
Get-Service | Where-Object {.Status -eq 'Running'}
Start-Sleep -Seconds 10
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Get-Date
Get-EventLog -LogName Security -After (Get-Date).AddDays(-7) -InstanceId 4662 -Newest 100
Get-NTFSAccess -Path C:\\SYSVOL
Add-Content -Path C:\\Scripts\\deploy.ps1 -Value '# Deployment script updated'
Get-EventLog -LogName Security -Source Microsoft-Windows-Security-Auditing -Newest 200
Get-ADGroup -Filter *
Get-ProcessMitigation -Name powershell.exe
Get-ADComputer -Filter *
hostname
ipconfig /all
Get-SmbSession
Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Format-Table Description,IPAddress,MACAddress
Get-SmbShare
Get-ProcessMitigation -Name powershell.exe
Get-WinEvent -FilterHashtable @{LogName='Directory Service';Id=4662} -MaxEvents 50
Get-EventLog -LogName Application -Newest 50
Invoke-Command -ComputerName DC01 -ScriptBlock { gpupdate /force }
Copy-Item -Path C:\\Temp\\* -Destination Z:\\Backup\\
Get-ProcessMitigation -Name powershell.exe
Get-Service | Where-Object {.Name -like '*crypt*'}
Disconnect-PSDrive Z
Get-WmiObject Win32_OperatingSystem
