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