Script Requests

This is a place for you to request a PowerShell tool, script, or piece of code.

 

Submitted Requests

i have tried with different powershell scripts but in the output few installed applications are missing. My Request: I have 1000+ servers with different Windows OS versions. need script to fetch all the application details installed onto the servers.

Many post how to setup a Kiosk / auto logon, Sysinternals has a great 3.01v, however to take advantage of the settings to Enable/Disable for each user their is not currently a command line to accept the option while at the same time being prompt for credentials/or acceptance from the UAC. Script to automate using … Continue reading AutoLogon Using LSA Secret with Sysinternals via Group Policy Startup

Hello from germany, first of all: your robocopy gui is perfekt for me and my coworkers!!! Using robocopy for many years and it is a pain for me to get other people work with robocopy... now no longer ;-) I have a little request: We like to monitor daily 3-4 shares for file growing and log into a logfile/csv... automatticly My first option was to do a robocopy with option /L only logging and parsing the logfile but i can't get it working... I bookmarked your side! Keep working and have fun!

02/27/2015RoboCopy GUI

This is not a request but a submission, I am currently working on updating your script to include tooltips for every check box to make it more user friendly.(I had trouble understanding all the checkboxes at first) I decided to add tooltips for each one that includes an excerpt of the help text for that flag(a lot easier than trying to read the entire help file in the viewer(overwhelming)

2 thoughts on “Script Requests”

  1. Hello I am using your script but am receiving an error.. Can you help?

    Error
    Missing closing ‘}’ in statement block.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndCurlyBrace

    Script:

    $LogFolder=“C:\temp”
    $Arcfolder=”\\nafile126.sc.intel.com\software$\temp\archive”
    $LastWrite=(get-date).AddDays(-30).ToString(“MM/dd/yyyy”)
    If ($Logs = get-childitem $LogFolder | Where-Object {$_.LastWriteTime -le $LastWrite -and !($_.PSIsContainer)} | sort-object LastWriteTime)
    {
    foreach ($L in $Logs)
    {
    $FullName=$L.FullName
    $WMIFileName= $FullName.Replace(“\”, “\\”)
    $WMIQuery = Get-WmiObject -Query “SELECT * FROM CIM_DataFile WHERE Name=’$WMIFileName’“
    If ($WMIQuery.Compress()) {Write-Host “$FullName compressed successfully.”-ForegroundColor Green}
    else {Write-Host “$FullName was not compressed.” -ForegroundColor Red}

    1. Hi Mike,

      The below should rectify your problem
      ###############
      #Code starts Here#
      ###############
      $LogFolder=“C:\temp”
      $Arcfolder=”\\nafile126.sc.intel.com\software$\temp\archive”
      $LastWrite=(get-date).AddDays(-30).ToString(“MM/dd/yyyy”)
      If ($Logs = get-childitem $LogFolder | Where-Object {$_.LastWriteTime -le $LastWrite -and !($_.PSIsContainer)} | sort-object LastWriteTime)
      {
      foreach ($L in $Logs)
      {
      $FullName=$L.FullName
      $WMIFileName= $FullName.Replace(“\”, “\\”)
      $WMIQuery = Get-WmiObject -Query “SELECT * FROM CIM_DataFile WHERE Name=’$WMIFileName’“

      If ($WMIQuery.Compress()) {Write-Host “$FullName compressed successfully.”-ForegroundColor Green}

      else {Write-Host “$FullName was not compressed.” -ForegroundColor Red}
      }
      }
      ##############
      #Code Ends Here#
      ##############

Leave a Reply

Your email address will not be published. Required fields are marked *

Windows PowerShell scripts and tools for task automation.