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