Tuesday, September 08, 2020

Fix Cisco ASDM Windows 10 Error "This app can't run on your PC"

 Seems that Microsoft has done some switching of how the Windows Scripting Host path is found.

This is a simple fix.

1. Install ASDM as you normally would

2. Right click on the shortcut.

3. In the "Target" line you will see a very long path to wscript.exe.  Simply change this path to C:\Windows\System32\wscript.exe (leave the invisible.vbs run.bat on the end as these scripts are used to open ASDM).

4. Apply the change.

After doing this I was able to open ASDM normally and use it to update ASDM and AnyConnect files on my ASA.

Good luck!

Tuesday, June 09, 2020

Exchange Logging: Clear out the log files

Here is a simple PowerShell script that you can run against Exchange either manually as part of your maintenance routine or with Task Scheduler to clear out files when you need to.

I must admit the first time I ran this on my Exchange 2013 server it took almost 5 minutes to complete and freed up over 30G of drive space from the multiple years of log files hidden all over.

At the top of the script make sure you change the drive letter if needed to match where your Exchange log files are stored.  Sadly I have seen many Exchange servers over the years with everything installed on C: so this script just assumes that.

NOTE:  Please make sure you have good backups in place and/or a snapshot of your virtual machine before running this.  While I have tested the script with no negative effects, please do not assume this will always be the case.  There is no substitution for good backups and a quick recovery plan if needed.

If you want to run the file manually, just open PowerShell as administrator, navigate to where you have your script file saved (Example Name:  ClearFiles.ps1).  From there just type in ./ClearFiles.ps1 and wait on the script to complete the cleanup.

Good luck.

Set-Executionpolicy RemoteSigned
$days=2
$IISLogPath="C:\inetpub\logs\LogFiles\"
$ExchangeLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Logging\"
$ETLLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces\"
$ETLLoggingPath2="C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs"
Function CleanLogfiles($TargetFolder)
{
    if (Test-Path $TargetFolder) {
        $Now = Get-Date
        $LastWrite = $Now.AddDays(-$days)
        $Files = Get-ChildItem $TargetFolder -Include *.log,*.blg, *.etl, *.txt -Recurse | Where {$_.LastWriteTime -le "$LastWrite"}
        foreach ($File in $Files)
            {Write-Host "Deleting file $File" -ForegroundColor "white"; Remove-Item $File -ErrorAction SilentlyContinue | out-null}
       }
Else {
    Write-Host "The folder $TargetFolder doesn't exist! Check the folder path!" -ForegroundColor "white"
    }
}
CleanLogfiles($IISLogPath)
CleanLogfiles($ExchangeLoggingPath)
CleanLogfiles($ETLLoggingPath)
CleanLogfiles($ETLLoggingPath2)

Friday, January 17, 2020

Disable User Editing Connections HP ThinPro 7.x (T530)

So I ran into this one yesterday.  After pushing out a configuration to our new HP T530 thin clients I was shocked to discover that one of the users had the ability with the OS locked down to delete their RDP connection icon.

I quickly recreated it on the thin client so they could log back in.  Today I set out to change the configuration and push it to all of our thin clients to prevent this from happening again.  Here's how:

1.  Go into Administrator mode on ThinPro
2.  Right click on the respective connection on the desktop.  Ex: RDP
3.  Select Edit and then go to Advanced.
4.  Remove the check box beside "Allow the user to edit this connection".

This process is the same for all connection types on the thin client.  I read through the Administrator guide and wasn't able to find a global setting so you'll need to do this for each connection type you are using.

I hope this helps prevent you running into the same issue.

Good luck!

I'm Back!

It's been quite a while since my last post as I had transitioned into a job where I was doing more sales and quoting than field work so I didn't really have anything to post.

Now, I have changed jobs and on a daily basis I'm back into engineering and field work again.

To that end, I'm sure I will run into new issues and processes that I'll put up here for everyone to see and use.  I just hope the bits I add helps someone in IT like me get through a tough problem or issue and look like a champ doing it.

Thanks to everyone that has messaged me with questions and support these past few years.  This blog just serves as my small way of helping all of the people that have posted articles and on forums over the years that helped me out of a tight spot.

I hope 2020 and beyond are great for all.

Thanks!

Monday, October 30, 2017

Change 2040/2042 HPE SAN Ports from FC to iSCSI

As I work with these SANs a lot, one of the first things I have to do is change the ports over from the default FC mode to iSCSI mode so they can be connected to the SAN via 10G fiber connections.

Believe it or not this is very tough to find out the exact syntax in the HPE documentation.

Since it is a simple process, I have outlined it below:

1. Connect to the SAN controller via Putty
2. Run this command:  set host-port-mode [FC | iSCSI | FC-and-iSCSI]

Parameters:

  • FC: Sets all ports to FC
  • iSCSI: Sets all ports to iSCSI
  • FC-and-iSCSI: Sets the first two ports to FC and the second two ports to iSCSI

That's all there is to it.  

Good luck!