Just a simple note about a new cmdlet in PowerShell 3.0. Show-Command is something very useful if you try out a new PowerShell Command. It shows all the options and possible parameters you have with the cmdlet.
Show-Command Get-Childitem
Only 2 days after my small HTC TITAN review HTC released the first update for the TITAN. I could not find any information about this update, but there is no visible change at the moment.
If you use PowerShell remoting in some scripts you will se you cannot use a string to send it with the Invoke-Command cmdlet.
So you can simple convert a String to a Scriptblock
$scriptBlock = [Scriptblock]::Create($string)
Now here an example
$remoteCommand = @" Import-Module ActiveDirectory New-ADOrganizationalUnit -name "@ $scriptBlock = [Scriptblock]::Create($remoteCommand) Invoke-Command -ComputerName AD01 -ScriptBlock $scriptBlock
Basically you could create a function for that.
function ConvertTo-Scriptblock {
<#
Function to Convert a String into a Script Block
#>
Param(
[Parameter(
Mandatory = $true,
ParameterSetName = '',
ValueFromPipeline = $true)]
[string]$string
)
$scriptBlock = [scriptblock]::Create($string)
return $scriptBlock
}
Some you need to know which IP in a specific range is already in use. With Windows PowerShell there is a simple way to ping a IP range.
You can use the .Net class System.Net.Networkinformation.Ping to do this.
$ping = New-Object System.Net.Networkinformation.Ping
1..254 | % { $ping.send(“192.168.100.$_”) | select address, status }
For some KTSI projects I have been working a lot with Windows Server Core or Hyper-V Server. Now I had to do a lot of automation, so I made this little connection of commands. If you configure the server manually you can do the most important things with the sconfig utility.
Set Hostname
netdom renamecomputer %COMPUTERNAME% /NewName:<NewComputerName>
Join Domain
netdom join %COMPUTERNAME% /domain:<DomainName> /userd:<UserName> /passwordd:*
Remove Domain
netdom remove
Rename Network Interface
netsh interface set interface name=”old name” newname=”new name”
Configure IP Address
netsh interface ipv4 set address name=”<Interface Name>” source=static address=<IPAddress> mask=<SubnetMask> gateway=<DefaultGateway>
Configure DNS Servers
netsh interface ipv4 add dnsserver name=”<Interface Name>” address=<DNS Server IP> index=1
Disable Firewall (not recommended)
netsh advfirewall set allprofiles state off
Enable PowerShell Remoting
Enable-PSRemoting
Enable Remotedesktop
netsh advfirewall firewall set rule group=”remote desktop” new enable=yes
Enable Remote Administration
advfirewall firewall set rule group=”Remote Administration” new enable=yes
Enable Remote Firewall Administration
netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable=yes
Enable ICMP (Ping)
netsh firewall set icmpsetting 8
Enable Remote Disk Management
netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes
Enter License key
slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Activate Windows
slmgr.vbs -ato
Enable automatic updates
cscript C:'Windows'System32'Scregedit.wsf /au 4
Disable automatic updates
cscript C:'Windows'System32'Scregedit.wsf /au 1
Get availibale features & roles
Dism /online /get-features /format:table
Enable feature & roles
Dism /online /enable-feature /featurename:<featurename>
Change Administrator password
net user administrator *
Restart Computer
shutdown /r /t 0
Logoff
logoff
More information about Server Core: TechNet

Today Nokia released their first two Windows Phone devices, the Nokia Lumia 800 and the Nokia Lumia 710. I am really looking forward to get a Nokia Lumia 800 as soon as possible. I think this is one of the first phones which can be compared to the iPhone in terms of design (Of course besides the Nokia N9).
Nokia Lumia 800 specs: