Archive for the ‘Microsoft’ Category
| To install the Administration Tools pack by using the Windows interface |
- Download the Administration Tools package from the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=137379).
- Open the folder into which the package downloaded, double-click the package to unpack the files, and then start the Remote Server Administration Tools Setup Wizard.

Note You must accept the License Terms and Limited Warranty to install Administration Tools. - Complete all the steps that are required by the wizard, and then click Finish to exit the wizard when installation is completed.
- Click Start, click Control Panel, and then click Programs.
- In the Programs and Features area, click Turn Windows features on or off.
If you are prompted by User Account Control to allow the Windows Features dialog box to open, click Continue.
- In the Windows Features dialog box, expand Remote Server Administration Tools.
- Select the remote management tools that you want to install, and then click OK.
- Configure the Start menu to display the Administration Tools shortcut, if it is not already there.
- Right-click Start, and then click Properties.
- On the Start Menu tab, click Customize.
- In the Customize Start Menu dialog box, scroll down to System Administrative Tools, and then select Display on the All Programs menu and the Start menu. Click OK.
Shortcuts for snap-ins installed by Remote Server Administration Tools for Windows 7 are added to the Administrative Tools list on the Start menu.
1 2 | $notespw = Read-Host "Enter the password for the Notes ID file" -AsSecureString $notespw | ConvertFrom-SecureString | Set-Content $pwfile -force |
To retrieve the password and create the PSCredential object:
1 2 | $notespw = get-content $pwfile | ConvertTo-SecureString $notesid = new-object -typename system.management.automation.pscredential -argumentlist "-default-",$notespw |
Example of use:
1 | Get-DominoMailbox mary@contoso.com -SourceCredential $notesid |
This has been out for a while now. I really hadn’t needed to use this, however I used it a handful of times this week, and i do love it!!
http://blogs.msdn.com/webplatform/
http://www.microsoft.com/Web/
This is an example of a very simple multi thread script. All it does is output 2 user names per function.
But you can only imagine the power.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | #Create a function, or in this example create/split up a large job into multiple functions. #Step 1 : Create threading.ps1 #Step 2 : Create function and add it to threading.ps1 #(Sample Function) function one{ $users1 = "CORP1\Bollasr1", "CORP2\aardeje1" foreach ($u in $users1){ Write-Output "$u" } } one | out-File C:\lnl\oneresults.txt #Step 3 : Wrap the function inside a function with (Write-Output ' ') around each line. #(Sample Wrapped Function) function createone{ Write-Output 'function one{' Write-Output ' $users1 = "CORP1\Bollasr1", "CORP2\aardeje1"' Write-Output ' foreach ($u in $users1){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'one | out-File C:\lnl\oneresults.txt' } #Now I will show an example of 5 threads. This file is called threading.ps1 ##Create Multi Thread Script function createone{ Write-Output 'function one{' Write-Output ' $users1 = "CORP1\Bollasr1", "CORP2\aardeje1"' Write-Output ' foreach ($u in $users1){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'one | out-File C:\lnl\oneresults.txt' } function createtwo{ Write-Output 'function two{' Write-Output ' $users2 = "CORP1\dudlesu1", "CORP2\duerrma1"' Write-Output ' foreach ($u in $users2){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'two | out-File C:\lnl\tworesults.txt' } function createthree{ Write-Output 'function three{' Write-Output ' $users3 = "CORP1\khattpa2", "CORP1\khattsa1"' Write-Output ' foreach ($u in $users3){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'three | out-File C:\lnl\threeresults.txt' } function createfour{ Write-Output 'function four{' Write-Output ' $users4 = "CORP1\pellath1", "CORP2\pellian5"' Write-Output ' foreach ($u in $users4){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'four | out-File C:\lnl\fourresults.txt' } function createfive{ Write-Output 'function five{' Write-Output ' $users5 = "CORP1\trancu1", "CORP2\tranth8"' Write-Output ' foreach ($u in $users5){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'five | out-File C:\lnl\fiveresults.txt' } #Step 4 : Create .ps1 scripts out of the functions. #Take note that ..\..\ alows for a releative path. createone | out-File ..\..\Threadone.ps1 createtwo | out-File ..\..\Threadtwo.ps1 createthree | out-File ..\..\Threadthree.ps1 createfour | out-File ..\..\Threadfour.ps1 createfive | out-File ..\..\Threadfive.ps1 #Step 5 : Launch threading script. start-job -filepath ..\..\Threadone.ps1 start-job -filepath ..\..\Threadtwo.ps1 start-job -filepath ..\..\Threadthree.ps1 start-job -filepath ..\..\Threadfour.ps1 start-job -filepath ..\..\Threadfive.ps1 #Step 6 : Check Status of Jobs #The Wait-Job cmdlet waits for Windows PowerShell background jobs to complete before it displays the command prompt. get-job | wait-job #Step 7 : Stop any Job that may be hung. #The Stop-Job cmdlet stops Windows PowerShell background jobs that are in progress. get-job | stop-job #full Script called threading.ps1 ##Create Multi Thread Script function createone{ Write-Output 'function one{' Write-Output ' $users1 = "CORP1\Bollasr1", "CORP2\aardeje1"' Write-Output ' foreach ($u in $users1){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'one | out-File C:\lnl\oneresults.txt' } function createtwo{ Write-Output 'function two{' Write-Output ' $users2 = "CORP1\dudlesu1", "CORP2\duerrma1"' Write-Output ' foreach ($u in $users2){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'two | out-File C:\lnl\tworesults.txt' } function createthree{ Write-Output 'function three{' Write-Output ' $users3 = "CORP1\khattpa2", "CORP1\khattsa1"' Write-Output ' foreach ($u in $users3){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'three | out-File C:\lnl\threeresults.txt' } function createfour{ Write-Output 'function four{' Write-Output ' $users4 = "CORP1\pellath1", "CORP2\pellian5"' Write-Output ' foreach ($u in $users4){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'four | out-File C:\lnl\fourresults.txt' } function createfive{ Write-Output 'function five{' Write-Output ' $users5 = "CORP1\trancu1", "CORP2\tranth8"' Write-Output ' foreach ($u in $users5){' Write-Output ' Write-Output "$u"' Write-Output ' }' Write-Output '}' Write-Output 'five | out-File C:\lnl\fiveresults.txt' } createone | out-File ..\..\Threadone.ps1 createtwo | out-File ..\..\Threadtwo.ps1 createthree | out-File ..\..\Threadthree.ps1 createfour | out-File ..\..\Threadfour.ps1 createfive | out-File ..\..\Threadfive.ps1 start-job -filepath ..\..\Threadone.ps1 start-job -filepath ..\..\Threadtwo.ps1 start-job -filepath ..\..\Threadthree.ps1 start-job -filepath ..\..\Threadfour.ps1 start-job -filepath ..\..\Threadfive.ps1 get-job | wait-job get-job | stop-job |
Thanks to http://blogs.msdn.com/sharepoint/archive/2007/03/02/be-wary-when-removing-or-replacing-the-my-site-link.aspx and http://suguk.org/forums/thread/6898.aspx.
I needed a way of adding a link back to the portal site, when in my MySite. I went to “Personalization site links”. Added a link but every time it would add the http://%yoururl%/default.aspx?MySiteView=1 . Made me crazy. Anyway thanks to the folks that bloged about it first.
Thanks goes to the following people/sites: http://blogs.msdn.com/dansellers/archive/2005/11/09/491152.aspx & http://windowsitpro.com/Web/article/articleid/9738/extending-the-user-class-in-the-ad-schema.html
Enable Password Question and Password Reset:
When these attributes are set to true in the web config file as seen below, the user is required to provide an answer to a Password Question when the password is first created. When the user resets their password, they will also be required to provider the answer they supplied to the Password Question when the password was first created.
<membership defaultProvider=”ADAMProvider”>
<providers>
<add
connectionStringName=”ADCnString”
connectionUsername=”CN=ADAdmin,OU=Users,O=ADAuth”
connectionPassword=Pass@word1
connectionProtection=”None”
requiresQuestionAndAnswer=”true”
enablePasswordReset=”true” …
Mapping Password Question and Answer Attributes:
Both the Password Question and the Answer will be saved in the SQL Server, Active Directory, or the Active Directory Application Mode (ADAM) depending upon the provider you are using. However, if you are using the Active Directory Provider you will be required to modify the schema of either the Active Directory or ADAM to store the Password Question and Password Answer. Then in the web config file you will need map the Password Question and Answer’s attributes to the modified schema as shown below:
<membership defaultProvider=”ADAMProvider”>
<providers>
<add
connectionStringName=”ADCnString”
connectionUsername=”CN=ADAdmin,OU=Users,O=ADAuth”
connectionPassword=Pass@word1
connectionProtection=”None”
requiresQuestionAndAnswer=”true”
enablePasswordReset=”true”
attributeMapPasswordQuestion=”PwdQuestion”
attributeMapPasswordAnswer=”PwdAnswer” …
Example Schema Modification:
Creating the PwdQuestion and PwdAnswer attribute as defined above is not difficult in the ADAM ADSI Edit tool under the Schema configuration, but initially it takes a while to figure out what values required by the attribute schema wizard. Below is an example of the values that you can use in your Active Directory or ADAM directory.
cn: PwdQuestion
OMSyntax: 64 (for Unicode string)
lDAPDisplayName: PwdQuestion
isSingleValued: TRUE
AttributeSyntax: 2.5.5.12 (Active Directory syntax type of Unicode)
AttributeID: 1.2.840.113556.1.6.1.1.6221 (Unique Object Identifiers (OIDs))
cn: PwdAnswer
OMSyntax: 64 (for Unicode string)
lDAPDisplayName: PwdAnswer
isSingleValued: TRUE
AttributeSyntax: 2.5.5.12
AttributeID: 1.2.840.113556.1.6.1.1.6222
Schema modifications:
Creating the Failed Password Count, Failed Password Answer Time and Failed Password Locked Out Time attributes–as defined below–is not difficult in the ADAM ADSI Edit tool under the Schema configuration, but initially it takes a while to figure out what values are required by the attribute schema wizard. Below is an example of the values that you can use in your Active Directory or ADAM directory.
cn: FailedPwdCount
OMSyntax: 2 (for type integer)
lDAPDisplayName: FailedPwdCount
isSingleValued: TRUE
AttributeSyntax: 2.5.5.9 (Active Directory syntax type of Unicode)
AttributeID: 1.2.840.113556.1.6.1.1.6223 (Unique Object Identifiers (OIDs))
cn: FailedPwdAnswerTime
OMSyntax: 65 (for Large integer/Interval)
lDAPDisplayName: FailedPwdAnswerTime
isSingleValued: TRUE
AttributeSyntax: 2.5.5.16
AttributeID: 1.2.840.113556.1.6.1.1.6224
cn: FailedPwdLockOutTime
OMSyntax: 65 (for Large integer/Interval)
lDAPDisplayName: FailedPwdLockOutTime
isSingleValued: TRUE
AttributeSyntax: 2.5.5.16
AttributeID: 1.2.840.113556.1.6.1.1.6225
Modify Web Config File:
When using the Active Directory Provider you will be required to modify the Web config to map the Failed Password Answer Count, Failed Password Answer Time and Failed Password Answer Lockout Time attributes to the appropriate User’s properties (as created above) in either your Active Directory or ADAM.
<membership defaultProvider=”ADAMProvider”>
<providers>
<add
connectionStringName=”ADCnString”
connectionUsername=”CN=ADAdmin,OU=Users,O=ADAuth”
connectionPassword=Pass@word1
connectionProtection=”None”
requiresQuestionAndAnswer=”true”
enablePasswordReset=”true”
attributeMapPasswordQuestion=”PwdQuestion”
attributeMapPasswordAnswer=”PwdAnswer”
attributeMapFailedPasswordAnswerCount=”FailedPwdCount” attributeMapFailedPasswordAnswerTime=”FailedPwdAnswerTime”
attributeMapFailedPasswordAnswerLockoutTime=”FailedPwdLockOutTime”
(Adding the attributes to the user clasee)
From the Schema Console, click the Class folder. Scroll down to the User class, right-click it, and select Properties. On the user Properties dialog box, click the Attributes tab, which Figure 7 shows. Click Add, then choose the Gender attribute. Click OK twice, and you’ve successfully added the Gender attribute to the User class.
Here are the commands I used:
stsadm -o addcontentdb -url http://moss:1000 -databasename SharePoint_AdminContent_moss
stsadm -o enumsites -url http://moss:1000 > output.txt
stsadm -o mergecontentdbs -url http://moss:1000 -operation 2 -sourcedatabasename SharePoint_AdminContent_f58aa288-57e9-49ff-b953-9b4d53d50bfc -destinationdatabasename SharePoint_AdminContent_moss -filename output.txt
iisreset
stsadm -o deletecontentdb -url http://moss -databasename SharePoint_AdminContent_f58aa288-57e9-49ff-b953-9b4d53d50bfc
check with stsadm -o enumcontentdbs -url http://moss:1000
You can copy the names in AutoComplete from your old computer to your new one.
Copy the names in AutoComplete to another computer
Important You must exit Outlook before starting the following procedure. The names will be included in AutoComplete when you restart Outlook.
- On the computer with the saved AutoComplete names, go to drive:\Documents and Settings\user name\Application Data\Microsoft\Outlook.Note Depending on your file settings, this folder might be hidden. To view the files in this folder, do one of the following:
- Click Start, and then click My Computer.
- On the Tools menu, click Folder Options.
- Click the View tab, and then, under Advanced settings, under Hidden files and folders, click Show hidden files and folders.
- Double-click My Computer on your desktop.
- On the Tools menu, click Folder Options.
- Click the View tab, and then click Show hidden files and folders.
- Right-click profile name.nk2, and then click Copy.Tip You can copy the file to removable media, such as a floppy disk or a CD, and then copy the file to the correct location on the other computer. Or you can attach the file to an e-mail message and send the message to yourself. On the new computer, open the attachment in Outlook, and then save it to the correct location.
- On the computer where you want to populate the AutoComplete feature, copy the file to drive:\Documents and Settings\user name\Application Data\Microsoft\Outlook.
- If the Outlook user profile name is different on the computer where you are moving the .nk2 file, you must rename the file with the same Outlook user profile name after you copy it to the correct folder. For example, if you move Kim Akers.nk2 from the original computer with an Outlook user profile name of Kim Akers, and you copy the Kim Akers.nk2 file to the new computer, you must rename it with the Outlook profile name being used on the new computer.
- When prompted about replacing the existing file, click Yes.
- Open Outlook to view changes.






