Tag Archives: powershell

Powershell – Copy the Latest Backup

I got an email recently where someone asked me how they can refresh a dev environment with Powershell. I guess I’d written something about this in 2009, though that would have been for testing as Red Gate had already banned … Continue reading

Posted in Blog | Tagged , , , , | 5 Comments

SQL Server Disk Space Emergencies

One of the things I’ll see happen often with SQL Server instances is that the system will run out of space on a drive. This could be for a variety of reasons, some of which can be prevented, and some … Continue reading

Posted in Blog | Tagged , , , | Comments Off on SQL Server Disk Space Emergencies

Use -eq in Powershell

I was writing a quick script to work with files and I only wanted to process one file for each execution of a loop. I could have done this multiple ways, but I threw this together: $fileEntries = [IO.Directory]::GetFiles(“d:\placeholder”); $delete … Continue reading

Posted in Blog | Tagged , | Comments Off on Use -eq in Powershell

Powershell Tips–Showwindow

Looking for help is a pain in Powershell. I type something like help get-process execute this and I’m scrolling up and down. Things scroll off the screen and I have to muddle through, meanwhile, my code is at the bottom … Continue reading

Posted in Blog | Tagged , | Comments Off on Powershell Tips–Showwindow