TECH TIPS
Sample powershell scripts and commands
SAMPLE COMMANDS/SCRIPTS - run command to see which folder is the biggest http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1366742_mem1,00.html dir C:specifyfolder -Recurse | where {$_.psiscontainer} | select name, fullname ,@{n="Size";e={ (dir...
General powershell tips and warnings
GENERAL TIPS - test everything locally in an isolated folder using -whatif at the end of a command. this way, you can see what the results would be if it were run for real. when confident, remove -whatif. - be careful of -recursive because this does a recursive...
Is there a GUI that makes it easier to write powershell scripts?
GUI - POWERSHELL ISE AND POWERGUI - Powershell ISE comes with default powershell installation, good for easily starting remote powershell session on server - PowerGUI Script Editor - I recommend this to create scripts. - PowerGUI - good for quick view on active...
How do I run powershell scripts on a remote server?
SETUP/INSTALLATION 1 - install powershell 2.0/windows management framework on local machine and remote servers that you want to manage. http://support.microsoft.com/kb/968929 - running scripts on a remote machine only works in powershell 2.0 -- both the local and the...
What is powershell?
INTRO READING - What is PowerShell? http://en.wikipedia.org/wiki/Windows_PowerShell - Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0) http://support.microsoft.com/kb/968929
How to Change Your SQL 2008 Database Instance Name
So with a little hunting and SQL queries I found out that SQL Server doesn’t use the network name, it only excepts that as an alias. My SQL Server instance was still named “old_name”. I found that out by running these two queries: 1 sp_helpserver 2 select @@servername...