Sending files via FTP with Powershell and WinSCP

So you need to send files  via FTP from Powershell in an automated fashion? Good news is its pretty easy with WinSCP and its .Net Assembly. The example on WinSCP’s website is good but its not a working example as far as production is concerned. Lets wrap it around a function to make it a […] Read more

3 comments

UNC paths with remote PowerShell

Attempting to use UNC paths during a remote PS session will fail due to the way credentials are stripped away for security reasons with powershell. Luckily there is a really simple solution. CredSSP. [crayon-647b33c319a51301580915/] Note that to use this you must enable credssp here's how: On the client machine: [crayon-647b33c319a58213149483/] Make sure to set your […] Read more

0 comments

Stop using the AD MMC Snap in – Powershell

Loading the MMC, adding the snapin, its a pain. Even if you save your view it takes ages to load. I’ve entirely replaced my work flow with powershell and the AD Module. Here are a few that I use daily: [crayon-647b33c319d5e588378631/] These three for me are a pretty big time saver, we can do a […] Read more

0 comments

Null vs. DBNull – Powershell

Today I found out that there is a difference between $null and [DBNull] in powershell. One of my projects uses a MySQL DB, a newer query returns null data depending on a few scenarios. Because of this my process would fail as the null value wasn’t being handled correctly. After some digging it turns out […] Read more

0 comments

Detect httpd high CPU usage and restart it (CollabNet SVN fix) – Powershell

CollabNet has a bug with LDAP and httpd. After a few days of use the httpd process will take up 100% of the cpu resources on the system and cause SVN to lock up. Restarting this manually is a PITA, and restarting it every N number of minutes is not acceptable. After a bit of […] Read more

8 comments