<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PowerShell Daily &#187; Featured Articles</title>
	<atom:link href="http://proproit.com/category/featured/feed/" rel="self" type="application/rss+xml" />
	<link>http://proproit.com</link>
	<description>Using PowerShell in Real Life Daily</description>
	<lastBuildDate>Thu, 11 Oct 2012 08:19:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Windows Management Framework 3.0 &#8211; Beta</title>
		<link>http://proproit.com/installation/windows-management-framework-3-0-beta/</link>
		<comments>http://proproit.com/installation/windows-management-framework-3-0-beta/#comments</comments>
		<pubDate>Thu, 03 May 2012 08:00:23 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Annoying]]></category>
		<category><![CDATA[assignment operator]]></category>
		<category><![CDATA[cim]]></category>
		<category><![CDATA[community technology]]></category>
		<category><![CDATA[ctp2]]></category>
		<category><![CDATA[dynamic scoping]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[error messages]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[help system]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[installing windows]]></category>
		<category><![CDATA[management framework]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PSCX]]></category>
		<category><![CDATA[release versions]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[remote management]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server manager]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[technology preview]]></category>
		<category><![CDATA[troubleshoot problems]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[windows management]]></category>
		<category><![CDATA[windows management instrumentation]]></category>
		<category><![CDATA[WinRM]]></category>
		<category><![CDATA[WMF]]></category>
		<category><![CDATA[workstation]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=283</guid>
		<description><![CDATA[I've just downloaded and installed on my Windows 7 workstation Windows Management Framework 3.0 - Beta.
Before this I had Windows Management Framework 3.0 - CTP2 and there were some cool new features already.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just downloaded and installed on my Windows 7 workstation Windows Management Framework 3.0 &#8211; Beta.<br />
Before this I had Windows Management Framework 3.0 &#8211; CTP2 and there were some cool new features already.</p>
<p>If you have installed Windows Management Framework 3.0 Community Technology Preview 1 or Community Technology Preview 2, you must uninstall it before installing Windows Management Framework 3.0 Beta. Also to install Windows PowerShell Integrated Scripting Environment (ISE) for Windows PowerShell 3.0 on computers running Windows Server 2008 R2 with Service Pack 1, before installing WMF 3.0 Beta, use Server Manager to add the optional Windows PowerShell ISE feature to Windows PowerShell</p>
<p>The WMF 3.0 Beta package contains pre-release versions of:<br />
•	Windows PowerShell 3.0<br />
•	Windows Remote Management (WinRM) 3.0<br />
•	Windows Management Instrumentation (WMI)<br />
•	Management OData IIS Extensions<br />
•	Server Manager CIM Provider</p>
<p>I want to mention some interesting new features and changes for me:<br />
- The Updatable Help system (just run Update-Help). I received this message: Failed to update Help for the module(s) &#8216;ActiveDirectory, Pscx, WASP&#8217; : The Update-Help command failed because the specified module does not support updatable help. Use Get-Help -Online or look online for help for the commands in this module</p>
<p>- Windows Management Framework 3.0 Beta includes the following 36 new Fully Qualified Error IDs, and corresponding error messages, to help troubleshoot problems with PowerShell Remoting</p>
<p>- Read/Modify/Write operators no longer use dynamic scoping for the Read operation. Also, compound equality operators (including +=, -=, *=, %=, ++, &#8211;) do not use dynamic scoping.  The variable is always in the current scope:</p>
<pre class="brush: ps">
$x = 1
&#038; { $x += 1; $x }
# Returns 2 in Windows PowerShell 2.0
# Returns 1 in Windows PowerShell 3.0
</pre>
<p>Rewrite to use only the simple assignment operator:</p>
<pre class="brush: ps">
$x = 1
&#038; { $x = $x + 1; $x}
</pre>
<p>- Comparing a number to a string behaves differently</p>
<pre class="brush: ps">
1 -eq "1.1"    
# $true in Windows PowerShell 2.0; $false in Windows PowerShell 3.0
1024 -eq "1kb" 
# $false in Windows PowerShell 2.0; $true in Windows PowerShell 3.0.
</pre>
<p>Do not compare strings to numbers. If you must, cast explicitly.</p>
<pre class="brush: ps">
1 -eq [int]"1.1"
</pre>
<p>- You can access the properties of underlying objects in an array. In Windows PowerShell 2.0, because the array does not have the property, no values are returned</p>
<pre class="brush: ps">
# Access properties of underlying objects
$p = Get-Process
$p.Name
# Windows PowerShell 2.0 returns $null. 
# Windows PowerShell 3.0 returns process names
</pre>
<p>- Improved error detection. Example:</p>
<pre class="brush: ps">
"<${}>"  # expands to: <$>
+ "<${}>"  # expands to: <$>
+     ~
Empty ${} variable reference, there should be a name between the braces.
</pre>
<p>- Windows PowerShell Core Snap-Ins have been converted to Modules<br />
•	Microsoft.PowerShell.Diagnostics<br />
•	Microsoft.PowerShell.Host<br />
•	Microsoft.PowerShell.Management<br />
•	Microsoft.PowerShell.Security<br />
•	Microsoft.PowerShell.Utility<br />
•	Microsoft.WSMan.Management</p>
<p>- Select-Object does not Process the Entire Collection<br />
In Windows PowerShell 3.0, to improve command execution time, especially when working with large collections, the Select-Object cmdlet now returns after it has processed the number of items specified by the First parameter of Select-Object</p>
<p>- Windows Management Framework 3.0 Beta includes a CIM provider that you can use to manage Windows Server 2008 R2 SP1 and Windows Server 2008 SP2 servers from Server Manager in Windows Server “8”. But with WMF 3.0 Beta and Windows Server “8” the Server Manager Roles page fails to display events from the Windows Event Log of the target computer. </p>
<p>- Windows Management Framework 3.0 Beta is not supported on the Server Core installation option of Windows Server 2008 R2 or Windows Server 2008. You can install the WMF 3.0 package, but the product does not work properly. To remove the package, uninstall it. The Uninstallation feature works properly.</p>
<p>End I&#8217;ve found that annoying thing when you place cursor somewhere on console not in the current string and starting typing fixed. Before I should put cursor exactly to the current string <img src='http://proproit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/installation/windows-management-framework-3-0-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Outlook Account Settings</title>
		<link>http://proproit.com/outlook/change-outlook-account-settings/</link>
		<comments>http://proproit.com/outlook/change-outlook-account-settings/#comments</comments>
		<pubDate>Wed, 26 May 2010 12:26:16 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[account management]]></category>
		<category><![CDATA[account settings]]></category>
		<category><![CDATA[corporate users]]></category>
		<category><![CDATA[documents and settings]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[framework v2]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[machine software]]></category>
		<category><![CDATA[mail server name]]></category>
		<category><![CDATA[microsoft net framework]]></category>
		<category><![CDATA[microsoft powershell]]></category>
		<category><![CDATA[Name]]></category>
		<category><![CDATA[necessary files]]></category>
		<category><![CDATA[outlook account]]></category>
		<category><![CDATA[outlook profile]]></category>
		<category><![CDATA[profile files]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[snapin]]></category>
		<category><![CDATA[software microsoft]]></category>
		<category><![CDATA[test path]]></category>
		<category><![CDATA[windir]]></category>
		<category><![CDATA[windows registry editor]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=94</guid>
		<description><![CDATA[One day I have received the task to change mail server name and apply tls encryption for all our corporate users.]]></description>
				<content:encoded><![CDATA[<p>As you may know all Outlook account settings for user are stores in registry and it is hard to change some settings for big amount of users (for my example &#8211; 500).</p>
<p>One day I have received the task to change mail server name and apply tls encryption for all our corporate users. I&#8217;ve found an interesting powershell script for changing user account settings locally. And that&#8217;s what I needed is to copy all necessary files to user&#8217;s PC and make changes in account settings.</p>
<p>First of all you should download this snapin (<a href="http://psoutlookmanager.codeplex.com">http://psoutlookmanager.codeplex.com</a>) and use two dll&#8217;s from it which will allow to add snapin to your script (OutlookAccountManager.dll and OutlookAccountManagerPS.dll)</p>
<p>After that make a OutlookAccountManager.reg file (after adding it to registry snapin will be installed &#8211; the same thing as:</p>
<pre class="brush: ps">set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil
cd

install OutlookAccountManagerPS.dll
</pre>
<p>)</p>
<p>with this content:</p>
<pre class="brush: plain">Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\OutlookAccountManagerSnapIn]
"PowerShellVersion"="2.0"
"Vendor"="Alessandro Pilotti"
"Description"="Provides Outlook account management cmdlets"
"VendorIndirect"="OutlookAccountManagerSnapIn,Alessandro Pilotti"
"DescriptionIndirect"="OutlookAccountManagerSnapIn,Provides Outlook account management cmdlets"
"Version"="1.0.0.0"
"ApplicationBase"="C:\\Documents and Settings\\All Users\\OutlookAccountManager"
"AssemblyName"="OutlookAccountManagerPS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=78530d5fb3fc68b4"
"ModuleName"="C:\\Documents and Settings\\All Users\\OutlookAccountManager\\OutlookAccountManagerPS.dll"
</pre>
<p>After these step it is needed to copy that dlls locally to use it. Follow this code to copy them locally (OutlookAccountManager.ps1):</p>
<pre class="brush: ps">$Sour = "\\domain\netlogon\Outlook.Profile\Files"
$Dest = $env:ALLUSERSPROFILE+"\OutlookAccountManager"
if (!(Test-Path "$Dest\OutlookAccountManagerPS.dll"))
    {
    Copy-Item $Sour -Destination $Dest -Recurse
    }
</pre>
<p>And finally it&#8217;s possible to make the essential script which changes all necessary outlook account settings (Outlook.Profile.ps1):</p>
<pre class="brush: ps">Add-PSSnapin OutlookAccountManagerSnapIn
$profile = Get-MAPIAccount "Outlook" | where-object {!$_.IsExchange}
$profile | foreach `
    {
    if (($_.OutgoingServer = "192.168.100.1") `
    -or ($_.IncomingServer = "192.168.100.1") `
    -or ($_.OutgoingServer = "mail.mail.com") `
    -or ($_.IncomingServer = "mail.mail.com"))
        {
        $_.OutgoingServer = "mail.new.com"
        $_.IncomingServer = "mail.new.com"
        $_.OutgoingSSL = $True;
        $_.OutgoingPort = 465;
        Set-MAPIAccount $_;
        }
    }
Remove-PSSnapin OutlookAccountManagerSnapIn
</pre>
<p>As you can see there are some of ifs. They are needed only for finding that outlook accounts which are related to our corporate network. It&#8217;s not changing that accounts which contain other mail servers.</p>
<p>And finally it is needed to put as startup scripts for whole domain following strings:</p>
<pre class="brush: plain">
powershell.exe -command "\\domain\netlogon\Outlook.Profile\OutlookAccountManager.ps1"
regedit.exe /s "\\domain\netlogon\Outlook.Profile OutlookAccountManager.reg"
</pre>
<p>and logon scripts:</p>
<pre class="brush: plain">
powershell.exe -command "\\domain\netlogon\Outlook.Profile\Outlook.Profile.ps1"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/outlook/change-outlook-account-settings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
