Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. shinedog

    CompressEx on a folder w/ Recursive syntax??

    Well apparently I shouldn't script first thing Monday morning as I was passing the first [in] as null which it didn't like. Bad code: (Get-WmiObject -class "Win32_Directory" -filter "name='$systemroot\\System32\\LogFiles'" -ErrorVariable errorstatus -ErrorAction...
  2. shinedog

    CompressEx on a folder w/ Recursive syntax??

    Having some trouble with the syntax for compressing a folder and all its subfolders/files. The Win32_Directory WMI class has the method CompressEx which has a recursive parameter which is supposed to then compress all subfolders/files under the initial folder. If I call (Get-WmiObject -class...
  3. shinedog

    Using variables in Get-WmiObject filters?

    So I think this should be pretty easily but its something I constantly trip over. In this specific example, I am trying to compress a folder. The following code works fine: (Get-WmiObject -class "Win32_Directory" -filter "name='C:\\Windows\\System32\\LogFiles'").Compress() However for...
  4. shinedog

    VBScript generates ActiveX error on 1 PC!

    Perhaps try registering shdocvw.dll on that computer?
  5. shinedog

    AD Age attribute

    The createTimeStamp attribute should get you what you want.
  6. shinedog

    adding user to local computer group

    Quick and dirty using an old script I had: 'Adds users to local groups on computers 'Constants for text file manipulation Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") 'Open and read the list of users Set objUserFile...
  7. shinedog

    Script to Check if tasks is running a job if not then close a program

    ...& strComputer & "\root\cimv2") 'Kill backup process if it is running Set colProcess = objWMIService.ExecQuery("Select * from Win32_Process Where Name = '" & strProcess & "'") For Each objProcess in colProcess objProcess.Terminate() Next The code basically uses WMI to build a collection...
  8. shinedog

    AD Object Modified By

    Not on the object itself. You would need to search through domain controller security logs in order to find the event that corresponds to the object modification that you are looking for. Quite a PITA as depending on how fast your security logs wrap, the event you're looking for may have been...
  9. shinedog

    External enclosure for retrieving data from old drives?

    Thanks for the input guys. Someone in my dept. here at work happens to have the exact same model as the one provided in the CompUSA link and is going to let me borrow it :)
  10. shinedog

    External enclosure for retrieving data from old drives?

    I have a stack of old hard drives at home from my PCs over the years. I always kept all the drives as I replaced them for obvious privacy issues plus I never knew if there would ever be anything on them that I may need in the future. I'd like to begin weeding them out so I can discard them...
  11. shinedog

    Change icon of folder with script

    Not sure about doing it with VBScript but you can easily do this by using desktop.ini. For example, let's say you have a folder called C:\CustomFolder. In that folder you have C:\CustomFolder\desktop.ini. In the desktop.ini, you would have something like: [.ShellClassInfo]...
  12. shinedog

    Remove a Trustee from an ACE?

    Wow that worked like a champ right out of the box. I knew it was an issue with the array and I was trying something similar before I gave up Friday night. Beat my head into the wall for a while on that one. Thanks a lot tsuji!
  13. shinedog

    Remove a Trustee from an ACE?

    Hey guys, been a long day. I'm having trouble wrapping my head around how to remove an ACE from a DACL if the Trustee matches a certain group. I'm opening a couple text files to read in a list of servers and a list of shares. Then I cycle through each targeted share on each server reading in...
  14. shinedog

    Problem deleting proxyAddresses values with PutEx ?

    Yeah I tried calling the SetInfo in the loop and it still did the same thing, wouldn't delete anything. The SetInfo works outside the loop for the CLEAR so I think it should for the DELETE also. I'm assuming I can go through the proxyAddresses array once and mark the ones I'm looking for as...
  15. shinedog

    Problem deleting proxyAddresses values with PutEx ?

    Hey all, I got what I think should be a relatively simple script. Const ADS_PROPERTY_CLEAR = 1 Const ADS_PROPERTY_DELETE = 4 strDN = InputBox("Enter the distinguishedName:","Clean up rfax: addresses") Set objUser = GetObject("LDAP://" & strDN) For Each strAddress In objUser.proxyAddresses...
  16. shinedog

    Scripting the publishing of a CRL?

    Ack, I hate when I post something and the light bulb goes off a few minutes later. The easy answer is to basically just script it using a shell run to call "certutil -crl -delta" Duh!
  17. shinedog

    Scripting the publishing of a CRL?

    I don't know if this is even possible as I can;t seem to find any information anywhere. We have an Offline Root CA that basically stays shut off. Every once in a while though we have to boot it up, open Certification Authority, right-click Revoked Certificates, click on All Tasks/Publish and...
  18. shinedog

    Windows 2008 Disabling Auto Activation Afer 3 Days?

    I did install it without entering a product key. I actually found the solution to my problem. When you run a default install of Windows 2008, it defaults to a KMS-based installation and what it will attempt to auto activate off of is a Key Management Server, not the Microsoft key management...
  19. shinedog

    Windows 2008 Disabling Auto Activation Afer 3 Days?

    I just installed my first Windows 2008 server using a MAK license key (we have 500 uses of this license). By default, the OS is set for auto activation after 3 days even though the grace period is set to 60 days. What I am assuming this means is that after 3 days, it is going to attempt to...
  20. shinedog

    Script syntax to find the total SMS Cache on a PC

    I can't seem to find anything that specifically states a path to the Cache location but it appears to always be under the SMS path location. The following code works on my PC: Dim strKeyPath, strValueName, strComputer, objRegistry, strValue Dim objFSO, objFolder, strFolderSize Const...

Part and Inventory Search

Back
Top