Get-Help – shows all of the available help topics
Update-Help – downloads the latest help files from the internet.
New-Website – creates an IIS website
Start-Website - Starts a website
Get-Help -ShowWindow – opens help in a new window (easy to copy and paste)
Get-Alias – shows the cmdlet aliases
Stop-Computer – Stops the computer
I was trying to import the WebAdministration module into Powershell using “Import-Module WebAdministration” but I got an error saying that running of scripts is disabled on this system.
What you need to do first is type “Get-ExecutionPolicy” which will come back and show as restricted.
Next, type in “Set-ExecutionPolicy RemoteSigned”
When prompted type “Y” to accept it.
What you need to do first is type “Get-ExecutionPolicy” which will come back and show as RemoteSigned and the WebAdministration module will import successfully.
I was building a new WSUS 3.0 SP2 server and thought I would automate the install of some of the prerequisites using Powershell
Save the following off as a file with a name such as install.ps1 into a folder such as C:\scripts.
Then from the powershell prompt type C:\scripts\install.ps1
You will then have the prerequisites installed!
To check, type get-windowsfeature at a Powershell prompt to view what is installed.
I had cloned 2 servers from a master image on my Hyper-V host, and then made the master a Domain Controller.
I then joined these 2 servers to the domain successfully and was able to log into them locally via the Hyper-v console.
When I tried to RDP to them , I kept getting the “Domain SID Inconsistent” error.
I then decided to check the SID of each server using the PSGetSID utility that can be downloaded from Microsoft and found that they were all the same, and this is the reason I couldn’t log in.
If the 2 servers hadn’t been cloned from the DC (although before it was a DC) then this wouldn’t have been an issue (although it is best to have different SID’s on your servers and workstations).
I deleted the 2 servers from Active Directory then ran SYSprep on the servers and chose the “OOBE” and ticked Generalize.
After running through the setup and rejoining the servers to the domain I was able to RDP in as they now had different SID’s to the DC.
Simply type $psversiontable at the Powershell prompt.
This command will work from Powershell 2.0 upwards
You simply need to type this into the Powershell console:
Install-WindowsFeature –Name Hyper-V -ComputerName localhost -IncludeManagementTools -Restart
Reboot and then Hyper-V will be installed and running!
I had installed a RocketRaid 2310 hardware RAID card in my Freenas server to give me more disk space for VM guests, and I need to make sure the array was building and initialized correctly.
I searched and found the Webgui software for FreeBSD (The Linux variant that FREEnas uses) But I wasn’t sure how to install it.
I found and article on Harforum.com by a person named Axan that had the basics, but needed tweaking for my setup, so most of the work is Axan’s.
#Installs raid webgui for rocketraid 2310
# make usr folder RW (read only on Freenas 9.1.1)
mount -rw /
#Create a 25MB RAM drive /var/tmp (for using pkg_add)
mdconfig -a -t malloc -s 25M -u 10
mount /dev/md10 /var/tmp
#Create a 20MB RAM drive /usr/share/hpt (destination folder
mdconfig -a -t malloc -s 20M -u 11
chmod 777 /usr/share/hpt
mount /dev/md11 /usr/share/hpt/
#download the file
fetch http://www.highpoint-tech.com/BIOS_Driver/HRM/FreeBSD/WebGUI-FreeBSD-v2.1.4- 130401.tgz
tar zxvf WebGUI-FreeBSD-v2.1.4-130401.tgz
#install the deamon
After that use your browser to go to
I have been working with 2012 server for a few months now and I am impressed with the new version Hyper-V and how licensing for Windows affects it.
The best thing is that a single Server 2012 Standard Edition has licencing for 2 virtual guest installs of Windows 2012 server on a host with up to 2 physical processors, and it includes downgrading rights to windows 2008R2 etc so you can run that if your application is not ready for Server 2012!
Windows 2012 Datacenter edition allows for unlimited licensing for guests based on physical processors(not cores, so you can have lots of cores and not pay more) and also allows for downgrading.
These editions are both great for building you own private cloud on your own hardware!
I have created this as a reference for myself.
MongoDB on Ubuntu:
Location of log file /var/log/mongodb/mongodb.log
Location of config file /etc/mongodb.conf
Find out why Mongo won’t start
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
How to stop a Mongo server from becoming Primary for 120 seconds – rs.freeze(120)
How to step down a Mongo server – rs.stepdown(120)
I have tried a few ways to upgrade, including removing the current install, and then using apt-get to install the newest version, but the Ubuntu repositories are sometimes out of date, and also a few things have gone wrong.
Here is the method I prefer which involves manually downloading, unzipping and then copying the new binaries over the existing ones:
1. Go to your temp directory : cd /tmp
2. Download the latest package from the MongoDB website to /tmp : sudo wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.1.tgz
3. Unzip the package: sudo tar -zxvf mongodb-linux-x86_64-2.4.1.tgz
4. Stop MongoDb – sudo service mongodb stop
5. Go to the folder where you just unzipped the files: cd /tmp/mongodb-linux-x86_64-2.4.1/bin
6. Copy the new files and overwrite the existing files: sudo cp -i * /usr/bin
7. Start the mongo service: sudo service mongodb start
8. Check that MongoDB is running and your MongoDB version : mongo