header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

Remove a .dll from workstations in a domain.
Last Post 10 Feb 2010 08:50 PM by jkavanagh58. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
kilgerUser is Offline
New Member
New Member
Posts:3
Avatar

--
07 Feb 2010 02:22 AM  
I want to remove a .dll from workstations in a domain.  Is this possible?
PowerShellJediUser is Offline
Basic Member
Basic Member
Posts:298
Avatar

--
10 Feb 2010 08:09 PM  
Yes... 99.9% of things are possible with Powershell.


$Computers = Get-Content C:\Computers.txt

$Computers | ForEach-Object{
[string]$FilePath = "\\$_\c$\Path\To\Dll.dll"
$DLLExsists = Test-Path $FilePath
if($DLLExsists -eq $true){Remove-Item $FilePath -Force}
}# ForEach-Obj...

PoSH is a Automation Technology surfaced as a scripting language, not a "spice" ;-)

Innotask Technologies
Tech Support for small & mid sized companies.
PowerShellJediUser is Offline
Basic Member
Basic Member
Posts:298
Avatar

--
10 Feb 2010 08:23 PM  
That is the simplest form of a script to do what you ask.

You may want to ping each machine before attempting to do other things to if because the ping timeout is shorter than the error "RPC Server unavailable" and it will reduce error for when you come to a machine that is not on or otherwise unreachable.

Also it is possible to get a list of computer names directly from Active Directory in Powershell. You should be able to search this forum to find examples of this.

Basically, your going to have invest some time into Powershell to get the best results. But.. YES it is possible.
PoSH is a Automation Technology surfaced as a scripting language, not a "spice" ;-)

Innotask Technologies
Tech Support for small & mid sized companies.
jkavanagh58User is Offline
New Member
New Member
Posts:59
Avatar

--
10 Feb 2010 08:50 PM  
I would use test-connection -quiet -count 1 versus a ping as it will return issues such as "lack of resources" . However the RPC issue might not be caught, I just mention that because I am seeing issues where test-connection works but gwmi fails (still trying to figure out why, in some cases it is a DMZ but other cases I have been told the end point machine has been modified so that RPC uses custom ports).
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 footer
footer