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