PowerShell Hack 2 : Instantly Fetch Software Lists from Multiple Servers!
"Hi doston! Aaj hum ek zabardast PowerShell script ke baare mein baat karenge jo aapko remote servers se software list instantly milne mein madad karegi. Is video mein, main aapko step-by-step dikhane waala hoon ki kaise aap yeh script use karke remote servers par installed software ka list turant nikal sakte hain. Yeh script especially un logon ke liye hai jo IT management ya network administration mein hain. Toh chaliye shuru karte hain aur dekhte hain kaise aap is powerful script ko apne kaam mein laa sakte hain!"
powershell script, remote servers, software list, IT management, network administration, PowerShell tutorial, sysadmin tools, Windows scripting, software inventory, IT tips, remote software check, PowerShell commands, IT automation, server management, tech tutorial,PowerShell Script To Get A List Of Installed Apps On Windows
Script to Get List of Software From Single Computer :
Define the computer name (use '.' for the local computer)
$ComputerName = "."
Retrieve the list of installed software
$softwareList = Get-WmiObject -Class Win32_Product -ComputerName $ComputerName
Check if softwareList is not empty
if ($softwareList.Count -eq 0) {
Write-Output "No software found on $ComputerName."
} else {
Create a CSV file to save the list
$outputFile = "InstalledSoftwareList_$ComputerName.csv"
Export the list of installed software to CSV
$softwareList | Select-Object Name, Version, Vendor | Export-Csv -Path $outputFile -NoTypeInformation
Inform the user
Write-Output "List of installed software has been saved to $outputFile."
}
Optionally, you can also display the list on the console
$softwareList | Select-Object Name, Version, Vendor
------------------------------------------------------------------------------------------------------------------------------------------
Script to Get List of Software From Multiple Computer :
Define a list of computer names or IP addresses
$ComputerNames = @("Server1", "Server2", "Server3") # Replace with your list of servers
Loop through each computer name
foreach ($ComputerName in $ComputerNames) {
Write-Output "Processing $ComputerName..."
try {
Retrieve the list of installed software
$softwareList = Get-WmiObject -Class Win32_Product -ComputerName $ComputerName -ErrorAction Stop
Create a CSV file to save the list
$outputFile = "InstalledSoftwareList_$ComputerName.csv"
Export the list of installed software to CSV
$softwareList | Select-Object Name, Version, Vendor | Export-Csv -Path $outputFile -NoTypeInformation
Write-Output "List of installed software for $ComputerName has been saved to $outputFile."
}
catch {
Write-Output "Failed to retrieve software list from $ComputerName. Error: $_"
}
}
Optionally, you can also display the results on the console
powershell script to install software, powershell scripting tutorial, powershell detected that you might be using a screen reader, powershell playlist, powershell download for windows 11, powershell telugu, powershell not working in vscode, powershell download for windows 10, powershell install windows 11 hindi, powershell empire kali linux, powershell script to install software to remote computers, powershell app deployment toolkit, powershell command to install software, powershell empire,powershell,windows powershell,learn powershell,powershell tutorial,powershell for beginners,powershell basics,powershell scripting,what is powershell,powershell commands,learning powershell,powershell scripting for beginners,powershell intro,how to use powershell,powershell training,powershell tutorials,microsoft powershell,what is windows powershell,powershell script,powershell examples,powershell tutorial for beginners,powershell automation
Информация по комментариям в разработке