PowerShell; SharePoint 2010: Set Alternate Access Mapping

I need to set Alternate Access Mapping remotely as part of my automation. I can’t find how to specify PowerShell version for Invoke-Command CMDlet. So I decided to use this workaround: Invoke-Command -computer sp2010.vlasenko.org -script { $command = “Add-PSSnapin Microsoft.SharePoint.PowerShell; New-SPAlternateURL ‘http://vlasenko.nmsp.org’ -Zone ‘Internet’ -WebApplication ‘SharePoint – 80′” PowerShell -v 2 -Command “& { $commandContinue reading “PowerShell; SharePoint 2010: Set Alternate Access Mapping”

Howto change IBM Connections 4.5 hostname?

Have created the IBM Connections 4.5 image. Now I need to be able to clone it. C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin> Command to check you WAS node hostname: wsadmin.bat -user wasadmin -password pa$$word-c “$AdminConfig show (cells/CONNECTIONSCell01/nodes/CONNECTIONSCellManager01|serverindex.xml#ServerIndex_1) hostName” Command to change WAS node hostname: wsadmin.bat -user wasadmin -password pa$$word -c “$AdminConfig modify (cells/CONNECTIONSCell01/nodes/CONNECTIONSCellManager01|serverindex.xml#ServerIndex_1) {{hostName myconnections.acme.org}}” I’ve also changed C:\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\CONNECTIONSCell01\LotusConnections-config\LotusConnections-config.xml toContinue reading “Howto change IBM Connections 4.5 hostname?”

Ubuntu: Attach EBS Volume & Mount it to a directory

Assume you have installed AWS Command Line Interface and you instance is started with appropriate AWS IAM Role (so you don’t need explicitly provide credentials). —- #!/bin/bash # 1. Make a directory to serve as a mount point mkdir -p /data chown `id -u` /data # 2. Attach EBS volume to the instance export AWS_DEFAULT_REGION=us-east-1 VolumeId=$(awsContinue reading “Ubuntu: Attach EBS Volume & Mount it to a directory”

Creating an AWS Account

Source: http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/AboutAWSAccounts.html To access any web service AWS offers, you must first create an AWS account at http://aws.amazon.com. An AWS account is simply an Amazon.com account that is enabled to use AWS products; you can use an existing Amazon.com account login and password when creating the AWS account. Important If you have a personal Amazon.comContinue reading “Creating an AWS Account”

PowerShell: Register AWS EC2 instances in AWS R53

UPDATE: #PowerShell: Register AWS EC2 instances in Amazon Route 53 (new way) Suppose you have a variable $lab: $lab = @{id=’ami-7300091a’; name=’1.dc.mylab.com’; type=’m1.small’; maxbid=’0.02′; CNAME=’ec2-54-000-117-7.compute-1.amazonaws.com’}, @{id=’ami-49000e20′; name=’1.sql.mylab.com’; type=’cc1.4xlarge’; maxbid=’0.09′; CNAME=’ec2-184-73-000-182.compute-1.amazonaws.com’} Let’s update AWS R53 entries by using instances CNAME: $zoneId = ‘ZB00X5FI00YBB’ foreach($computer in $lab){ “[$($computer.name)]`t[R53] update… ” | Out-Default $result = Get-R53ResourceRecordSet -HostedZoneId $zoneId -StartRecordName $computer.name -MaxItems 1Continue reading “PowerShell: Register AWS EC2 instances in AWS R53”