header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Remove a .dll from workstations in a domain.
Last Post 10 Feb 2010 12:50 PM by JKav. 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

--
06 Feb 2010 06:22 PM
    I want to remove a .dll from workstations in a domain.  Is this possible?
    PowerShell JediUser is Offline
    Basic Member
    Basic Member
    Posts:410
    Avatar

    --
    10 Feb 2010 12: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" ;-)
    PowerShell JediUser is Offline
    Basic Member
    Basic Member
    Posts:410
    Avatar

    --
    10 Feb 2010 12: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" ;-)
    JKavUser is Offline
    New Member
    New Member
    Posts:70
    Avatar

    --
    10 Feb 2010 12: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.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer