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