<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEcDRXkyeip7ImA9WhRUFkU.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643</id><updated>2012-01-27T08:34:34.792-08:00</updated><category term="dir /a-h" /><category term=".wps" /><category term="IIS 7 Manager" /><category term="small business start kit" /><category term="install fonts" /><category term="Running 32-bit code on 64-bit machines" /><category term="ASP.NET Forums" /><category term="/system.net/mailSettings/smtp" /><category term="Passive Mode" /><category term="-ItemType" /><category term="Web-Server" /><category term="border" /><category term="Write-Warning" /><category term="System.Windows.Forms.OpenFileDialog" /><category term="Get administrator group members by machine" /><category term="Server.MapPath" /><category term="ASP.NET" /><category term="invalid MS-DOS function for vc_runtime_x86.msi. VC 10.0 Runtime (x86): error = 0x80091007" /><category term="InfrastructureRoleOwner" /><category term="-ge" /><category term="[switch]" /><category term="get-module" /><category term="Powertip" /><category term="Process.Start" /><category term="SnScan" /><category term="profile.ps1" /><category term="ISE" /><category term="Site submission" /><category term="Hosting pipeline" /><category term="pass pipelined collections to Move-Item" /><category term="Measure-Command" /><category term=".NET 2.0" /><category term="CmdletBinding" /><category term="$MyInvocation.MyCommand" /><category term="Luhn Validation" /><category term="Simple Console Program Using LINQ" /><category term=".CounterHelp" /><category term="GetValueNames()" /><category term="Rinjdael encryption with salt." /><category term="sort lastwritetime" /><category term="iis:\sites" /><category term="TQSL" /><category term="\root\cimv2\applications\microsoftIE" /><category term="Cmdlet parameters" /><category term="Jeff Hicks" /><category term="Application_BeginRequest" /><category term="systypes" /><category term="CAS" /><category term="Win32_Product" /><category term="WSF" /><category term="Firefox" /><category term="netmodule" /><category term="Explorer grouping" /><category term="$MyInvocation" /><category term="System.Threading.Timer" /><category term="State: 1" /><category term="50154A" /><category term="-full" /><category term="Internet Explorer" /><category term="has videos" /><category term="Dallas-Fort Worth" /><category term="DatePart" /><category term="EmailOpenViewPro" /><category term="setInfo" /><category term="Enterprise disc imaging" /><category term="control panel applets" /><category term="users_by_groups" /><category term="URL Validation" /><category term="[CmdletBinding()]" /><category term="Error 0x80070569" /><category term="Rename-Item" /><category term="&quot;" /><category term="WriteTo-Output" /><category term="ServerManager" /><category term="ValidateScript" /><category term="IE 8" /><category term=".GetData()" /><category term="SerialNumber" /><category term="WOW64" /><category term="BLL" /><category term="scrollbars=auto" /><category term="formatenginecpp.396" /><category term="Open-Comments" /><category term="Sorting Multiple Properties" /><category term="ISA" /><category term="[Ctrl] + l" /><category term="dot sourcing" /><category term="#" /><category term="cert:" /><category term="Server 2008 R2" /><category term="DAL" /><category term="compile as C" /><category term="text-top" /><category term="StartService" /><category term="FROM" /><category term="ManagementScope" /><category term="Web Test Tools" /><category term="Add All Open Tabs to Favorites" /><category term="cookies" /><category term="Side-by-Side" /><category term="Textpad" /><category term="HKEY_CLASSES_ROOT\.ps1" /><category term="New file" /><category term="DataList" /><category term="Nagios operating systems" /><category term="-PSPath" /><category term="WSH" /><category term="Clip" /><category term="{Expression}" /><category term="System.Reflection.Assembly.LoadFrom" /><category term="$hashtable.keys" /><category term="Win32_LogicalDisk" /><category term="WScript" /><category term="setchannelpass" /><category term="IE 9" /><category term="System.Drawing.Bitmap" /><category term="Prevent form from resizing" /><category term="consectetuer adipiscing elit. Maecenas porttitor congue massa" /><category term="leaf" /><category term=".cer file formats" /><category term="-Minimum" /><category term="Mark Russinovich" /><category term="[ADSI&quot;WinNT://$env:COMPUTERNAME&quot;" /><category term="sp_depends" /><category term="ASP.NET 2.0" /><category term="INFORMATION_SCHEMAS" /><category term="Team Foundation Explorer" /><category term="Get-Random" /><category term="Visual Studio Magazine" /><category term="ContainsKey" /><category term="SQL connection" /><category term="Classic FTP" /><category term="int nCmdShow)" /><category term="Application.Unlock" /><category term="Windows Server 2008" /><category term="find credit card number" /><category term="Oleg Starodumov" /><category term="Ascending" /><category term="%" /><category term="SQL Server 2005 Express" /><category term="Domain account test" /><category term="Infragistics" /><category term="Virtual addressing" /><category term="compare array to itself" /><category term="%_" /><category term="-com" /><category term="[wmi]" /><category term="Temporary Internet Files" /><category term="script blocks" /><category term=".docm" /><category term="reg" /><category term="function" /><category term="CS1519" /><category term="Comparing data" /><category term="2009 Summary" /><category term="Modules" /><category term="Get-WanIP" /><category term="Powershell Users Group" /><category term="OLECOM Object Explorer" /><category term="gpo" /><category term="x64" /><category term="unused desktop icons disappeared" /><category term="rundll32" /><category term="{688EEEE5-6A7E-422F-B2E1-6AF00DC944A6}" /><category term="sent mail" /><category term="Invoke-command" /><category term="IIS 7.5" /><category term="Error handling" /><category term="Alt + A" /><category term=".DeviceID" /><category term="Monitor file" /><category term="-InputObject" /><category term="Page_Init" /><category term="Page.SetFocus" /><category term="WinRM" /><category term="Send-Email" /><category term="On Error Resume Next" /><category term="user profiles" /><category term="filter" /><category term="Start-Sleep" /><category term="DomainMode" /><category term="Programming Windows Phone 7" /><category term="[ADSI]&quot;WinNT://./Administrators&quot;" /><category term="padding-right" /><category term="Copy -Destination" /><category term="WinNT" /><category term="SelectionChanged" /><category term="at.exe" /><category term=".dotx" /><category term="Response.Write(System.DateTime.Today.Year.ToString())" /><category term="$([char]34)" /><category term="HttpContext.Current.Request.Url.Authority.ToString().Contains" /><category term="Get-WmiObject win32_service" /><category term="% (foreach)" /><category term="Save PSCredential to file" /><category term="/EXPORTS" /><category term="Out-Fille" /><category term="Get_Variable_Type" /><category term="Out-Null" /><category term="Configuration Manager" /><category term="Win32_AccountSID" /><category term="DataBinding" /><category term="shell.application" /><category term="TCP/IP" /><category term="Disallow:" /><category term="sc qc" /><category term="nStatisticalDiskIdentification" /><category term="e.AffectedRows" /><category term="[System.IO.Path]::GetFileNameWithoutExtension" /><category term="ExpandProperty" /><category term="select fullname" /><category term="MyDefrag" /><category term="GAC" /><category term="Northwind" /><category term="Structural Patterns" /><category term="CovertTo-Base64" /><category term="casting" /><category term=".Properties" /><category term="LDAP://cn" /><category term="Design Patterns" /><category term="ZIP compression" /><category term="Now" /><category term="Export to Excel" /><category term="Pro ASP.NET MVC Framework" /><category term="SDLC" /><category term="TSLQ" /><category term="Add Call" /><category term="nativecommandparameterbinder" /><category term="Express Edition" /><category term="[System.DirectoryServices.ActiveDirectory.Domain]" /><category term="font" /><category term=".GetEnumerator()" /><category term="sp_help" /><category term="[ValidateRange]" /><category term=".Count" /><category term="administrative share" /><category term="dir /a-d" /><category term="Microsoft.XMLDOM" /><category term="ANSI_NULLS" /><category term="Update" /><category term="rel" /><category term=".Value" /><category term="$erroractionpreference" /><category term="active cluster node" /><category term="$_.Name" /><category term="http_request" /><category term="SNMP" /><category term=".psm1" /><category term="-WebSiteName" /><category term="Registry icon" /><category term="Win32_DiskPartition" /><category term="tsql" /><category term="[System.Convert]::FromBase64String" /><category term="books" /><category term="fonts" /><category term="Get-AuthenticodeSignature" /><category term="for each" /><category term="DataTable" /><category term="Windows" /><category term=".NOTES" /><category term="IIS 5.1" /><category term="RTT" /><category term="Display-DateTimeFormats" /><category term="PoSH Server" /><category term="-wrap" /><category term="Visual Studio 2008" /><category term="Splatting" /><category term="Adding Typed DataSets" /><category term="-ShellID" /><category term="displayname" /><category term="echo.%H" /><category term="0x80005000" /><category term="ObjectQuery" /><category term="Microsoft.Powershell_profile.ps1" /><category term="Working Folders" /><category term="WinRS" /><category term=".length" /><category term="Exports" /><category term="mcanerin.com" /><category term="DataContext" /><category term="&quot;$($dir.name).zip&quot;" /><category term="Get-WebConfigurationLock" /><category term="VMWare" /><category term="[Environment]::UserName" /><category term="sc query" /><category term="0x80070569: Logon failure: the user has not been granted the requested logon type at this computer." /><category term=".txt" /><category term="FilterExpression" /><category term="back up databases" /><category term="get-help" /><category term="Err.Number" /><category term="Microsoft Outlook 2007" /><category term="Ctrl + Break" /><category term="Matt Pietrek" /><category term="Net-SNMP" /><category term="Test-WsMan" /><category term="System.Net.WebClient" /><category term="Charles Petzold" /><category term="iiswebserversetting" /><category term="AppDomain" /><category term="Windows internals" /><category term="http://undocumented.ntinternals.net" /><category term="or string expected after verbatim specifier:" /><category term="moon phase" /><category term="Polymorphism" /><category term="-Option" /><category term="Remove-WindowsFeature" /><category term="[Double]" /><category term="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator" /><category term="NorthwindTableAdapters.ProductsTableAdapter" /><category term="Unix" /><category term="SFTPCOMInterface.CIServer" /><category term="Bruce Payette" /><category term="-AutoSize" /><category term="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /><category term="reboot" /><category term="-ChildPath" /><category term="Clear-Variable" /><category term="InsertOnSubmit" /><category term="mixed mode" /><category term="FormBorderStyle" /><category term="icacls" /><category term="Compiler Errors" /><category term="WSManFault" /><category term="context menu" /><category term="[ValidateScript({Test-Path $_})]" /><category term="Run scripts from icon" /><category term="XMLQuire" /><category term="5}&quot; Powershell" /><category term="[System.Text.Encoding]::ASCII.GetBytes" /><category term="sysexporter" /><category term="file versions" /><category term="$_.Antecedent.ToString().Split(&quot;=&quot;)[2].Replace(&quot;`&quot;&quot;" /><category term="cert:\CurrentUser\TrustedPublisher" /><category term="v 2.0" /><category term="www.winssential.net" /><category term="Test-ManagedAssemblyStatus" /><category term="Enterprise Solution Patterns Using Microsoft .NET" /><category term="1tb" /><category term="gpoguy" /><category term="-uri" /><category term="Close-Comments" /><category term="%errorlevel%" /><category term="Path/File access error (Error 75)" /><category term="MachineToApplicaton" /><category term="$host" /><category term=".FullName" /><category term="-Count" /><category term="$process.GetOwner" /><category term="Microsoft Connect" /><category term="Static thresholds" /><category term="Powershell TFM v1 eBook" /><category term=".designer" /><category term="PSIsContainer" /><category term="Powertips" /><category term="RegWrite" /><category term="GetNamespace(&quot;MAPI&quot;)" /><category term="e.Exception" /><category term="COM" /><category term="Marco Bellinaso" /><category term="av-comparatives.org" /><category term="makecert" /><category term="[DllImport(&quot;user32.dll&quot;)]" /><category term="vertical-align" /><category term="Google" /><category term="format operator" /><category term="[Environment]::GetFolderPath(&quot;System&quot;)" /><category term="BoundField" /><category term=".NET 3.5 exception handling" /><category term="#endregion" /><category term=".adm" /><category term="Taskkill" /><category term="userFlags" /><category term="SNMP Community" /><category term="path tricks" /><category term="$_.fullname.split(&quot;\&quot;)[-1]" /><category term="SFTPServer.Sites" /><category term="Microsoft.IIS.Powershell.Provider" /><category term="procmon" /><category term="Scripting Guys" /><category term="YYYYMMDD" /><category term="cacls" /><category term="'GetProperty'" /><category term="ISAPI filters" /><category term="App Verifier" /><category term="MD" /><category term="select addresslist" /><category term="Nagware" /><category term="Get-WmiObject" /><category term="#requires" /><category term="DNS" /><category term="jmp" /><category term="System.Management.Automation.Host" /><category term="[System.Diagnostics.Process" /><category term="[System.Datetime]::Now.ToString('D')" /><category term="-Prop" /><category term="Could not open a connection to SQL Server [2]" /><category term=".EXAMPLE" /><category term="%systemroot%\system32\dns" /><category term="functions" /><category term="HRESULT" /><category term="server switch" /><category term="certificate analysis" /><category term="Adding ISAPI Filters to the Site Level" /><category term="$null" /><category term="get-childItems" /><category term="-like" /><category term="Add Local User" /><category term="\\root" /><category term="$_.Caption" /><category term="Error: 15209" /><category term="System.IO.StreamReader" /><category term="MD5" /><category term="Read Gmail" /><category term="Indexing Service" /><category term=".rsrc" /><category term="Edit site" /><category term="steganography" /><category term="ImpersonationLevel" /><category term="TargetInstance.LogFile" /><category term="Powershell (v2)" /><category term="security" /><category term="object" /><category term="enable sa sql server" /><category term="windows mode" /><category term="MVP" /><category term="CodeSnippet" /><category term="hidden share" /><category term=".ico" /><category term="mssoftwareconsulting.com" /><category term="Collection" /><category term="Event Logs" /><category term="DNS file location" /><category term="Host.UI.RawUI" /><category term="Sign script" /><category term="MinGW" /><category term=".docx" /><category term="-Definition" /><category term="$_.lastwritetime.toshortdatestring()" /><category term="ForeColor" /><category term="-psHost" /><category term="Start-process" /><category term="KB928439" /><category term="rename stored procedure" /><category term="object properties" /><category term="Process" /><category term="Set-AuthenticodeSignature" /><category term="New-Object : Cannot find type [Watin.Core]: make sure the assembly containing this type is loaded." /><category term="new string[] {&quot;Repository&quot;}" /><category term="net user time" /><category term="Trusted_Connection" /><category term="sqlcmd" /><category term="-ExpandProperty Get-Acl" /><category term="Event log message truncated" /><category term=".Values" /><category term="Win32_QuickFixEngineering" /><category term="ADODB.Recordset" /><category term=".NET 2.0 SDK" /><category term="-Last" /><category term="debugging" /><category term="Win32_Battery" /><category term="System.DirectoryServices.DirectorySearcher" /><category term="SQL Server" /><category term="-passThru" /><category term="ntdebugging" /><category term="User Group Exists" /><category term="$profile.AllUsersCurrentHost" /><category term="0x80131904" /><category term="get domain computers" /><category term="Scheduled job" /><category term="multi-file assembly" /><category term="ASP.NET MVC" /><category term="Set-Alias" /><category term="must have the terminator: &quot; at the beginning of the line" /><category term="for" /><category term="Group" /><category term="It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level" /><category term="-day" /><category term="32-bit" /><category term="-notlike" /><category term="ConvertTo-SecureString" /><category term="Regex.Matches" /><category term="Visual Basic" /><category term="invalid password" /><category term="Show-UserFlagsEnum" /><category term="Chris Dent" /><category term="Microsoft.VisualBasic" /><category term="GetProperty" /><category term="XmlException" /><category term="Start_Type" /><category term="Object Intializers" /><category term=".Navigate" /><category term="copy audio stream" /><category term="C/C++" /><category term="Chr" /><category term="Scott Hanselman" /><category term="-FileVersion" /><category term="service controller" /><category term="NotePropety" /><category term="userAccountControl" /><category term="Behavioral Patterns" /><category term="IIS\sites" /><category term="GetFormattedDate" /><category term="Nagios" /><category term="ghost" /><category term="1px solid black" /><category term="appcmd" /><category term="Source Code" /><category term="Ed Wilson" /><category term="DataSource.Select" /><category term="DataRow" /><category term="ADO.NET" /><category term="$_ -replace" /><category term="$_.Length" /><category term="Compare-Object" /><category term="DirectorySearcher" /><category term="hello world" /><category term="infinite loop" /><category term="Microsoft.Powershell" /><category term="BACKUP fails" /><category term=".CounterName" /><category term="gwmi" /><category term="get-member" /><category term="[ADSI]:Exists" /><category term="HttpContext.Current.Response.Write" /><category term="Windows.Open" /><category term="HKEY_CLASSES_ROOT\Directory\Shell .reg" /><category term="-ErrorAction 0" /><category term="installed programs" /><category term="-IPAddress" /><category term="VBScript" /><category term="gci" /><category term="NOT NULL" /><category term="Fedora" /><category term="{$_.PSIsContainer -eq $True}" /><category term="Start-Transcript" /><category term="StateChanged" /><category term="round trip times" /><category term="sender" /><category term="[Environment]" /><category term="ConvertFrom-StringToURLEncoding" /><category term="conversion" /><category term="Utility.WriteTo-Output" /><category term="TimeSpan" /><category term="Files" /><category term="HorizontalAlign.Center" /><category term="urlmon.dll" /><category term=".SearchRoot" /><category term="$group.psbase.Invoke(&quot;Members&quot;)" /><category term="[System.IO.Directory]" /><category term="text/css" /><category term="P/Invoke" /><category term="loweralpha-numberic" /><category term="$_.LastWriteTime" /><category term="-parameter" /><category term="-Computer" /><category term="IMAutoArchivingPolicy" /><category term="App_Code" /><category term="Deleted :Zone.Identifier:$DATA" /><category term="GetValue()" /><category term="Profile" /><category term="ISBN" /><category term="-replace" /><category term="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\NullSessionShares" /><category term="Mandatory=$true" /><category term=".NET XML" /><category term="vbCrLf" /><category term="variables" /><category term="blockquote" /><category term="TABLE" /><category term="CSS" /><category term="scripting framework" /><category term="in" /><category term="GridView" /><category term="Items.FindByValue" /><category term="Win32_ComputerSystem" /><category term="create new user" /><category term="SQLPSX" /><category term="Where-Object" /><category term="Computer Configuration" /><category term="Disk Defrag Portable" /><category term="IIS:\AppPools" /><category term="Import-Module BestPractices" /><category term="vbNullChar" /><category term="Array" /><category term="MSDN blogs" /><category term="Mouse Cursor" /><category term=".SetText" /><category term="IP Address" /><category term="IIS 6" /><category term=";" /><category term="CompMgmtLauncher" /><category term="Array remove duplicates" /><category term="Powersehell" /><category term="Load" /><category term="ADS_USER_FLAG_ENUM" /><category term="SHA1Managed" /><category term="IIS Manager" /><category term="syscolumns.length" /><category term="return" /><category term="IIS 7" /><category term="Microsoft" /><category term="set q=mx" /><category term="Error Codes" /><category term="dir /ad/s/b" /><category term="$zipPackage.Items()" /><category term="ConvertFrom-SecureString" /><category term="batch file arguments" /><category term="Array return unique" /><category term=".doc" /><category term="Unknown Path" /><category term="Windows Security" /><category term="Computer Management" /><category term="$MFT" /><category term=".UI.RawUI.CursorSize" /><category term="New-Item" /><category term="Resources" /><category term="DataSet" /><category term="SDL" /><category term="Win32_LogicalDiskToPartition" /><category term="Subject" /><category term="regscrubvistaxp" /><category term="Win32Functions" /><category term="Content Menu Platinum" /><category term="Leakdiag" /><category term="Get-ItemProperty" /><category term="Read-Only" /><category term="shell.application.Namespace(0x21).Self.Path" /><category term="XmlException: The data at the root level is invalid." /><category term="blacklight" /><category term="$env" /><category term="-LogName Application" /><category term="Select-Object" /><category term="UTF8.GetBytes" /><category term="aspnetdb" /><category term="System.Drawing" /><category term="System Event log" /><category term="Forest" /><category term="Intrinsic Event Queries" /><category term="PopUpPosition" /><category term="scope options" /><category term=".Kill()" /><category term="-RedirectStandardOutput" /><category term="Import-Csv" /><category term="-ComputerName" /><category term="Guid formatting options" /><category term="$_" /><category term="Linq" /><category term="Error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error" /><category term="ADSPath" /><category term="xps" /><category term=".pdf" /><category term="Merge Calls" /><category term="[char]34" /><category term="Trace-Command" /><category term="GetCurrentDomain" /><category term="2008 SQL Server" /><category term="Security Compliance Manager" /><category term="Stop-Process" /><category term="Installation Error" /><category term="http://automation.whatismyip.com/n09230945.asp" /><category term="-type file" /><category term="Directory" /><category term="Type" /><category term="for loop" /><category term="Programmatic" /><category term="C" /><category term="order by" /><category term="VIA" /><category term="HKLM:\Software\Classes" /><category term="Start-Watin" /><category term="2005 Adventure Works" /><category term=".cpl" /><category term="\\root\cimv2" /><category term="WMI Event Queries" /><category term="2008 Server" /><category term=".Trim" /><category term="Invoke-BpaModel" /><category term="\\root\microsoftiisv2" /><category term="SqlDataSource_Selected" /><category term="2010 stats" /><category term="href" /><category term="Get-BpaResult" /><category term="Win32/Rustock" /><category term="-le" /><category term="osql" /><category term="margin-left" /><category term="Add-WindowsFeature" /><category term="Status" /><category term="AutoGenerateColumns" /><category term="ConfigurationManager" /><category term="Named arguments" /><category term="Application and Service Logs" /><category term="syscolumns" /><category term="[System.IO.Directory]::Exists" /><category term="C:\Windows\System32\fm20.dll" /><category term="select" /><category term="Manage Workspaces" /><category term="file age" /><category term="[System.Net.Dns]::GetHostByAddress($HostIPAddress)" /><category term="robots.txt" /><category term="IEnumerable" /><category term="WMIC classes" /><category term="&quot;&quot;)" /><category term="push ebp" /><category term="chr(6)" /><category term="Best Practices" /><category term="Win32_Account" /><category term="Net.Sockets.TcpClient" /><category term="stdio.h" /><category term="API hooking" /><category term=".GetType().Name" /><category term=".xml" /><category term="GridView_SelectedIndexChanged" /><category term="expression={}" /><category term="WebAdministration" /><category term="Bypass Windows search 4" /><category term="align ID to center of page" /><category term="Alain Lissoir" /><category term="MCTS Windows Internals" /><category term="creatfil" /><category term="(Get-Date).ToString(&quot;d&quot;" /><category term="/TC" /><category term=".SetInfo" /><category term="GLEE (Graph Layout Execution Engine)" /><category term="increment" /><category term="John Robbins" /><category term="Analytics" /><category term="export credentials" /><category term="Powershell v2" /><category term="sort-object -Property" /><category term="modify dependencies" /><category term="C:\Program Files\Common Files\microsoft shared\DevServer\10.0" /><category term="MSForms.DataObject" /><category term="AJAX" /><category term="Keith Brown" /><category term="Service Unavailable" /><category term="Windows Powershell Unleased 2nd Edition" /><category term="Wintellect" /><category term="InsertParameters" /><category term="Remove-Item" /><category term="managedRuntimeVersion v4.0" /><category term="New-PSDrive" /><category term="gacutil -I" /><category term="HTTP Headers" /><category term="switch" /><category term="Add custom menu entries" /><category term="problem solving" /><category term="%userprofile%\AppData\Roaming\Microsoft\Windows\Cookies" /><category term="Event ID" /><category term=".Provider" /><category term="SmtpHost" /><category term="else" /><category term="list computers" /><category term="owasp" /><category term="IIS: Provider error" /><category term="advfirewall" /><category term="-First" /><category term="return (Get-Date).ToString(&quot;yyyyMMdd hh:mm:ss&quot;)" /><category term="count" /><category term="ToSTring().Substring()" /><category term="[Reflection.Assembly]::LoadFrom" /><category term="Desktop folder path" /><category term="EmptyDataText" /><category term="IsAccountLocked" /><category term="Severity: 16" /><category term="System.Object" /><category term="trade mark" /><category term="0xc0000005" /><category term="Administrative Templates" /><category term="net share" /><category term="$path" /><category term="Environment.MachineNAme" /><category term="random" /><category term="return(0)" /><category term="FIPS" /><category term="YouTube" /><category term="'*' * 50" /><category term="ReadOnly" /><category term="-expand" /><category term="null" /><category term="C:\windows\system32\windowspowershell\v1.0" /><category term="-EnableAllPrivileges" /><category term="Outlook.Application" /><category term="sendkeys" /><category term="antivirus" /><category term="RegExp" /><category term="Dino Esposito" /><category term="pen testing" /><category term="teagent" /><category term="ToString(&quot;yyyy.MM.dd hh:mm:ss)" /><category term="Custom DateTime Formats" /><category term="Disk Defrag" /><category term="format MM in date" /><category term="Start-Job" /><category term="%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe" /><category term="VBA macros" /><category term="pluralsight" /><category term="[System.Text.Encoding]::UTF8.GetString" /><category term="-FilePath" /><category term="Inetcpl.cpl" /><category term="Machine" /><category term="MailMessage" /><category term="ArrayList" /><category term="acronis" /><category term="Windows Performance counters" /><category term="System.Drawing.Image.FromFile" /><category term="en dash (150/0x96)" /><category term="$_.GetType().InvokeMember(&quot;Name&quot;" /><category term="Windows XP SP3" /><category term="tm" /><category term="Get-Console" /><category term="FilesMatch" /><category term="function Write-DateTime" /><category term="Yusef Ozturk" /><category term="112" /><category term="-ExcludeProperty" /><category term="SenderName" /><category term="CTP 2" /><category term=".CategoryName" /><category term="Page.PreviousPage.FindControl" /><category term="Win32_Process" /><category term="acls" /><category term="Win32_share" /><category term="rsc://" /><category term="Get-WindowsFeature" /><category term="spam" /><category term="netstat -an" /><category term="SysWOW64" /><category term="$($cmdlet.name).txt" /><category term="Export-ModuleMember" /><category term="Context Menus" /><category term="-Module" /><category term="work" /><category term="backtick" /><category term="www.powershelljobs.com" /><category term="Performance Monitors" /><category term="UseShellExecute" /><category term="TemplateFields" /><category term="CTP 1" /><category term="netsh" /><category term="Steven Sanderson" /><category term="dir" /><category term="Windows explorer" /><category term="debuginfo.com" /><category term="[System.IO.File]::GetTempFileName" /><category term="$profile" /><category term="validate xml" /><category term="bind Xml to DropDownList" /><category term=".unload" /><category term="New-Object" /><category term="Session" /><category term="Sysprep" /><category term="Favorites" /><category term="New-WebApplication" /><category term=".AddMonths" /><category term="New-WebAppPool" /><category term="DataValueField" /><category term="-gt" /><category term="wshshell.popup" /><category term="Get-Verb" /><category term="Assembly" /><category term="Get dll Versions" /><category term="iPhone" /><category term="dsquery" /><category term="TrueCrypt" /><category term="Outlook 2007" /><category term="convert Hex to RGB" /><category term=".MainWindowHandle" /><category term=".Flush()" /><category term="#include" /><category term="distinct" /><category term="Rustock threat" /><category term="Set_Item" /><category term="DateTime.Today.Year" /><category term="label" /><category term="Windows special folders" /><category term="rebuilddatabase" /><category term="Memory Scanning Under Windows NT" /><category term="xp_fixeddrives" /><category term="registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ps1" /><category term="Application Architecture Guide" /><category term="File/Folder attributes" /><category term="Get-Item" /><category term="$shellApplication.NameSpace()" /><category term="StartInfo" /><category term=".Remove()" /><category term="FileSystemObject" /><category term="this.DropDownList1.Items.Insert(0" /><category term="SelectedIndexChanged" /><category term="-Name" /><category term="N" /><category term="LoadXml" /><category term="5.6" /><category term="Window.Open" /><category term="AusLogic" /><category term="SqlDataSource" /><category term="-Path" /><category term="National language character set" /><category term="AutomaticManagedPagefile" /><category term="firewall" /><category term="End If" /><category term="hyphen (45/0x2D)" /><category term="RowStyle" /><category term="powershell_ise" /><category term="if" /><category term="-ArgumentList" /><category term="identifier" /><category term="RDP" /><category term="Disassembly" /><category term="SQL Server Powershell Extensions" /><category term="[Swtich]" /><category term="Compiler Error Message: BC30037: Character is not valid" /><category term="PortQry" /><category term="Pop-Location" /><category term="HelpMessage" /><category term=".NET 3.5 to 2.0" /><category term="web services" /><category term="PSDrive" /><category term="Response.Write" /><category term="-not" /><category term="-ExecutionPolicy Bypass" /><category term="Dll files" /><category term="HKCR" /><category term=".GetDistinctItems" /><category term="parameter attribute" /><category term="div" /><category term="GridLines" /><category term="Linux" /><category term="System Center Essentials 2010" /><category term="try/catch/finally" /><category term="Alt + T" /><category term="Peter Szor" /><category term="[System.IO.File]::GetTempFile" /><category term="Folder-Report" /><category term="System.Data.SqlClient.SqlConnection" /><category term="[System.IO.File]::ReadLines" /><category term="security cheatsheet" /><category term="SMTP testing utility" /><category term="Event Firing Order" /><category term="-verb" /><category term="Channel 9" /><category term="Scriptomatic" /><category term="bind DataTable to DropDownList" /><category term="GetEnumerator" /><category term="Indenting" /><category term="Write-Zip" /><category term="tesvc" /><category term=".odt" /><category term="Experts Exchange" /><category term="XDocument" /><category term="ContentPlaceHolder" /><category term="Get-Content" /><category term="&quot;tokens=2 delims==" /><category term=".dmp files" /><category term="[System.IO.File]" /><category term="MD5CryptoServiceProvider" /><category term="$file.FullName" /><category term="Analyze Best Practices" /><category term="POP" /><category term="Telnet" /><category term="Ajax Control Toolkit" /><category term="Set-WebConfigurationProperty" /><category term="Register-ObjectEvent" /><category term="Accelerators" /><category term="RSS" /><category term="CausesValidation" /><category term=".COMPONENT" /><category term="System.DirectoryServices.DirectoryEntry" /><category term="HoverMenuExtender" /><category term="software engineering" /><category term="__InstanceCreationEvent" /><category term="*.log" /><category term="-ApplicationPool" /><category term="Scheduled tasks" /><category term="P/Invoke Interop Assistant" /><category term=".Next()" /><category term="Open For Append" /><category term="$dataset.tables[0].rows.count" /><category term="-format" /><category term="web.config" /><category term="file compression ratios" /><category term="-PSSnapIn" /><category term="tetool.cmd" /><category term="set password to never expire" /><category term="Win32_BIOS" /><category term="Constants" /><category term="IIS.AppPoolExists" /><category term="remote command invocation" /><category term="-ExecutionPolicy" /><category term="reset database defaults" /><category term="Gmail" /><category term="$args" /><category term="Set-ExecutionPolicy" /><category term="cmd /c" /><category term="Enterprise Scripting" /><category term="Beyond Compare 3" /><category term="has calendar event" /><category term="HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" /><category term="-Expression" /><category term="find domain user account names by OU" /><category term="QueryStringParameter" /><category term="1pb" /><category term="HeaderStyle" /><category term=".Filter" /><category term="PafterStyle" /><category term="securitytube.net" /><category term="Get-Hotfix" /><category term="PSBase" /><category term="out-of-process" /><category term="LIKE" /><category term="Win32_" /><category term="Delete Volume" /><category term="padding-bottom" /><category term="TinyUrl" /><category term="ls" /><category term="SubmitChanges" /><category term="DHCP" /><category term="ccleaner" /><category term="-Encoding ASCII" /><category term="Getting Started with Databases and Transact-SQL in Microsoft® SQL Server™ 2005" /><category term="about_functions_Advanced_parameters" /><category term="Params" /><category term="Page_Load" /><category term="ParameterBinding" /><category term="Visual Studio 2010" /><category term="Business Logic Layer" /><category term="C++" /><category term="-force" /><category term="NTCore" /><category term="PropertiesToLoad.Add" /><category term="Herb Schildt" /><category term="LastWriteTime" /><category term="ntsecurity" /><category term="remove ADS from modules" /><category term="IIS.Create-AppPool" /><category term="this.Master.Controls.FindControl" /><category term="debugging tools" /><category term="nPollData" /><category term="ConnectionString" /><category term="COLUMN_NAME" /><category term="xsd.exe" /><category term="Generate Script" /><category term=".Split(&quot;" /><category term="System.Random" /><category term="2..1000" /><category term=".Split(&quot;`n&quot;)" /><category term="GridViewRow" /><category term="ConvertTo-Base64" /><category term="Get-Website" /><category term="Software SAS Windows 7" /><category term="NoteProperty" /><category term="Making Your Keyboard Sound Like Typewriter" /><category term="sos.dll" /><category term="break" /><category term="GO" /><category term="Add-Type" /><category term="SQLOLEDB" /><category term="State object" /><category term="get all users in domain" /><category term="vbTab" /><category term="Open-Analysis" /><category term="cmd commands" /><category term=".xps" /><category term="-lt" /><category term="ATX power supply tester" /><category term="TimerCallback" /><category term="HttpContext.Current.Request.Url" /><category term="https bindings" /><category term="1002" /><category term="Send-mail" /><category term="[System.Net.Dns]::GetHostByName($_)" /><category term="-codesigning" /><category term="Windows IT Pro" /><category term="CFF Explorer II" /><category term="WinHex" /><category term="RowIndex" /><category term="search-engine" /><category term="2008 Adventure Works failed attach" /><category term="Wildcards" /><category term=".Parameters" /><category term="get-childitem" /><category term="Win32_ScheduledJob" /><category term="gc $tempfile" /><category term="expand" /><category term="Reg_Dword" /><category term="Papercut" /><category term="convert datetime and string values" /><category term="How Web Browsers Work" /><category term="Event 1009" /><category term="Group-Object" /><category term="DataBind" /><category term="dir .\*.tif | Remove-Item" /><category term="System32" /><category term="Interview Questions" /><category term="-Maximum" /><category term="history disabled" /><category term="DataSet distinct values in column" /><category term="IESettings" /><category term="ADD" /><category term="Period" /><category term="Identity" /><category term="The name ‘ErrorMessageLabel’ does not exist in the current context" /><category term="GCC" /><category term="xmlfoasp.net" /><category term="special characters" /><category term="70-660" /><category term="for /f" /><category term="DirectoryServices" /><category term="[Covert]::ToInt32()" /><category term="WMI" /><category term="management scope" /><category term="`" /><category term="DropDownList.Bind" /><category term="validate feeds" /><category term="internal functions" /><category term="Freecoder" /><category term="[DateTime]::ParseExact" /><category term="Select -Unique" /><category term="Daniel Pistelli" /><category term="Invoke-Item" /><category term="-Begin" /><category term="MDCryptoServiceProvider" /><category term="security log codes" /><category term="HResult 0x2" /><category term="service mark" /><category term="http-equiv" /><category term="User-agent: *" /><category term="seed" /><category term="easter eggs" /><category term="BIOS" /><category term="Hide-Powershell" /><category term="website valuation" /><category term="Time-Stamp" /><category term="sorting hashtables" /><category term="Receive-Job" /><category term="DueTime" /><category term=".CommandText" /><category term="padding-left" /><category term="Scroogle" /><category term="Trusted Publishers" /><category term="New-TimeSpan" /><category term="Rootkitrevealer" /><category term="Export-Clixml" /><category term="Select-String" /><category term=".RETURNVALUE" /><category term=".load" /><category term="InternetExplorer.Application" /><category term="renaming tools" /><category term="Unregister-Event" /><category term="Literal Strings" /><category term="Web Browser technology" /><category term="[DateTime]" /><category term="Folders" /><category term="VBA" /><category term="documentElement.selectNodes" /><category term="Unicode" /><category term="DateTime" /><category term="Error number: -2147023143 0x800706D9" /><category term="-MemberDefinition" /><category term="Expression" /><category term="task scheduler api" /><category term="Reference" /><category term="Compare two arrays" /><category term="SentOn" /><category term="-Namespace" /><category term="[System.Security.Cryptography.PaddingMode]::ISO10126" /><category term="-eq" /><category term="SFTPSite.IsStarted" /><category term="Intel" /><category term="New-XsdFromXml" /><category term="Namespaces" /><category term="Uninstall Powershell Version 1" /><category term="-Class" /><category term="masterpage.master" /><category term="Write-Output" /><category term="Technet Script Repository" /><category term="$_LastWriteTime" /><category term="Encrypt-string.Rinjdael" /><category term="compare arrays" /><category term="Forensics" /><category term="ObjectDataSource" /><category term="Window Server 2003 Resource Toolkit" /><category term="Microsoft Forms 2.0 Object Library" /><category term="DisableCacheViewer" /><category term="Search XML" /><category term="Microsoft SQL Native Client: Login timeout expired" /><category term="hh-mm-ss" /><category term="custom data type" /><category term="Op Codes" /><category term="enable history" /><category term="csc" /><category term="GetDate" /><category term="&quot;-&quot;*80" /><category term="IEnumerator" /><category term="Where AssocClass" /><category term="Enable FILESTREAM" /><category term="SOS 2.0" /><category term="-whatif" /><category term="web server" /><category term="RBL" /><category term="Explorer Suite" /><category term="system error codes" /><category term="-exclude" /><category term="root\cimv32" /><category term="Run Programs Elevated" /><category term="ScriptCop" /><category term="Create WMIC Class html files" /><category term="Add Volume" /><category term="Controls.Add" /><category term="Mjolinor" /><category term="[Environment]::SetEnvironmentalVariable()" /><category term="-as" /><category term="default web login." /><category term="Analyzing emails" /><category term="Compile as C Code (/TC)" /><category term="hexidecimal" /><category term="HTTP POST" /><category term="-f" /><category term="meta" /><category term="List-UserGroupMembers" /><category term="strongly typed variables" /><category term="free image hosting" /><category term="=lorem()" /><category term=".loadby" /><category term="System.diagnostics.PerformanceCounter" /><category term=".MoveNext" /><category term="Utilities" /><category term=".wav" /><category term="chr(5)" /><category term="Set-Content" /><category term="Virtual Clone Drive" /><category term="bulk rename" /><category term="ASP.NET User Education" /><category term="Martin Zugec" /><category term="UnZipMe" /><category term=".dll" /><category term="MSSE 2005" /><category term=".ProxyServer" /><category term="control loops" /><category term="GridView.EmptyDataText" /><category term="MasterPage" /><category term="break; $Error" /><category term="website worth" /><category term="zero-fill" /><category term="Bil Lewis" /><category term="-s" /><category term="encryption" /><category term="Dmitry Vostokov" /><category term="multiple parameters" /><category term="[]" /><category term="[Array]" /><category term="Get-WebConfigurationProperty" /><category term=".isClass" /><category term="Shrink Disk" /><category term="AppPool error" /><category term="List" /><category term="Windows 2008 R2" /><category term="schtasks.exe" /><category term="sysobjects.xtype='U'" /><category term="adding items to toolbox" /><category term="Extend Volume" /><category term="PSIISPlugin" /><category term="Check for SQL Server 2008 on local machine" /><category term="viewlist" /><category term="has photos" /><category term="HTML Control" /><category term="Blogger images" /><category term="ProcessStartInfo" /><category term="sp_rename" /><category term="-id" /><category term="1..1024" /><category term="creating custom accounts to run ASP.NET" /><category term="Declarative" /><category term="Windows Debugging - Practical Foundations" /><category term="About_*" /><category term="parameters" /><category term="Logo Program" /><category term="dir /od" /><category term="TS_UnusedDesktopIcons" /><category term="System.Drawing.Point" /><category term="Windows Search" /><category term="Show-Powershell" /><category term="Date Modified" /><category term="rainbow crack" /><category term="LDAP" /><category term="style" /><category term="Cassini" /><category term="-End" /><category term="public static extern boolean MessageBeep" /><category term="fsutil" /><category term="paragon drive image" /><category term="WmiObject.Change()" /><category term="DataSource.Select(DataSourceSelectArguments.Empty)" /><category term="*.ps1" /><category term="TargetInstance.Message" /><category term="With/End" /><category term=".ROLE" /><category term="-runAs32" /><category term="WinZip 15.5" /><category term=".\*.tif" /><category term="LINQ to XML" /><category term="TSQL operator precedence level" /><category term="resizeable=yes" /><category term="Windows Event Viewer" /><category term="If/Else" /><category term="e.ExceptionHandled" /><category term="Inside Scripting - VBScript" /><category term="bcdedit -debug on" /><category term="Security.Cryptography.CryptoStream" /><category term="ASP.NET 2.0 Website Programming: Problem - Design - Solution" /><category term="import credentials" /><category term="SqlException" /><category term="Stein Borge" /><category term="ASP.NET Authentication" /><category term="Associators Of" /><category term="WScript.CreateObject" /><category term="C:\Program Files\PowerGUI\snippets" /><category term="forum" /><category term="Codeplex" /><category term="help" /><category term="[System.Reflection.Assembly]::LoadFile" /><category term="ADODB.Connection" /><category term="safe mode" /><category term="switch parameters" /><category term="move edi" /><category term="URL length" /><category term="cmdlet" /><category term="DependOnService" /><category term="Assembly.GetExportedTypes" /><category term="ADSI" /><category term="Stats" /><category term="mergepdf" /><category term="Out-File" /><category term="streams.exe" /><category term="Tripwire" /><category term="MS_409" /><category term="Stop-Transcript" /><category term="Web Application" /><category term="ASP.NET Escalation Engineer" /><category term="mscluster active node" /><category term="starred" /><category term="http://www.keyongtech.com/windbg/" /><category term="Ctrl + C" /><category term="$?" /><category term="Commenting" /><category term="PowerGui" /><category term="ADO" /><category term="HorizontalAlign" /><category term="padding-top" /><category term="Extrinsic Event Queries" /><category term="ADODB.Command" /><category term="$matches[0]" /><category term="KB926140" /><category term="vbVerticalTab" /><category term="System.Windows.Forms" /><category term="powershellgroup.org" /><category term="WQL" /><category term="Meta_Class" /><category term="[ADSISEAERCHER]" /><category term="Nirsoft" /><category term="FTP Site" /><category term="AJAX  Control Toolkit" /><category term="Get server version" /><category term="SqlDataSourceStatusEventArgs" /><category term="Block Cursor" /><category term="/i" /><category term="KB926141" /><category term="SOAP" /><category term="$dataset.tables[0].select" /><category term="-ErrorAction Silentlycontinue" /><category term="pipelining" /><category term=".NET 4.0" /><category term="FX:{b05566ad-fe9c-4363-be05-7a4cbb7cb510}" /><category term="ALTER" /><category term="kaspersky rescue disc" /><category term="1033" /><category term="Configuration pane" /><category term="ip address regular expression" /><category term="ASP.NET 4.0" /><category term="[DllImport(&quot;user32.dll&quot;)[" /><category term="format-table" /><category term=".FindAll()" /><category term="vbCr" /><category term="Cygwin" /><category term="Outlook" /><category term="SNMPUtil" /><category term="$keywords" /><category term="stylesheet" /><category term=".GetType()" /><category term="Powershell module list" /><category term="Send email" /><category term="passwd" /><category term="-PhysicalPath" /><category term="%systemroot%\system32\drivers\etc\hosts" /><category term="AdventureWorks" /><category term="chm file" /><category term="w3schools.com" /><category term="Version 3" /><category term="DataSource" /><category term="PSCX" /><category term="Get-Dependency" /><category term="[IntPtr]::Size" /><category term="copy" /><category term="Get-Website -Name doesn't work" /><category term="-Recurse" /><category term="Add-Type -memberDefinition" /><category term=".CopyHere()" /><category term="Find files by Extension" /><category term="RowCount" /><category term="winadap" /><category term="notepad" /><category term="Get-Command" /><category term="Life Cycle diagrams" /><category term="Unable to check the status of the firewall" /><category term="TargetInstance" /><category term="training" /><category term="WMI Scheme Queries" /><category term="reversing" /><category term="Import-Csv : Cannot process argument because the value of argument &quot;name&quot; is invalid. Change the value of the &quot;name&quot; argument and run the operation again" /><category term="show advanced options" /><category term="[System.Net.IPAddress]::Parse($IPAddress)" /><category term="TSQL Script" /><category term="SOFTWARE\Microsoft\Powershell\1\Shell" /><category term="Search companion" /><category term="reteam.org" /><category term="New-Alias" /><category term="delayed binding" /><category term="Open RCE" /><category term="WMI Class Definitions" /><category term="vbLf" /><category term=".DataSource" /><category term="Fusion Log Viewer" /><category term="IsCurrentUserAMemberOfTheAdministratorsGroup" /><category term="backspace" /><category term="Invalid Channel Passphrase" /><category term="[System.Reflection.Assembly]::LoadWithPartialName" /><category term="syadmin wisdom" /><category term="ft -a $_.length" /><category term="DropDownList in GridView" /><category term="dumppool" /><category term="fullname" /><category term="echo" /><category term="Get-Children" /><category term="Layout" /><category term=".admx" /><category term="ForEach-Object" /><category term="FileAttribute enumeration" /><category term="Restricted" /><category term="burn .iso to disc" /><category term="System.Net.WebClient. DownloadString" /><category term="AccessKey" /><category term="-AND" /><category term="Get-Date" /><category term="Disk Management" /><category term="Insert data" /><category term="OOP" /><category term="$dir.fullname" /><category term="yyyy-MM-dd" /><category term="T-SQL" /><category term=".INPUTTYPE" /><category term=".bat" /><category term="-HostHeader" /><category term="Get-Alias" /><category term="SilentlyContinue" /><category term=".ActiveConnection" /><category term="multi-variable cursor" /><category term="books.google.com" /><category term="Test-path" /><category term="Const" /><category term="get domain users from groups" /><category term="Ravi Chaganti. Wmi Data Queries" /><category term="-filter" /><category term="GridView.Select" /><category term="SmtpPort" /><category term="the rename" /><category term="MX Toolbox" /><category term="test active cluster node" /><category term="fullscreen=yes" /><category term="WinDbg" /><category term="LogParser" /><category term="DLL Export Viewer" /><category term="Win32_NTLogEvent" /><category term="Win32_ClusterShare" /><category term="Minifuzz Basic File Fuzzing Tool" /><category term="Sysinternals" /><category term="Sort" /><category term="Multiple computers" /><category term="C:\windows\microsoft.net\framework\v2.0.50727\sos.dll" /><category term="Donald Knuth" /><category term="Remove Context Menu Platinum" /><category term="[Array]::Sort()" /><category term="&quot;\d{1" /><category term="SFTPServer.Connect" /><category term="Sort-Object" /><category term="DataTable.Compute" /><category term="mklink" /><category term="$lastexitcode" /><category term="$_.DeviceID" /><category term="End-Transcript" /><category term="No Connection" /><category term="LogicalDisk" /><category term="Get-COMObjects" /><category term="Inner functions" /><category term="XPath Tester" /><category term="C:\Program Files\PowerGUI\snippets\VBScript" /><category term="{$_.GetFiles().Count -eq 0}" /><category term="Windows Disc Image Burner" /><category term="System.Net.Dns" /><category term="SAM" /><category term="-List" /><category term="RawFormat.Equals" /><category term="Foundstone" /><category term="refresh" /><category term="throw" /><category term="GridView_DataBound" /><category term="Windows Debugger for .NET Developers" /><category term="join-path" /><category term="1mb" /><category term="-t" /><category term="Diskette drive 0 seek failure" /><category term="Set apppool to .NET 4.0" /><category term=".Save" /><category term="Bing" /><category term="ClearSelection" /><category term="Steve Souders" /><category term="gci -rec" /><category term="Media Organizing System Inc." /><category term="TypeID" /><category term="Create Management Pack" /><category term="Remove-ArrayElement" /><category term="task scheduler" /><category term="[DateTime]::Now.ToString(&quot;F&quot;)" /><category term="ICSharp" /><category term="Installing IIS" /><category term="fuslogvw" /><category term="save .swf files" /><category term=".Aliases" /><category term="center login control" /><category term="Advanced Functions" /><category term=".isPublic" /><category term="INSERT" /><category term="Set-Location" /><category term="storagecraft" /><category term="-Credential" /><category term="Remove-Job" /><category term="Set-Variable" /><category term="Write-Verbose" /><category term=".ProxyOverride" /><category term=".setRequestHeader" /><category term="Event 1002" /><category term="ehlo" /><category term="XMLHTTP" /><category term="powershell arguments" /><category term="iso to DVD" /><category term="dir ." /><category term="index dataset" /><category term="/ALL" /><category term="PopupControlID" /><category term="$ci)" /><category term="ArrayList.Sort" /><category term="Scripting.FileSystemObject" /><category term="Powershell version info" /><category term="sys.types" /><category term="__SERVER" /><category term="Windows.Forms.FormBorderStyle.FixedSingle" /><category term="SelectedRowStyle" /><category term="ImgBurn" /><category term="$file.extension" /><category term="ManagementObjectSearcher" /><category term="$this" /><category term="app_data" /><category term="cmd /c cls" /><category term="margin-bottom" /><category term="Windows Drivers" /><category term=".Days" /><category term="spammimic" /><category term="hashtable" /><category term="everything for Windows" /><category term="Workspaces" /><category term="ReadXml" /><category term="websiteoutlook.com" /><category term="groups" /><category term="Color.FromArgb" /><category term="sm" /><category term="WMI and ADSI Unleashed" /><category term="reset root password" /><category term="GridViewRow.Cells" /><category term="asp:ScriptManager" /><category term="$_.description" /><category term="Combofix" /><category term="XPath" /><category term="Get-History" /><category term="Symantec" /><category term="#00:00:00#" /><category term="color" /><category term="DataTextField" /><category term="New-WebVirtualDirectory" /><category term="iecompat.dll" /><category term=".LINK" /><category term="IsJpegImage" /><category term="[io.file]::exists" /><category term="wiki" /><category term="$_.InvocationInfo.ScriptName" /><category term="delete temp internet files with powershell" /><category term="-ReferenceObject" /><category term="Script block" /><category term="DataView.ToTable()" /><category term="Get-UnsignedScripts" /><category term="#region" /><category term="-Property" /><category term="free ebook" /><category term="disk resize fails" /><category term="edi" /><category term=".Visible" /><category term="Creational Patterns" /><category term="print chm" /><category term="Microsoft.VisualBasic.Devices.Network" /><category term="__namespace" /><category term="Dumpbin" /><category term="ValueFromPipeline=$true" /><category term="Uformat DateTime Formats" /><category term=".ToArray()" /><category term="-MemberType" /><category term="Winlogon|DCacheUpdate" /><category term="class definitions" /><category term="EFT Server" /><category term="-OR" /><category term="SQL Server Configuration Manager" /><category term="background-color" /><category term="Win32_OperatingSystem" /><category term="at scheduler" /><category term="Write - VBA" /><category term="Get-Credential" /><category term=".SYNOPSIS" /><category term="$true" /><category term="iiswebserver" /><category term="MSMQ" /><category term="DSN" /><category term="dir /b" /><category term="-WindowStyle Hidden" /><category term="enterprise system management" /><category term="Domain driven design" /><category term="RegEx" /><category term="SendEmail" /><category term="Remote Administration" /><category term="70-433" /><category term="-Destination" /><category term="-Include" /><category term="control panel files" /><category term="dir /ah" /><category term="webpagetest.org" /><category term="clear-host" /><category term="[Convert]::ToInt32" /><category term="-expandproperty" /><category term="&quot;yyyyMMdd&quot;" /><category term="minidump" /><category term="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\InfoDelivery\Restrictions" /><category term="sc config" /><category term="EventHandler" /><category term="[Reflection.Assembly]::LoadWithPartialName" /><category term="clustering" /><category term="-DifferenceObject" /><category term="in-process" /><category term="Browser Controls" /><category term="Mandatory" /><category term="Memory Dump Analysis" /><category term="[DateTime]::Now" /><category term="=rand(10" /><category term="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion]" /><category term="409" /><category term="Wait-Job" /><category term=".PutInClipboard" /><category term="Param" /><category term="-ComObject" /><category term=".NET Debugging" /><category term="Aliases" /><category term=".rtf" /><category term="DebuggingToolbox" /><category term="text strings" /><category term="$host.CurrentCulture.Name" /><category term="Get-SqlConnectionState" /><category term="HTML HTTP Request" /><category term="50155A" /><category term="Error messages" /><category term=".DataBind()" /><category term="Tables[0].DefaultView.ToTable(true" /><category term="{$_.GetDirectories().Count -eq 0}" /><category term="Windows Powershell Cookbook 2nd Edition" /><category term=".FreeSpace" /><category term="selfSSL" /><category term=".NET 3.5" /><category term="sp_helptext" /><category term="scripting" /><category term="encryption errors" /><category term="access .bat file variables in .ps1 file" /><category term=".mht" /><category term="[System.Data.Common.DbConnection]" /><category term="$env:windir" /><category term="Position" /><category term="WebDev.WebServer.exe" /><category term="Javascript" /><category term="IIS team" /><category term="Powershell v 3" /><category term="[ADSI&quot;WinNT://$computer/$group&quot;" /><category term="{$_.Extension -eq &quot;.pdf&quot;}" /><category term="-auto" /><category term="Configure .NET Version" /><category term="IIS" /><category term="ShellNew" /><category term="Application_Start" /><category term="port scan" /><category term="$matches" /><category term="Publish Web" /><category term="[System.IO.File]::ReadAllText" /><category term="Invalid MS-DOS function for vc_funtime_x86.cab" /><category term="WScript.Shell" /><category term="XML Notepad" /><category term="Set-ItemProperty" /><category term="([char]34)" /><category term="eliminating duplicate words" /><category term=".bashrc" /><category term="|" /><category term="Here-strings" /><category term="Delete Partition" /><category term="int main()" /><category term="Windows Components" /><category term="[Math]::Truncate()" /><category term="systypes.xtype" /><category term="Installation" /><category term=".NET" /><category term="WhatsUpGold Credentials" /><category term=".snippet" /><category term="Mailbox unavailable. The server response was: 5.7.1 Unable to relay" /><category term="Vista" /><category term="-ItemType Key" /><category term="Group Policy Object Editor" /><category term="WMIDiag" /><category term="winrm quickconfig" /><category term="Win32_Service" /><category term="installation status check" /><category term="Error 53" /><category term="Parameter checking" /><category term="Richard Mueller" /><category term="KB925228" /><category term="10)" /><category term="WhatsUpGold" /><category term="SMTPClient" /><category term="[IO.FileInfo]" /><category term="Import-Module" /><category term="latency" /><category term="[System.Security.Cryptography.MD5]::Create" /><category term=".ToString().ToUpper()" /><category term=".DESCRIPTION" /><category term="1kb" /><category term="Do-while" /><category term="Name" /><category term="Set service password" /><category term="InvocationInfo" /><category term="[String[]]" /><category term="cert:\CurrentUser\My" /><category term="Virtual PC 2007" /><category term="Chrome" /><category term="Foreach" /><category term="PropertyInfo" /><category term="Parameter" /><category term="70-562" /><category term="ConvertFrom-Base64" /><category term="Crtl + C" /><category term="remote configuration" /><category term="Enterprise Application Toolkit" /><category term="-ne" /><category term="Required ACL's" /><category term="Decrypt-string.Rinjdael" /><category term="create icons" /><category term="GetUser" /><category term="$array" /><category term="book references" /><category term="SharpZipLib" /><category term="single-file assembly" /><category term="Powershell Community Extensions" /><category term="temp file" /><category term="WinAPIOverride32" /><category term="2011 stats" /><category term="Globalscape" /><category term="2008 cluster" /><category term="ASP.NET start applications" /><category term="asp:LinkButton" /><category term=".getElementByID" /><category term="print" /><category term="Groups[1].Value" /><category term="KB926139" /><category term="MVC 1.0" /><category term="dllexport" /><category term="container" /><category term="While" /><category term="Split-Path" /><category term="Code Pages" /><category term="Doug Finke" /><category term="test URI scheme" /><category term="Rich Prescott" /><category term="Write-Host" /><category term="Temporary File Names" /><category term="Pubs" /><category term="System.Security" /><category term="IO.MemoryStream" /><category term="RC_UnusedDesktopIcons" /><category term="Joel Bennett" /><category term="file.write &quot;PK&quot;" /><category term="creating service accounts for ASP.NET" /><category term="Lorem ipsum dolor sit amet" /><category term="$_.PSChildName" /><category term="locate32" /><category term="System.Management" /><category term="$pshome" /><category term="GetLastWriteTime" /><category term="xp_cmdshell" /><category term="-NoProfile" /><category term="File0" /><category term="Internet Explorer proxy" /><category term="Powershell 2.0 Language Specifications" /><category term="Read-Host" /><category term="sys.configurations" /><category term="winmgmt" /><category term="[System.Environment]::GetEnvironmentalVariables()" /><category term="OnClick" /><category term="sysobjects" /><category term="WMIC" /><category term="Don Jones" /><category term="If Then" /><category term="Windows 7 Enterprise" /><category term="&quot;)[1]" /><category term="smtp.google.com 25" /><category term="NTFSInfo" /><category term="DataView" /><category term="70-229" /><category term="-function" /><category term="ScriptMethod" /><category term="arrays" /><category term="FooterStyle" /><category term="multiple filters" /><category term="James Brundage" /><category term="Application.Get" /><category term="TypeNames" /><category term="-AtIndex" /><category term="XML" /><category term="$false" /><category term="regular expression" /><category term="New-Share" /><category term="case" /><category term="livekd" /><category term="DataSourceSelectArguments.Empty" /><category term="{ }" /><category term="net use" /><category term="70-228" /><category term=".Namespace" /><category term="Data Access Layer" /><category term="[regex]::Escape" /><category term="KB92359" /><category term="typeperf" /><category term="quser" /><category term="cmd.exe" /><category term="SelectParameters" /><category term="open explorer" /><category term="nested functions" /><category term="Substring" /><category term="Keith Hill" /><category term="HKLM" /><category term="dir $env:windir" /><category term="WatiN" /><category term="Page.IsValid" /><category term="launchconnectiondialog" /><category term="Twitter" /><category term="-attr" /><category term="RidRoleOwner" /><category term="asp:Login" /><category term="=lorem(10" /><category term="New-WebServiceProxy" /><category term="Powershell" /><category term="Format Utility" /><category term="center" /><category term="tracert" /><category term="Jeffrey Snover" /><category term="Connect" /><category term="flash files" /><category term="gc" /><category term="-value" /><category term="1px" /><category term="Get-Service" /><category term="stinger" /><category term="Unit.Pixel" /><category term="Folders.Item" /><category term="User" /><category term="Application.Add" /><category term=".GetMethods" /><category term="Element K" /><category term="rcpt" /><category term="create self-signed certificate" /><category term="System.Globalization.CultireInfo]::CurrentCulture" /><category term="$hashtable.values" /><category term="Computers pane" /><category term="GetHostByName" /><category term="vbNullString" /><category term=".NET 3.5 SDK" /><category term="Module" /><category term="vbNewLine" /><category term="percentage" /><category term="vbFormFeed" /><category term="class" /><category term="Trace=&quot;true&quot;" /><category term="Push-Location" /><category term="-LoadUserProfile" /><category term="Event Viewer won't display" /><category term="Hash Table" /><category term="Blogger labels" /><category term="Stephen Walther" /><category term="AuthenticationLevel" /><category term="= rand()" /><category term="-wait" /><category term="Regex expression fuzzing tool" /><category term="Automating Windows Administration" /><category term="Windows Forms" /><category term="Color.FromRGB" /><category term="user32.dll" /><category term="public static extern bool ShowWindowAsync(IntPtr hWnd" /><category term="Microsoft Word 2007" /><category term="PCI" /><category term=".FUNCTIONALITY" /><category term="Get-PendingReboot" /><category term="Eschew Else" /><category term="brackets" /><category term="Get Notification When a Background Job is Done" /><category term="MicrosoftIE_LanSettings" /><category term="$_.fullname" /><category term="Steve Schofield" /><category term="Web Virtual Directory" /><category term="1.3.6.1.5.5.7.3.3" /><category term="force" /><category term="HttpCookie" /><category term="Find files by Size" /><category term="ValidateSet" /><category term="$_.InvocationInfo.ScriptLineNumber" /><category term="$profile.AllUsersAllHosts" /><category term="C#" /><category term="documentation error" /><category term="1gb" /><category term="DataRowView" /><category term="ContainsValue" /><category term="whatif" /><category term="ethical hacking" /><category term="[String]" /><category term="dsquery computer" /><category term="asp.net templates" /><category term="Time" /><category term="format DD in Date" /><category term="New-Website" /><category term="Unblock zip" /><category term="Guid" /><category term=".Connect()" /><category term="cmd shell" /><category term="DeviceID" /><category term="hash" /><category term="Community Extension Projects" /><category term="Ed Skoudis" /><category term="waveform" /><category term="jt.exe" /><category term="II" /><category term="Get-Process" /><category term="System.Guid.NewGuid().ToString()" /><category term="Virtual Server 2005" /><category term="configuration" /><category term="DataColumn" /><category term="tokens" /><category term="list domain computers" /><category term="free book" /><category term="enable javascript" /><category term="mount .iso" /><category term="&quot;Choose a filter string.&quot;)" /><category term="-Win32_SystemEnclosure" /><category term="[System.Globalization]::GetCultureInfoByIetfLanguageTag" /><category term="Get_Item" /><category term="bat file" /><category term="System.Environment" /><category term="StandardOutPut.ReadToEnd" /><category term="&quot;{0:00000}.pdf&quot; -f $_" /><category term="Remove enable" /><category term="Find single user" /><category term="margin-right" /><category term="Dictionary" /><category term="Move-Item" /><category term="ItemXPath" /><category term="[Alias)]" /><category term="Pinvoke.net" /><category term="kd" /><category term="search tool" /><category term="clear cache" /><category term="SQL Server 2005" /><category term="Character sets" /><category term="cd" /><category term=".invoke(&quot;Members&quot;)" /><category term="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services" /><category term="Error 80041010" /><category term="ADS" /><category term="pdf" /><category term="C:\Documents and Settings\NetworkService\Application Data\Microsoft\Protect" /><category term="$HostInfo.Aliases" /><category term="$_.PSIsContainer" /><category term="clear console" /><category term="dsquery user" /><category term="Windows Logon Options" /><category term="RootDSE" /><category term="-NoExit" /><category term="Where" /><category term="Timer Events" /><category term="Close - VBA" /><category term="Win32_LoggedOnUser" /><category term="SqlDataSourceEventArgs" /><category term="ql function" /><category term="nslookup" /><category term="Descending" /><category term="Add-WebConfiguration" /><category term="Calculate-MD5Hash" /><category term="Excel" /><category term="Script Body" /><category term="[CmdletBinding()[" /><category term="system management tools" /><category term="Named Pipes Provider: Could not open a connection to SQL Server [2]" /><category term="objectCategory=$strCategory" /><category term=".ps1" /><category term="Richard Siddaway" /><category term="Malwarebytes" /><category term="scripting object model" /><category term="Forensics.Get-ObjectAccessTimes" /><category term="Cast(row as varbinary)" /><category term="TABLE_NAME" /><category term="dir /w" /><category term="Export-Csv" /><category term=".VolumeName" /><category term="SMTPServer" /><category term="wsdl" /><category term="dynamic sql" /><category term="$_.Mode" /><category term="mmc" /><category term="Named pipes" /><category term="Console.ReadLine()" /><category term="puts()" /><category term="3.5" /><category term="Tasklist" /><category term="$profile.AllHostsAllUsers" /><category term="Powershell zip files" /><category term="Scripting.Dictionary" /><category term="peer-to-peer" /><category term="-contains" /><category term="SFTPServer.Close" /><category term="Copy data to clipboard" /><category term="rtgen.exe" /><category term="SET" /><category term="&quot;All Unassigned&quot;" /><category term="Power GUI VSX" /><category term="Export-Console" /><category term="has documents" /><category term="( )" /><category term="-notcontains" /><category term="netstat" /><category term="SQL Server 2008" /><category term="Authoring pane" /><category term="about_commonparameters" /><category term=".ToString(&quot;yyyyMM&quot;)" /><category term="Create" /><category term="New Project" /><category term="Communicator" /><category term="Drive Shrinking" /><category term="hivelist" /><category term="$_.InvocationInfo.OffsetInLine" /><category term="try/catch" /><category term="PdcRoleOwner" /><category term="Web Server Control" /><category term="(gc $tempFile)" /><category term="System.Exception" /><category term="Server 2003 SP2" /><category term="USE" /><category term="hack HTTP POST Powershell" /><category term="TableCell" /><category term="multiple loops" /><category term="-Variable" /><category term="WSMan" /><category term="Joe Pruitt" /><category term="[ADSI]" /><category term="Ars Technica" /><category term="Read DataSet from memory" /><category term="C:\WINDOWS\system32\msxml3.dll" /><category term="Compaq Presario 2100" /><category term="SQL" /><category term="C:\$extend\$usnjournal" /><category term="-match" /><category term="registry" /><category term="F8" /><category term="Applied XML Programming for Microsoft .NET" /><category term="Compiler Error Message: CS1646: Keyword" /><category term="$conn" /><category term="COLUMN" /><category term=".iso" /><category term="TargetControlID" /><category term="dead hard drive" /><category term="Global Cache Assembly" /><category term="varbinary" /><category term="Windows.Forms" /><category term="MSDN" /><category term="travel" /><category term="-Version" /><category term="cursors" /><category term="cast" /><category term="-Ssl" /><category term="Date formatting" /><category term="[byte[]]" /><category term="Win32_Share.Name" /><category term=".ComputeHash" /><category term="Tess Ferrandez" /><category term="XMLDataSource" /><category term=".FindOne()" /><category term="Page" /><category term=".DownloadFiles" /><category term="2641" /><category term="cert:\CurrentUser" /><category term="Modulo" /><category term="Auto-help" /><category term="Bulk Insert" /><category term="ModalPopup" /><category term="logonhours" /><category term="XSLT" /><category term="Get-Date -Format" /><category term="filepath" /><category term="vbNull" /><category term="resize drive" /><category term="Marco Shaw" /><category term="FreeBSD" /><category term="margin" /><category term="SQL Jobs" /><category term="solid" /><category term="CryptoAPI" /><category term="Create and validate RSS feed" /><category term="PassThru" /><category term=".Append" /><category term="web farms" /><category term="MPSeal.exe" /><category term="Quick DateTime Formats" /><category term="Get-EventLog" /><category term="Tab navigation" /><category term="html" /><category term="Parent" /><category term="Lee Holmes" /><category term="DropDownList" /><category term="Compatability View" /><category term="DateLastModified" /><category term="-PSConsole" /><category term="Invalid Namespace" /><category term="Sqlcmd: Error" /><category term="Paros" /><category term=".DownloadString" /><category term="-Process" /><category term="x86" /><category term="formatengine.cpp.558" /><category term="Backtrack 5" /><category term="-detailed" /><category term="Capitalize-FirstLetters" /><category term="windbg.info" /><category term="Validation control" /><category term="margin-top" /><category term="StdRegProv" /><category term="Exit" /><category term="TUCOWS" /><category term="Convert-HexToRGBSTring" /><category term=".Proxy" /><category term="Add-Member" /><category term="GetDefaultFolder(6).Items" /><category term=".Sort()" /><category term="XML Master" /><category term="Attach Database" /><category term="maintenance plan" /><category term="Invalid Class" /><category term="DomainControllers" /><category term="connectionStrings" /><category term="Windows 7" /><category term="NIC info for all domain machines" /><category term="beginningtoseethelight.org" /><category term="Textpipe" /><category term="Dell 531S" /><category term=".NET Reflector" /><category term="Find" /><category term="Session.Add" /><category term="creationtime" /><category term="built-in data conversion figures" /><category term="kernel mode" /><category term=".htm" /><category term="blog" /><category term="Application.Lock" /><category term="clr10\sos" /><category term="-Query" /><category term="ID" /><category term="cpl" /><category term="MQ Series" /><category term="firewall.cpl" /><category term="Irfanview" /><category term="&quot;[0-9]&quot;" /><category term="operators" /><category term="IE" /><category term="error: 40" /><category term="Update TFE local storage" /><category term="System.Drawing.Image" /><category term="wildcard" /><category term="SQL Error 2" /><category term="Bypass control validation" /><title>Another computer blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://learningpcs.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>975</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/QnDb" /><feedburner:info uri="blogspot/qndb" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkcFR3w6eCp7ImA9WhRUFkk.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5264752243035499831</id><published>2012-01-26T20:53:00.000-08:00</published><updated>2012-01-26T20:53:36.210-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-26T20:53:36.210-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Net.Sockets.TcpClient" /><category scheme="http://www.blogger.com/atom/ns#" term="POP" /><category scheme="http://www.blogger.com/atom/ns#" term="Mjolinor" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="-match" /><category scheme="http://www.blogger.com/atom/ns#" term="Read Gmail" /><title>Powershell (v2) - Read Gmail (More Proof of Concept than Anything)</title><content type="html">After reading through some forums and seeing someone have trouble with their gmail, but, no client to control the data I got curious. &amp;nbsp;My research suggested there were lost of posts on how to use Powershell to send through gmail, but, not necessarily to read. &amp;nbsp;A quick hunt for some C# led me to this ASP.NET snippet:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://weblogs.asp.net/satalajmore/archive/2007/12/19/asp-net-read-email.aspx"&gt;ASP.net Read Email&lt;/a&gt;&lt;/blockquote&gt;After scanning the code quickly I figured this could be ported into Powershell with little effort. &amp;nbsp;Although I had some initial issues due to a misconfiguration (I put an smtp address in one spot where I needed &amp;nbsp;pop address) it worked when I was done...to some extent. &amp;nbsp;I still had trouble filtering out email strings, so, I hit the Technet board. &amp;nbsp;As always mjolinor was the man with a regex to help me track down precisely what I needed:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/8573cac3-9765-490e-a182-ef8083b51077"&gt;Harvesting "from" addresses from my gmail account&lt;/a&gt;&lt;/blockquote&gt;Using what is listed below, I can pull email. &amp;nbsp;But, what I don't fully understand is how, when I get email, it is often different, and, in no obvious order. &amp;nbsp;Since this was really a proof of concept type post I haven't had much time to research the POP RFC. &amp;nbsp;Nonetheless, I thought I would throw it out there for more talented souls than myself to save them the work. &amp;nbsp;So, the next time you're lost on a desert island with perfect wifi, a laptop and an instance of Powershell...you can still check your email. &amp;nbsp;How cool is that?&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Clear-Host &lt;br /&gt;
&lt;br /&gt;
try {&lt;br /&gt;
Write-Output "Creating new TcpClient."&lt;br /&gt;
$tcpClient = New-Object -TypeName System.Net.Sockets.TcpClient&lt;br /&gt;
&lt;br /&gt;
# Connect to gmail&lt;br /&gt;
$tcpClient.Connect("pop.gmail.com", 995)&lt;br /&gt;
&lt;br /&gt;
if($tcpClient.Connected) {&lt;br /&gt;
Write-Output "You are connected to the host. Attempting to get SSL stream."&lt;br /&gt;
&lt;br /&gt;
# Create new SSL Stream for tcpClient&lt;br /&gt;
Write-Output "Getting SSL stream."&lt;br /&gt;
[System.Net.Security.SslStream] $sslStream = $tcpClient.GetStream()&lt;br /&gt;
&lt;br /&gt;
# Authenticating as client&lt;br /&gt;
Write-Output "Authenticating as client."  &lt;br /&gt;
$sslStream.AuthenticateAsClient("pop.gmail.com");&lt;br /&gt;
&lt;br /&gt;
if($sslStream.IsAuthenticated) {&lt;br /&gt;
Write-Output "You have authenticated. Attempting to login."&lt;br /&gt;
# Asssigned the writer to stream &lt;br /&gt;
[System.IO.StreamWriter] $sw = $sslstream&lt;br /&gt;
&lt;br /&gt;
# Assigned reader to stream&lt;br /&gt;
[System.IO.StreamReader] $reader = $sslstream&lt;br /&gt;
&lt;br /&gt;
# refer POP rfc command, there very few around 6-9 command&lt;br /&gt;
$sw.WriteLine('USER myemail@gmail.com')&lt;br /&gt;
&lt;br /&gt;
# sent to server&lt;br /&gt;
$sw.Flush()&lt;br /&gt;
&lt;br /&gt;
# send pass&lt;br /&gt;
$sw.WriteLine('PASS JollyRodgersH@dACabin');&lt;br /&gt;
$sw.Flush()&lt;br /&gt;
&lt;br /&gt;
# this will retrive your first email&lt;br /&gt;
$sw.WriteLine("RETR 1")&lt;br /&gt;
$sw.Flush()&lt;br /&gt;
&lt;br /&gt;
$sw.WriteLine("Quit ");&lt;br /&gt;
$sw.Flush();&lt;br /&gt;
&lt;br /&gt;
[String] $str = [String]::Empty&lt;br /&gt;
[String] $strTemp = [String]::Empty&lt;br /&gt;
&lt;br /&gt;
while (($strTemp = $reader.ReadLine()) -ne $null) {&lt;br /&gt;
# find the . character in line&lt;br /&gt;
if($strTemp -eq '.') {&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($strTemp.IndexOf('-ERR') -ne -1) {&lt;br /&gt;
break;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$str += $strTemp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Return raw data&lt;br /&gt;
Write-Output "`nOutput email"&lt;br /&gt;
$str -match 'From:(.+?)?&amp;lt;(.+?)?&amp;gt;.' | Out-Null&lt;br /&gt;
} else { &lt;br /&gt;
Write-Error "You were not authenticated. Quitting."&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
Write-Error "You are not connected to the host. Quitting"&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
catch {&lt;br /&gt;
$_&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
finally {&lt;br /&gt;
Write-Output "Script complete. Here are your from addresses."&lt;br /&gt;
$Matches[2]&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5264752243035499831?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZXfm3KL5c9i7YrTv6RaTwpGSp08/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZXfm3KL5c9i7YrTv6RaTwpGSp08/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZXfm3KL5c9i7YrTv6RaTwpGSp08/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZXfm3KL5c9i7YrTv6RaTwpGSp08/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/SD3_-YOt-pY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5264752243035499831/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-read-gmail-more-proof-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5264752243035499831?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5264752243035499831?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/SD3_-YOt-pY/powershell-v2-read-gmail-more-proof-of.html" title="Powershell (v2) - Read Gmail (More Proof of Concept than Anything)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-read-gmail-more-proof-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIGQHg_fyp7ImA9WhRUFEw.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-6064694642299608784</id><published>2012-01-24T06:14:00.000-08:00</published><updated>2012-01-24T06:15:21.647-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-24T06:15:21.647-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="function" /><category scheme="http://www.blogger.com/atom/ns#" term="$_.PSChildName" /><category scheme="http://www.blogger.com/atom/ns#" term="-ErrorAction 0" /><category scheme="http://www.blogger.com/atom/ns#" term="Keith Hill" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-ItemProperty" /><category scheme="http://www.blogger.com/atom/ns#" term="COM" /><category scheme="http://www.blogger.com/atom/ns#" term="Where-Object" /><category scheme="http://www.blogger.com/atom/ns#" term="get-childitem" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-COMObjects" /><category scheme="http://www.blogger.com/atom/ns#" term="-match" /><category scheme="http://www.blogger.com/atom/ns#" term="HKLM:\Software\Classes" /><title>Powershell (v2) - Function: Get-COMObjects</title><content type="html">While looking at a post on Technet about saving files from InfoPath I realized I didn't know the COM object name (the easiest way to Office products in Powershell). &amp;nbsp;I could have just searched the registry, but, instead, decided to find a function that would do it for me. &amp;nbsp;Keith Hill's (long) one-liner linked in the post below did the trick to list every COM object on the local machine. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.vistax64.com/powershell/91583-there-any-script-get-list-com-objects-computer.html"&gt;Vista - is there any script to get a list of COM Objects in a computer?&lt;/a&gt;&lt;/blockquote&gt;I decided to take it one step further and add a -match operator accessible via a -Name parameter. &amp;nbsp;After tweaking it with my single parameter, it ended up looking like this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;code&gt;&lt;span style="color: white;"&gt;function Get-COMObjects {&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;lt;#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp; .AUTHOR    Will Steele (wlsteele@gmail.com)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp; .DEPENDENCIES    n/a&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.DESCRIPTION    This script returns the names of all COM objects on the local machine. If a Name parameter is passed, the function performs a -match on the name.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.EXAMPLE    Get-COMObjects&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.EXAMPLE    Get-COMObjects -Name Excel&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.EXTERNALHELP    None.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.FORWARDHELPTARGETNAME   None.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.INPUTS    System.String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.LINK&amp;nbsp;&lt;/span&gt; &lt;a href="http://learningpcs.blogspot.com/2012/01/powershell-v2-function-get-comobjects.html"&gt;&lt;span style="color: white;"&gt;http://learningpcs.blogspot.com/2012/01/powershell-v2-function-get-comobjects.html&lt;/span&gt;&lt;/a&gt;&lt;span style="color: white;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.NAME     Get-COMObjects &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.NOTES     None.&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.OUTPUTS    System.String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.PARAMETER Name   An optional parameter used to specify a string used for -match comparison.     &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.SYNOPSIS    List all local machine COM objects.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; [CmdletBinding()]&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp; param(&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;[Parameter(&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Mandatory = $false,&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Position = 0,&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ValueFromPipeline = $true   &lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)]&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;[String]&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;$Name = $null&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; )&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; if($Name -eq $null) {&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get-ChildItem -Path HKLM:\Software\Classes -ErrorAction 0 | `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; &amp;nbsp; Where-Object {$_.PSChildName -match '^\w+\.\w+$' -and `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(Get-ItemProperty "$($_.PSPath)\CLSID" -ErrorAction 0)} | `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select-Object PSChildName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get-ChildItem -Path HKLM:\Software\Classes -ErrorAction 0 | `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Where-Object {$_.PSChildName -match '^\w+\.\w+$' -and `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(Get-ItemProperty "$($_.PSPath)\CLSID" -ErrorAction 0)} | `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Where-Object {$_.PSChildName -match $Name} | `&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;Select-Object PSChildName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; }&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-6064694642299608784?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LqjQX0pQbI8YFeX6g6wQkWWGoO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LqjQX0pQbI8YFeX6g6wQkWWGoO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LqjQX0pQbI8YFeX6g6wQkWWGoO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LqjQX0pQbI8YFeX6g6wQkWWGoO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/ewOfgrY4HUc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/6064694642299608784/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-function-get-comobjects.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6064694642299608784?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6064694642299608784?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/ewOfgrY4HUc/powershell-v2-function-get-comobjects.html" title="Powershell (v2) - Function: Get-COMObjects" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-function-get-comobjects.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AERHc4eCp7ImA9WhRUE0g.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-7797574926607096412</id><published>2012-01-23T15:01:00.001-08:00</published><updated>2012-01-23T15:01:45.930-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-23T15:01:45.930-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="&quot;All Unassigned&quot;" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="IIS 7" /><category scheme="http://www.blogger.com/atom/ns#" term="New-Website" /><category scheme="http://www.blogger.com/atom/ns#" term="-Ssl" /><title>Powershell (v2) - IIS 7: Create New Website with IP Set to "All Unassigned"</title><content type="html">I couldn't find anything that was explicit on how to do this, so, I will throw it out there. The task is this: create a new website with the IP Address set to "All Unassigned". &amp;nbsp;If you do this manually via the IIS Administration MMC it's pretty straightforward. &amp;nbsp;In Powershell, however, I was unclear on how to do the "All Unassigned" part. &amp;nbsp;This component essentially means using the wildcard (*) character for IP Address. &amp;nbsp;To do this, make sure you have the WebAdministration module loaded, then, run this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;New-Website -Name "Test Website 1" -IPAddress "*" -HostHeader "www.testwebsite1.com" -PhysicalPath "C:\test"&lt;/code&gt;&lt;/blockquote&gt;When you run this command, you should get this result:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; State &amp;nbsp; &amp;nbsp; &amp;nbsp;Physical Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bindings&lt;br /&gt;
---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- &amp;nbsp; ----- &amp;nbsp; &amp;nbsp; &amp;nbsp;------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------&lt;br /&gt;
Test Website 1 &amp;nbsp; 4 &amp;nbsp; &amp;nbsp;Started &amp;nbsp; &amp;nbsp;C:\test &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;http *:80:www.testwebsite1.com&lt;/code&gt;&lt;/blockquote&gt;If you want to force the binding (the technical term for the IIS component specifying protocol, header, port, and, site name) use this approach. &amp;nbsp;Notice the -SSL switch:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;New-Website -Name "Test Website 2" -IPAddress "*" -HostHeader "www.testwebsite2.com" -PhysicalPath "C:\test" -SSL&lt;/code&gt;&lt;/blockquote&gt;With this approach, you should see this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;code&gt;&lt;span style="color: white;"&gt;Name             ID   State      Physical Path                  Bindings&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; ----             --   -----      -------------                  --------&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Test Website 2   5    Stopped    C:\test                        https &lt;/span&gt;&lt;span style="color: red;"&gt;&lt;b&gt;*:80&lt;/b&gt;&lt;/span&gt;&lt;span style="color: white;"&gt;:www.testwebsite2.com&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;Be aware that you have to specify port 443 explicitly when you use the -SSL switch, otherwise, you will merely get a binding with the https protocol on port 80. &amp;nbsp;This can work, but, is not standard practice. &amp;nbsp;The appropriate command would be:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;New-Website -Name "Test Website 3" -IPAddress "*" -HostHeader "www.testwebsite3.com" -PhysicalPath "C:\test" -SSL -Port 443&lt;/code&gt;&lt;/blockquote&gt;which, in turn, gives you this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;code&gt;&lt;span style="color: white;"&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &amp;nbsp; State &amp;nbsp; &amp;nbsp; &amp;nbsp;Physical Path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bindings&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; ---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- &amp;nbsp; ----- &amp;nbsp; &amp;nbsp; &amp;nbsp;------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--------&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Test Website 3 &amp;nbsp; 3 &amp;nbsp; &amp;nbsp;Started &amp;nbsp; &amp;nbsp;C:\test &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="color: white;"&gt;https &lt;/span&gt;&lt;span style="color: red;"&gt;*:443&lt;/span&gt;&lt;/b&gt;&lt;span style="color: white;"&gt;:www.testwebsite3.com&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;Note that I highlighted the binding and port in website 2 and website 3 to differentiate between the two.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-7797574926607096412?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YJsEGLtBPHLUvReDr81Rov8dSvM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YJsEGLtBPHLUvReDr81Rov8dSvM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YJsEGLtBPHLUvReDr81Rov8dSvM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YJsEGLtBPHLUvReDr81Rov8dSvM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/v861j3sIyC4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/7797574926607096412/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-iis-7-create-new-website.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/7797574926607096412?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/7797574926607096412?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/v861j3sIyC4/powershell-v2-iis-7-create-new-website.html" title="Powershell (v2) - IIS 7: Create New Website with IP Set to &quot;All Unassigned&quot;" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-iis-7-create-new-website.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YFSXc9cCp7ImA9WhRUEE8.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-1903088173085596453</id><published>2012-01-19T18:05:00.000-08:00</published><updated>2012-01-19T18:05:18.968-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-19T18:05:18.968-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="shell.application" /><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="COM" /><category scheme="http://www.blogger.com/atom/ns#" term="Dino Esposito" /><title>COM - Getting Back to Old School (Shell.Application)</title><content type="html">After unsuccessfully fighting zip scripts all week I decided to reach out and see if I could get some info on the shell.application COM object. &amp;nbsp;This is one used to do zipping when you're not using an executable. &amp;nbsp;I've worked with it before, but, never really nailed it down. &amp;nbsp;So, I was given several great links I want to record for posterity as another wave of projects is about to wash in and I can't research much at this point:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.windowsitpro.com/article/vbscript/understanding-vbscript-the-shell-object-model-s-folder-and-folderitem-objects"&gt;http://www.windowsitpro.com/article/vbscript/understanding-vbscript-the-shell-object-model-s-folder-and-folderitem-objects&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.windowsitpro.com/content1/topic/understanding-vbscript-the-windows-shell-object-model/catpath/vbscript/page/3"&gt;http://www.windowsitpro.com/content1/topic/understanding-vbscript-the-windows-shell-object-model/catpath/vbscript/page/3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.autoitscript.com/autoit3/docs/intro/ComRef.htm"&gt;http://www.autoitscript.com/autoit3/docs/intro/ComRef.htm&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb774094.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb774094.aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb773938(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb773938(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb787868(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb787868(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff521688(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/ff521688(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb787866(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb787866(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb774063(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb774063(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb774089(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb774089(v=vs.85).aspx&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-1903088173085596453?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6L-FGVNX2veTQcHDjs-ao1qGwRQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6L-FGVNX2veTQcHDjs-ao1qGwRQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6L-FGVNX2veTQcHDjs-ao1qGwRQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6L-FGVNX2veTQcHDjs-ao1qGwRQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/-qA-RSujC-0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/1903088173085596453/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/com-getting-back-to-old-school.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1903088173085596453?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1903088173085596453?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/-qA-RSujC-0/com-getting-back-to-old-school.html" title="COM - Getting Back to Old School (Shell.Application)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/com-getting-back-to-old-school.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ABQ3c6eSp7ImA9WhRVGU0.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5227882517648746395</id><published>2012-01-18T07:49:00.000-08:00</published><updated>2012-01-18T07:49:12.911-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-18T07:49:12.911-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".odt" /><category scheme="http://www.blogger.com/atom/ns#" term=".htm" /><category scheme="http://www.blogger.com/atom/ns#" term=".mht" /><category scheme="http://www.blogger.com/atom/ns#" term=".txt" /><category scheme="http://www.blogger.com/atom/ns#" term=".rtf" /><category scheme="http://www.blogger.com/atom/ns#" term=".xml" /><category scheme="http://www.blogger.com/atom/ns#" term=".docm" /><category scheme="http://www.blogger.com/atom/ns#" term=".pdf" /><category scheme="http://www.blogger.com/atom/ns#" term=".wps" /><category scheme="http://www.blogger.com/atom/ns#" term="file compression ratios" /><category scheme="http://www.blogger.com/atom/ns#" term=".xps" /><category scheme="http://www.blogger.com/atom/ns#" term="WinZip 15.5" /><category scheme="http://www.blogger.com/atom/ns#" term=".docx" /><category scheme="http://www.blogger.com/atom/ns#" term=".doc" /><category scheme="http://www.blogger.com/atom/ns#" term=".dotx" /><title>WinZip - Compression Rates for Common File Types (and some Powershell Calculation Functions)</title><content type="html">After a busy week of data management, file and folder manipulation I got a chance to sit down and do some analysis. &amp;nbsp;While working on several data conversion projects I began to see patterns in the data compression rates of the documents I was working with. &amp;nbsp;Plain .txt files zip extremely well, whereas .pdf files hardly zip compress at all. &lt;br /&gt;
&lt;br /&gt;
To help be precise in my study, here are the basics of my system, as displayed via the WinZip | Help | About WinZip | View System Information form:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;Windows 7 Enterprise Edition (Build 7600), 32-bit&lt;br /&gt;
Current date/time: 1/18/2012 &amp;nbsp;7:55 AM&lt;br /&gt;
WinZip(R) 15.5 (9510) &amp;nbsp;compiled: Jun 20 2011&lt;br /&gt;
Module name = C:\Program Files\WinZip\WINZIP32.EXE&lt;br /&gt;
Command line: "C:\Program Files\WinZip\WINZIP32.EXE" "C:\testing\zipping\txt.zip"&lt;br /&gt;
Total physical memory = 3109108 Kbytes&lt;br /&gt;
Physical memory available = 193828 Kbytes&lt;br /&gt;
Total virtual memory = 2097024 Kbytes&lt;br /&gt;
Virtual memory available = 1912060 Kbytes&lt;br /&gt;
Country code: 1&lt;br /&gt;
Language: English&lt;br /&gt;
Code-page: 1252&lt;/blockquote&gt;The document I used to test against was generated using Microsoft Word 2007's =lorem() function with parameters of 200 and 10 (it looks like this =lorem(200,10) when you put it in Word). &amp;nbsp;This is an approach others can use and obtain similar results, so, it tends to fall under the umbrella of "scientific" research, for it's ability to be reproduced by others. &amp;nbsp;When I analyzed this file it contained the following stats:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;Pages: 27 &lt;br /&gt;
Words: 12,505 &lt;br /&gt;
Characters (no spaces): 73,476 &lt;br /&gt;
Characters (with spaces): 85,781 &lt;br /&gt;
Paragraphs: 200 &lt;br /&gt;
Lines: 945&lt;/blockquote&gt;I saved this file in a variety of formats to get comparative figures for each file type. &amp;nbsp;The list below includes:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;the file type to which the original document was saved&lt;/li&gt;
&lt;li&gt;the original file size&lt;/li&gt;
&lt;li&gt;the compressed file size and&lt;/li&gt;
&lt;li&gt;the compression ratio (compressed/original file size) - higher numbers suggest less compression&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&amp;nbsp;Below are the common file types you can save from Microsoft Word 2007. &lt;/div&gt;&lt;ul&gt;&lt;li&gt;.doc: 115200 - 9742 -&amp;nbsp;8.45%&lt;/li&gt;
&lt;li&gt;.docm: 18397&amp;nbsp;- 15941 - 86.64%&lt;/li&gt;
&lt;li&gt;.docx: 18370&amp;nbsp;- 15912 - 86.62%&lt;/li&gt;
&lt;li&gt;.dotx: 18394&amp;nbsp;- 15928 - 86.59%&lt;/li&gt;
&lt;li&gt;.htm: 123279&amp;nbsp;- 9657 - 7.83%&lt;/li&gt;
&lt;li&gt;.mht: 133490&amp;nbsp;- 19249 - 14.42%&lt;/li&gt;
&lt;li&gt;.odt: 10746 - 10575 - 98.41%&lt;/li&gt;
&lt;li&gt;.pdf: 178468&amp;nbsp;- 161172 - 90.31%&lt;/li&gt;
&lt;li&gt;.rtf:&amp;nbsp;139518 -&amp;nbsp;13362 -&amp;nbsp;9.57%&lt;/li&gt;
&lt;li&gt;.txt:&amp;nbsp;86183 - 3285 -&amp;nbsp;3.81%&lt;/li&gt;
&lt;li&gt;.wps&amp;nbsp;(Works 6.0-9.0):&amp;nbsp;178688&amp;nbsp;- 8171 -&amp;nbsp;4.57%&lt;/li&gt;
&lt;li&gt;.wps&amp;nbsp;(Works 7.0):&amp;nbsp;178688 - 8167 -&amp;nbsp;4.57%&lt;/li&gt;
&lt;li&gt;.xml (Word):&amp;nbsp;149435 - 8946 - 5.99%&lt;/li&gt;
&lt;li&gt;.xml (Word 2003):&amp;nbsp;131751 - 6347 - 4.81%&lt;/li&gt;
&lt;li&gt;.xps: 288370 - 271462 - 94.13%&lt;/li&gt;
&lt;/ul&gt;As you can see from the list above, the binary files fare much more poorly than the simpler markup files. &amp;nbsp;The next chance I get I'll do comparisons on various image file formats. &amp;nbsp;If you read this and think of another file type you want checked out, let me know and I'll add it to the list. &amp;nbsp;There are plenty I can think of, but, in this initial post, don't have time to explore. &amp;nbsp;Also, I will try compression rates with other software (built in Windows, 7zip, etc).&lt;br /&gt;
&lt;br /&gt;
For folks looking to understand how this can practically affect their daily work flow here are some things to consider. &amp;nbsp;In a recent project, I was zipping .tif images. &amp;nbsp;Our system handles .zip files best at a maximum of about 100kb in size. &amp;nbsp;To determine how many files I can fit into a zip file I either have to calculate the size of the zip after every file iteration (which fails because it only stops after the threshold has been passed). &amp;nbsp;Alternatively, I can run a predictive algorithm (a script) against a folder using these figures as estimates. &amp;nbsp;Now, I know there will be variance in compression rates. &amp;nbsp;If I included images or embedded objects in these files, it would skew the numbers completely. &amp;nbsp;However, since we deal with common file types on large project, our file compression rates are pretty stable. &lt;br /&gt;
&lt;br /&gt;
This may seem like an arbitrary thing to script, but, when you deal with significant quantities of data (read that to mean millions of files) at a time, sometimes it is wise to plan ahead and size up the mountain before you start the climb. &amp;nbsp;If I were to approach this with Powershell, I could run a script like this against a folder to see what potential .zip file sizes might be using a simple switch statement:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function Calculate-CompressedSize {&lt;br /&gt;
[CmdletBinding()]&lt;br /&gt;
param(&lt;br /&gt;
[Parameter(&lt;br /&gt;
Mandatory = $true,&lt;br /&gt;
ValueFromPipeline = $true&lt;br /&gt;
)]&lt;br /&gt;
$files&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
foreach($file in $files) {&lt;br /&gt;
switch ($file.extension) {&lt;br /&gt;
.doc {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.0845), $file.Length, (($file.Length * 0.0845)/$file.Length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.docm {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.8664), $file.length, (($file.Length * 0.8664)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.docx {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.8662), $file.length, (($file.Length * 0.8662)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.dotx {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.8659), $file.length, (($file.Length * 0.8659)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.htm {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.0783), $file.length, (($file.Length * 0.0783)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mht {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.1442), $file.length, (($file.Length * 0.1442)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.odt {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.9841), $file.length, (($file.Length * 0.9841)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.pdf {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.9031), $file.length, (($file.Length * 0.9031)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.rtf {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.0957), $file.length, (($file.Length * 0.0957)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.txt {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.0381), $file.length, (($file.Length * 0.0381)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.wps {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.0457), $file.length, (($file.Length * 0.0457)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.xml {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.055), $file.length, (($file.Length * 0.055)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.xps {&lt;br /&gt;
return "$($file.Name): {0:N0}/{1:N0} ({2:P2})" -f ($file.Length * 0.9413), $file.length, (($file.Length * 0.9413)/$file.length)&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;This is pretty and all, and, in my test case, it works great to give me basic information.  However, the next step would be to sum the total of each file in the directory to give me an estimate of how much space would be used if I were to zip it all.  This can be done like this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function Calculate-CompressedSize {&lt;br /&gt;
[CmdletBinding()]&lt;br /&gt;
param(&lt;br /&gt;
[Parameter(&lt;br /&gt;
Mandatory = $true,&lt;br /&gt;
ValueFromPipeline = $true&lt;br /&gt;
)]&lt;br /&gt;
$files&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
foreach($file in $files) {&lt;br /&gt;
switch ($file.extension) {&lt;br /&gt;
.doc {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.0845)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.docm {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.8664)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.docx {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.8662)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.dotx {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.8659)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.htm {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.0783)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mht {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.1442)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.odt {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.9841)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.pdf {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.9031)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.rtf {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.0957)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.txt {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.0381)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.wps {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.0457)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.xml {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.055)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.xps {&lt;br /&gt;
return {0:N0} -f ($file.Length * 0.9413)&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;Next, I would iterate the contents of my directory (in this case, my test data) like so,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$zipsize = 0&lt;br /&gt;
dir | % { $zipsize += Calculate-CompressedSize $_}&lt;/code&gt;&lt;/blockquote&gt;And, to see what my result is,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$zipsize&lt;br /&gt;
578096&lt;/code&gt;&lt;/blockquote&gt;I know this is a stilted example (as I used my test data to predict the results), but, when I zipped the files, I got a .zip file with a size (not size on disk) of 579647. &amp;nbsp;Calculating the margin of error I get 578096/579647 = &amp;nbsp;99.73%. &amp;nbsp;If I can predict how much files will compress to within 1/4 of a percent with a simple function, I am going to be pretty happy when it comes time to start creating zips. &amp;nbsp;The next step, for me, would be to write predictive functions calculating, as show, above, groupings for file sets that would match my .zip size limit. &amp;nbsp;Theoretically, I would write something like this Analyze-File -MaxCompressionSize 100kb. This would return arrays of the filenames that match this, which, I would then pipe into my scripts. &amp;nbsp;Using this approach, I could accurately control how much data is handled and in what ways.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5227882517648746395?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4-oGR-Q-RZmqs6YByxKG6dNHGys/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4-oGR-Q-RZmqs6YByxKG6dNHGys/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4-oGR-Q-RZmqs6YByxKG6dNHGys/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4-oGR-Q-RZmqs6YByxKG6dNHGys/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/xX_lNF7DiGg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5227882517648746395/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/winzip-compression-rates-for-common.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5227882517648746395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5227882517648746395?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/xX_lNF7DiGg/winzip-compression-rates-for-common.html" title="WinZip - Compression Rates for Common File Types (and some Powershell Calculation Functions)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/winzip-compression-rates-for-common.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAHQnw-eCp7ImA9WhRVGEQ.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-6759696760721171860</id><published>2012-01-18T05:35:00.000-08:00</published><updated>2012-01-18T05:35:33.250-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-18T05:35:33.250-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Lorem ipsum dolor sit amet" /><category scheme="http://www.blogger.com/atom/ns#" term="=lorem()" /><category scheme="http://www.blogger.com/atom/ns#" term="easter eggs" /><category scheme="http://www.blogger.com/atom/ns#" term="=lorem(10" /><category scheme="http://www.blogger.com/atom/ns#" term="10)" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft Word 2007" /><category scheme="http://www.blogger.com/atom/ns#" term="=rand(10" /><category scheme="http://www.blogger.com/atom/ns#" term="= rand()" /><category scheme="http://www.blogger.com/atom/ns#" term="consectetuer adipiscing elit. Maecenas porttitor congue massa" /><title>Word 2007 - Generating Junk Data with =Rand() and =Lorem()</title><content type="html">To test some zip compression methods I needed to create dummy files. &amp;nbsp;Knowing from past exploits in this direction I could do so in Word rather easily I Googled up this article describing two easter eggs: =rand() and =lorem().&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.howtogeek.com/howto/microsoft-office/fun-at-work-microsoft-word-easter-egg/"&gt;Fun at Work: Microsoft Word "Easter Egg"&lt;/a&gt;&lt;/blockquote&gt;As noted in the article, you can automatically generate three paragraphs with five sentences each of junk text. &amp;nbsp;These defaults, of 3 paragraphs and 5 sentences, can be overridden by passing in specific values. &amp;nbsp;For example, if I want 10 paragraphs with 10 sentences to be generated, I use =rand(10,10) instead. &amp;nbsp;In my example, this worked perfectly to help me quickly generate a lot of useless data for testing purposes.&lt;br /&gt;
&lt;br /&gt;
And, if you're curious what it puts out (yes, there will be a lot of text), here are the outputs of the rand(10,10) and lorem(10,10) respectively. &amp;nbsp;First up, =rand(10,10)&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template.&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document.&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;Here's the =lorem(10,10) output:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci. Aenean nec lorem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula. Donec hendrerit, felis et imperdiet euismod, purus ipsum pretium metus, in lacinia nulla nisl eget sapien.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Donec ut est in lectus consequat consequat. Etiam eget dui. Aliquam erat volutpat. Sed at lorem in nunc porta tristique. Proin nec augue. Quisque aliquam tempor magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc ac magna. Maecenas odio dolor, vulputate vel, auctor ac, accumsan id, felis. Pellentesque cursus sagittis felis.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Pellentesque porttitor, velit lacinia egestas auctor, diam eros tempus arcu, nec vulputate augue magna vel risus. Cras non magna vel ante adipiscing rhoncus. Vivamus a mi. Morbi neque. Aliquam erat volutpat. Integer ultrices lobortis eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin semper, ante vitae sollicitudin posuere, metus quam iaculis nibh, vitae scelerisque nunc massa eget pede. Sed velit urna, interdum vel, ultricies vel, faucibus at, quam. Donec elit est, consectetuer eget, consequat quis, tempus quis, wisi.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;In in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Donec ullamcorper fringilla eros. Fusce in sapien eu purus dapibus commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras faucibus condimentum odio. Sed ac ligula. Aliquam at eros. Etiam at ligula et tellus ullamcorper ultrices. In fermentum, lorem non cursus porttitor, diam urna accumsan lacus, sed interdum wisi nibh nec nisl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Ut tincidunt volutpat urna. Mauris eleifend nulla eget mauris. Sed cursus quam id felis. Curabitur posuere quam vel nibh. Cras dapibus dapibus nisl. Vestibulum quis dolor a felis congue vehicula. Maecenas pede purus, tristique ac, tempus eget, egestas quis, mauris. Curabitur non eros. Nullam hendrerit bibendum justo. Fusce iaculis, est quis lacinia pretium, pede metus molestie lacus, at gravida wisi ante at libero.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Quisque ornare placerat risus. Ut molestie magna at mi. Integer aliquet mauris et nibh. Ut mattis ligula posuere velit. Nunc sagittis. Curabitur varius fringilla nisl. Duis pretium mi euismod erat. Maecenas id augue. Nam vulputate. Duis a quam non neque lobortis malesuada.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Praesent euismod. Donec nulla augue, venenatis scelerisque, dapibus a, consequat at, leo. Pellentesque libero lectus, tristique ac, consectetuer sit amet, imperdiet ut, justo. Sed aliquam odio vitae tortor. Proin hendrerit tempus arcu. In hac habitasse platea dictumst. Suspendisse potenti. Vivamus vitae massa adipiscing est lacinia sodales. Donec metus massa, mollis vel, tempus placerat, vestibulum condimentum, ligula. Nunc lacus metus, posuere eget, lacinia eu, varius quis, libero.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Aliquam nonummy adipiscing augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;i&gt;Aenean nec lorem. In porttitor. Donec laoreet nonummy augue. Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy. Fusce aliquet pede non pede. Suspendisse dapibus lorem pellentesque magna. Integer nulla. Donec blandit feugiat ligula.&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-6759696760721171860?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/R_A4PQ-r49YT92c-ubsPIKbyEGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_A4PQ-r49YT92c-ubsPIKbyEGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/R_A4PQ-r49YT92c-ubsPIKbyEGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_A4PQ-r49YT92c-ubsPIKbyEGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/ii3R03-laQk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/6759696760721171860/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/word-2007-generating-junk-data-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6759696760721171860?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6759696760721171860?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/ii3R03-laQk/word-2007-generating-junk-data-with.html" title="Word 2007 - Generating Junk Data with =Rand() and =Lorem()" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/word-2007-generating-junk-data-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MGQng7fyp7ImA9WhRVF0s.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5023551471680028133</id><published>2012-01-16T19:03:00.000-08:00</published><updated>2012-01-16T19:03:43.607-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T19:03:43.607-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Param" /><category scheme="http://www.blogger.com/atom/ns#" term="Write-Output" /><category scheme="http://www.blogger.com/atom/ns#" term="Open-Comments" /><category scheme="http://www.blogger.com/atom/ns#" term="Close-Comments" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="'*' * 50" /><title>Powershell (v2) - Simplify Logging with Functions to Save Typing</title><content type="html">As I work on my current project, I like to include comments at the beginning and end of each section. &amp;nbsp;When I started off my scripts, they looked like this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;#region Parameters&lt;br /&gt;
&lt;br /&gt;
param(&lt;br /&gt;
[Parameter(&lt;br /&gt;
HelpMessage = 'You need to enter a path to store the transcript.',&lt;br /&gt;
Mandatory = $true&lt;br /&gt;
)]&lt;br /&gt;
[ValidateNotNullOrEmpty()]&lt;br /&gt;
[String]&lt;br /&gt;
$TranscriptPath&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
#endregion Parameters&lt;br /&gt;
&lt;br /&gt;
#region Functions&lt;br /&gt;
&lt;br /&gt;
function fuwdt {&lt;br /&gt;
Get-Date -Format "HH:mm:ss"&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#endregion Functions&lt;br /&gt;
&lt;br /&gt;
#region ScriptConfiguration&lt;br /&gt;
&lt;br /&gt;
#requires -Version 2.0&lt;br /&gt;
#requires -PSSnapIn PSCX&lt;br /&gt;
#requires -PSSnapIn ServerManager&lt;br /&gt;
#requires -PSSnapIn WebAdministration&lt;br /&gt;
Set-StrictMode -Version 2.0&lt;br /&gt;
Start-Transcript -Path $TranscriptPath&lt;br /&gt;
&lt;br /&gt;
#endregion ScriptConfiguration&lt;br /&gt;
&lt;br /&gt;
#region ScriptBody&lt;br /&gt;
&lt;br /&gt;
#region Log Header&lt;br /&gt;
&lt;br /&gt;
# Output status to host&lt;br /&gt;
Write-Output ""&lt;br /&gt;
Write-Output "$('*' * 50)"&lt;br /&gt;
Write-Output "* Beginning application configuration (using script: $(Join-Path $(Split-Path -parent $MyInvocation.MyCommand.Definition) $(Split-Path -Leaf $MyInvocation.MyCommand.Definition)))."&lt;br /&gt;
Write-Output "* Script run on $(Get-Date)."&lt;br /&gt;
Write-Output "$('*' * 50)" &lt;br /&gt;
Write-Output ""&lt;br /&gt;
&lt;br /&gt;
#endregion Log Header&lt;br /&gt;
&lt;br /&gt;
#region Step 1) Create application pools&lt;br /&gt;
&lt;br /&gt;
#### NOTES: #################################&lt;br /&gt;
#&lt;br /&gt;
#  This step will create AppPools based on the configuration for dev.&lt;br /&gt;
#  &lt;br /&gt;
#############################################  &lt;br /&gt;
&lt;br /&gt;
# Output status to host&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt): * Step 1) Creating AppPools."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
&lt;br /&gt;
... Do some work ...&lt;br /&gt;
&lt;br /&gt;
# Output status to host&lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"  &lt;br /&gt;
Write-Output "$(fuwdt): * AppPools created."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"   &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
&lt;br /&gt;
#endregion Step 1) Create application pools&lt;/code&gt;&lt;/blockquote&gt;So, this is all well and good, but, when I started having several sections to my scripts, I was repeating this pattern over and over,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;# Output status to host&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt): * Step 1) Creating AppPools."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
&lt;br /&gt;
... Do some work ...&lt;br /&gt;
&lt;br /&gt;
# Output status to host&lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"  &lt;br /&gt;
Write-Output "$(fuwdt): * AppPools created."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"   &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;/code&gt;&lt;/blockquote&gt;Kind of foolish I figured, so, I wrote these two functions, and, put them in a base.psm1 module.  You could also include them in the Functions region.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function Close-Comments {&lt;br /&gt;
param(&lt;br /&gt;
$Comment&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"  &lt;br /&gt;
Write-Output "$(fuwdt): * $($Comment)."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 50)"   &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Open-Comments {&lt;br /&gt;
param(&lt;br /&gt;
$Comment&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt): * $($Comment)."&lt;br /&gt;
Write-Output "$(fuwdt): $('*' * 75)"  &lt;br /&gt;
Write-Output "$(fuwdt):"&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;With these two functions, I can rewrite my block this way,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;# Output status to host&lt;br /&gt;
Open-Comments "Step 1) Creating AppPools."&lt;br /&gt;
&lt;br /&gt;
... Do some work ...&lt;br /&gt;
&lt;br /&gt;
# Output status to host&lt;br /&gt;
Close-Comments "AppPools created."&lt;br /&gt;
&lt;/code&gt;&lt;/blockquote&gt;Quite a bit less typing, and, definitely cuts down on redundant code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5023551471680028133?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_AWqq-JrfMzgkvw95QK7zJk9o1E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_AWqq-JrfMzgkvw95QK7zJk9o1E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_AWqq-JrfMzgkvw95QK7zJk9o1E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_AWqq-JrfMzgkvw95QK7zJk9o1E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/7narWmAptDg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5023551471680028133/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-simplify-logging-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5023551471680028133?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5023551471680028133?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/7narWmAptDg/powershell-v2-simplify-logging-with.html" title="Powershell (v2) - Simplify Logging with Functions to Save Typing" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-simplify-logging-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YFRnczfyp7ImA9WhRVF0g.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5292256051310930926</id><published>2012-01-16T16:11:00.000-08:00</published><updated>2012-01-16T16:11:57.987-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-16T16:11:57.987-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="[Environment]" /><category scheme="http://www.blogger.com/atom/ns#" term="User" /><category scheme="http://www.blogger.com/atom/ns#" term="[Environment]::SetEnvironmentalVariable()" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Machine" /><category scheme="http://www.blogger.com/atom/ns#" term="Process" /><title>Powershell (v2) - Permanently Add Environmental Variable (for Real)</title><content type="html">A while back I found a link that gave me an idea of how to do this:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.vistax64.com/powershell/239765-how-set-systems-environment-variable-permanently.html"&gt;Vista - how to set system's environment variable permanently&lt;/a&gt;&lt;/blockquote&gt;However, when I went to try this, it didn't actually take. &amp;nbsp;After doing some more digging, I found this post,&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://softwaresalariman.blogspot.com/2008/01/add-path-environment-variable-in.html"&gt;Add Path Environment Variable in PowerShell&lt;/a&gt;&lt;/blockquote&gt;which referenced an MSDN .NET link:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/96xafkes.aspx"&gt;Environment.SetEnvironmentVariable Method (String, String, EnvironmentVariableTarget)&lt;/a&gt;&lt;/blockquote&gt;with three parameters instead of two. &amp;nbsp;After reading up on this, I tried this, and, it worked perfectly.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;[Environment]::SetEnvironmentVariable("test","testvalue","Machine")&lt;/code&gt;&lt;/blockquote&gt;For more information on this third parameter (and what you can use with it) check out this link:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.environmentvariabletarget.aspx"&gt;EnvironmentVariableTarget Enumeration&lt;/a&gt;&amp;nbsp;&lt;/blockquote&gt;As noted in this link, there are three targets you can point to with the method:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;&lt;u&gt;Process&lt;/u&gt;&lt;/b&gt;: The environment variable is stored or retrieved from the environment block associated with the current process.&lt;br /&gt;
&lt;br /&gt;
The user creates the environment variable in a set operation.&lt;br /&gt;
When the process terminates, the operating system destroys the environment variable in that process.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;User&lt;/u&gt;&lt;/b&gt;: The environment variable is stored or retrieved from the HKEY_CURRENT_USER\Environment key in the Windows operating system registry.&lt;br /&gt;
&lt;br /&gt;
When the user creates the environment variable in a set operation, the operating system stores the environment variable in the system registry, but not in the current process. If the user starts a new process, the operating system copies the environment variable from the registry to that process.&lt;br /&gt;
&lt;br /&gt;
When the process terminates, the operating system destroys the environment variable in that process. However, the environment variable in the registry persists until the user removes it programmatically or by means of an operating system tool.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;Machine&lt;/u&gt;&lt;/b&gt;: The environment variable is stored or retrieved from the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment key in the Windows operating system registry.&lt;br /&gt;
&lt;br /&gt;
When a user creates the environment variable in a set operation, the operating system stores the environment variable in the system registry, but not in the current process. If any user on the local machine starts a new process, the operating system copies the environment variable from the registry to that process.&lt;br /&gt;
&lt;br /&gt;
When the process terminates, the operating system destroys the environment variable in that process. However, the environment variable in the registry persists until a user removes it programmatically or by means of an operating system tool.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5292256051310930926?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eXFOwjM1p22hwuZhNBDlvlGPB58/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXFOwjM1p22hwuZhNBDlvlGPB58/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eXFOwjM1p22hwuZhNBDlvlGPB58/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eXFOwjM1p22hwuZhNBDlvlGPB58/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/qCiK66ZCtvQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5292256051310930926/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-permanently-add.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5292256051310930926?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5292256051310930926?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/qCiK66ZCtvQ/powershell-v2-permanently-add.html" title="Powershell (v2) - Permanently Add Environmental Variable (for Real)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-permanently-add.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQGRX47eyp7ImA9WhRVFko.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-1211635553346246148</id><published>2012-01-15T17:28:00.000-08:00</published><updated>2012-01-15T17:28:44.003-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-15T17:28:44.003-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="-com" /><category scheme="http://www.blogger.com/atom/ns#" term="shell.application" /><category scheme="http://www.blogger.com/atom/ns#" term="Steve Schofield" /><category scheme="http://www.blogger.com/atom/ns#" term="Foreach" /><category scheme="http://www.blogger.com/atom/ns#" term="$shellApplication.NameSpace()" /><category scheme="http://www.blogger.com/atom/ns#" term="IIS team" /><category scheme="http://www.blogger.com/atom/ns#" term="UnZipMe" /><category scheme="http://www.blogger.com/atom/ns#" term="gci" /><category scheme="http://www.blogger.com/atom/ns#" term="New-Object" /><category scheme="http://www.blogger.com/atom/ns#" term="-Path" /><category scheme="http://www.blogger.com/atom/ns#" term="Write-Host" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="$zipPackage.Items()" /><category scheme="http://www.blogger.com/atom/ns#" term=".CopyHere()" /><title>Powershell (v2) - Unzip Files without an Application</title><content type="html">Some time ago I pulled together someone's post to come up with a function to zip files without using any third party tools. &amp;nbsp;Looking back, it is very rough, and, could be revisited. &amp;nbsp;Nonetheless, I've got a big project due in a couple of days and none of the unzipping snippets I have found work very well. &amp;nbsp;Steve Schofield, of the IIS team, had this post, however, which works pretty well so far:&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://blogs.iis.net/steveschofield/archive/2011/06/05/unzip-several-files-with-powershell.aspx"&gt;Unzip several files with PowerShell&lt;/a&gt;&lt;/blockquote&gt;The snippet, to save you the hop over, if you're in a hurry, looks like this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function UnZipMe($zipfilename,$destination) &lt;br /&gt;
{ &lt;br /&gt;
$shellApplication = new-object -com shell.application &lt;br /&gt;
$zipPackage = $shellApplication.NameSpace($zipfilename) &lt;br /&gt;
$destinationFolder = $shellApplication.NameSpace($destination) &lt;br /&gt;
&lt;br /&gt;
# CopyHere vOptions Flag # 4 - Do not display a progress dialog box. &lt;br /&gt;
# 16 - Respond with "Yes to All" for any dialog box that is displayed. &lt;br /&gt;
&lt;br /&gt;
$destinationFolder.CopyHere($zipPackage.Items(),20) &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
$a = gci -Path C:\inetpub\iislogs3.com\wwwlogs -Filter *.zip &lt;br /&gt;
&lt;br /&gt;
foreach($file in $a) &lt;br /&gt;
{ &lt;br /&gt;
Write-Host "Processing - $file" UnZipMe –zipfilename &lt;br /&gt;
$file.FullName -destination $file.DirectoryName &lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-1211635553346246148?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/thRUZekv4szSuDLbfL-KKB4rTD0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/thRUZekv4szSuDLbfL-KKB4rTD0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/thRUZekv4szSuDLbfL-KKB4rTD0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/thRUZekv4szSuDLbfL-KKB4rTD0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/3gxsWjd96XU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/1211635553346246148/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-unzip-files-without.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1211635553346246148?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1211635553346246148?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/3gxsWjd96XU/powershell-v2-unzip-files-without.html" title="Powershell (v2) - Unzip Files without an Application" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-unzip-files-without.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04DSX45eip7ImA9WhRVFUg.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-8174371336217402799</id><published>2012-01-14T06:39:00.000-08:00</published><updated>2012-01-14T06:39:38.022-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-14T06:39:38.022-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="syadmin wisdom" /><category scheme="http://www.blogger.com/atom/ns#" term="Rich Prescott" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><title>Post - The SysAdmin Ten Commandments</title><content type="html">&lt;div class="tr_bq"&gt;This comment,&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.reddit.com/r/sysadmin/comments/ofpmz/the_sysadmin_ten_commandments/c3gvkna"&gt;http://www.reddit.com/r/sysadmin/comments/ofpmz/the_sysadmin_ten_commandments/c3gvkna&lt;/a&gt;&lt;/blockquote&gt;was reported by&amp;nbsp;&lt;a href="https://twitter.com/#!/Rich_Prescott"&gt;Rich_Prescott&lt;/a&gt;&amp;nbsp;yesterday and I found it worth saving. &amp;nbsp;I tend to try and collect tidbits earned from hard experience and these seemed pretty valuable. &amp;nbsp;Hopefully, I'll have my own list someday.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If it isn't broke, don't mess with it!&lt;/li&gt;
&lt;li&gt;If you can't figure out the problem, export all the logs and reboot.&lt;/li&gt;
&lt;li&gt;Never change anything late in the day.&lt;/li&gt;
&lt;li&gt;Never change anything on Friday.&lt;/li&gt;
&lt;li&gt;Always be able to undo what you are about to do.&lt;/li&gt;
&lt;li&gt;If you don't understand it, don't mess with it on a production system.&lt;/li&gt;
&lt;li&gt;A project is not done until it's tested by you and by end-users.&lt;/li&gt;
&lt;li&gt;A project is not done until it's documented.&lt;/li&gt;
&lt;li&gt;All projects take twice as long as you planned for.&lt;/li&gt;
&lt;li&gt;Use default settings whenever possible.&lt;/li&gt;
&lt;li&gt;Do not roll out new software without training end users.&lt;/li&gt;
&lt;li&gt;If you're fighting fires all the time, find the source.&lt;/li&gt;
&lt;li&gt;Avoid poor decisions from above. Manage upward.&lt;/li&gt;
&lt;li&gt;Backups always work, restores never do. Have good backups and test restores.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;What I didn't realize is that it was a comment to an even better list,&lt;/div&gt;&lt;div&gt;&lt;blockquote class="tr_bq"&gt;&lt;a href="http://hacktux.com/sysadmin/ten/commandments"&gt;http://hacktux.com/sysadmin/ten/commandments&lt;/a&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;which goes like this...the first one is cleaner.&lt;/div&gt;&lt;blockquote&gt;&lt;b&gt;I. Thou shalt respect thy user&lt;/b&gt;&lt;br /&gt;
It is paramount that you respect the user and their data. Don't steal their MP3s, don't look at their p___. When working with email, look without reading. Respect them and they will respect you.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;II. Thou shalt empower the user&lt;/b&gt;&lt;br /&gt;
The user is the customer. The system is not yours, it is theirs. Provide users the tools they need to be successful and they will be happy. Give them space to experiment, learn and create. Do not hold users back.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;III. Thou shalt keep it simple&lt;/b&gt;&lt;br /&gt;
Keep It Simple, Stupid. The KISS principle will keep you from building barrels to keep a bottle's worth of wine. Do not mistake over-engineering for quality. Quality work is concise and scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;IV. Thou shalt expect catastrophe&lt;/b&gt;&lt;br /&gt;
Expect the worst surprises. Make your resources redundant, backup your data, test your backups, and then backup the backups. The s___ will hit the fan someday. Be prepared.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;V. Thou shalt plan&lt;/b&gt;&lt;br /&gt;
Great work follows great plans. Stay on target by first identifying it. Plan your work carefully and surprises will be easier to handle.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VI. Thou shalt stay informed&lt;/b&gt;&lt;br /&gt;
Gather all the news, information, logs and statistics you can. Without the raw data to analyze, you cannot debug problems and you cannot forecast. Without new information, you cannot learn.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VII. Thou shalt share&lt;/b&gt;&lt;br /&gt;
No one is alone in this world. Pass your knowledge on to others. Give to others, contribute to the community and you will reap many rewards. It is not wise to horde knowledge. Don't be an a__hole.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VIII. Thou shalt automate&lt;/b&gt;&lt;br /&gt;
Do more, faster by automating tasks. You are the puppet master, do not waste your time with menial work. Work smarter, not harder.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;IX. Thou shalt document&lt;/b&gt;&lt;br /&gt;
Always document your work, your code and your plans. Then document their execution and maintenance. Document for others and document for yourself. Documentation should be an extension of your mind and a resource for others.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;X. Thou shalt respect thy organization&lt;/b&gt;&lt;br /&gt;
Without organization, there is no system, there is no user and there is no job. Understand the organization and its business. Respect it and help it thrive.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-8174371336217402799?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xICWyVdyu2W8ZcbIxL5vEBUP3j0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xICWyVdyu2W8ZcbIxL5vEBUP3j0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xICWyVdyu2W8ZcbIxL5vEBUP3j0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xICWyVdyu2W8ZcbIxL5vEBUP3j0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/eF_rmXj34zs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/8174371336217402799/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/post-sysadmin-ten-commandments.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8174371336217402799?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8174371336217402799?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/eF_rmXj34zs/post-sysadmin-ten-commandments.html" title="Post - The SysAdmin Ten Commandments" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>1</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/post-sysadmin-ten-commandments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AARXg4cSp7ImA9WhRVFEU.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-707181544185286166</id><published>2012-01-13T13:22:00.000-08:00</published><updated>2012-01-13T13:22:24.639-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T13:22:24.639-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="copy" /><category scheme="http://www.blogger.com/atom/ns#" term="&quot;{0:00000}.pdf&quot; -f $_" /><category scheme="http://www.blogger.com/atom/ns#" term="2..1000" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="%" /><title>Powershell (v2) - Quickly Create 1000 Copies of a File</title><content type="html">If you ever need to create dummy data for testing uploads, disk IO, or, what not, here is a quick way to generate large volumes of files. &amp;nbsp;&lt;b&gt;&lt;u&gt;Note&lt;/u&gt;&lt;/b&gt;: if the files are large, this will be a little slower, and, will quickly, eat up disk space. &amp;nbsp;That's my shout out out of caveat emptor.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;2..1000 | % {&lt;br /&gt;
&amp;nbsp; copy C:\testing\000001.pdf ("{0:00000.pdf"} -f $_)&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;The notation I am using 1..1000 | % is something I got recently from &lt;a href="http://social.technet.microsoft.com/profile/larry%20weiss"&gt;Larry Weiss&lt;/a&gt;, my own personal Powershell guru in the cloud, on my Technet post:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/66dafe15-3888-4a23-b71b-ec3c3ea635b2"&gt;How can I reduce memory usage in scripts that operate over large collections?&lt;/a&gt;&lt;/blockquote&gt;The alternative, as he points out in the post, was my original format:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;for($i=2;$i -le 1000;$i++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; copy C:\testing\000001.pdf ("{0:00000.pdf"} -f $i)&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;As Larry illustrated, you can use the .. notation for quick array generation. &amp;nbsp;With this syntax, you specify the min and max of the array. &amp;nbsp;Pipe this to a foreach loop, % {}, and use the copy command. &amp;nbsp;On thing that I use which is a little bit of a short cut is the zero fill format specifier:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;"{0:00000.pdf"} -f $_&lt;/code&gt;&lt;/blockquote&gt;It saves me a ton of work. &amp;nbsp;What this does is takes the first value on the right of the -f, in this case, the pipelined value, and, fits it into the 5-digit string in front of .pdf. &amp;nbsp;If you did this manually, without specifiers, it would look like this, and, be much slower,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;2..9 | % { copy .\00001.pdf 0000$_.pdf}&lt;br /&gt;
10..99 | % { copy .\00001.pdf 000$_.pdf}&lt;br /&gt;
100..999 | % { copy .\00001.pdf 00$_.pdf}&lt;/code&gt;&lt;/blockquote&gt;Granted, this may be a simple script, but, if you need to do something odd, like generate 1000 identical copies of a file with sequential naming, hey, now you know what to do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-707181544185286166?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tqwkskHLeYQwYRcvGgyX2mpA32I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tqwkskHLeYQwYRcvGgyX2mpA32I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tqwkskHLeYQwYRcvGgyX2mpA32I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tqwkskHLeYQwYRcvGgyX2mpA32I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/DuwxVfZ4B0Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/707181544185286166/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-quickly-create-1000.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/707181544185286166?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/707181544185286166?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/DuwxVfZ4B0Q/powershell-v2-quickly-create-1000.html" title="Powershell (v2) - Quickly Create 1000 Copies of a File" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-quickly-create-1000.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYESH4zeyp7ImA9WhRVFEs.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-3299649106556136039</id><published>2012-01-13T06:10:00.000-08:00</published><updated>2012-01-13T06:15:09.083-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-13T06:15:09.083-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PSCX" /><category scheme="http://www.blogger.com/atom/ns#" term="Foreach" /><category scheme="http://www.blogger.com/atom/ns#" term="get-childitem" /><category scheme="http://www.blogger.com/atom/ns#" term=".\*.tif" /><category scheme="http://www.blogger.com/atom/ns#" term="Write-Zip" /><category scheme="http://www.blogger.com/atom/ns#" term="cd" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="$dir.fullname" /><category scheme="http://www.blogger.com/atom/ns#" term="&quot;$($dir.name).zip&quot;" /><category scheme="http://www.blogger.com/atom/ns#" term="dir .\*.tif | Remove-Item" /><title>Powershell (v2) - PSCX : Write-Zip (Mass Zipping Files and Lots of Them)</title><content type="html">After nearly killing myself to figure out my own solution to writing zip files I decided to revisit the Write-Zip cmdlet in the PSCX module. &amp;nbsp;As I started working with it I found the second example in their help useless as it contains switches that don't even exist. &amp;nbsp;So, that left me with one working example. &amp;nbsp;It took me a little while to figure out how it worked, but, I finally did. &amp;nbsp;Next, was how to get it to work in large data sets. &amp;nbsp;At present I have a project with a few million files I need to zip, as one of the intermediary steps, and, this seemed like the perfect opportunity to figure out how to pull this off. &amp;nbsp;To test and be sure I got the syntax correct I made a dummy directory with *.txt files. &amp;nbsp;To process it I wrote this command:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;PS C:\testing\powershell\testfiles&amp;gt; foreach($dir in (Get-ChildItem .)) {&lt;br /&gt;
&amp;nbsp; cd $dir.fullname&lt;br /&gt;
&amp;nbsp; Write-Zip .\*.tif "$($dir.Name).zip"&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;This example assumes PSCX is imported.  As it loops through the subdirectories it looks for files matching the extension, in this case, *.tif, and copies them to a .zip file named after the current directory.  For my production example this works perfectly as I named the folders sequentially to indicate the project and data set I was working on.  Unfortunately, the original switch that allowed you to remove the original is not an option any longer.  Nonetheless, I can accomplish the same thing after I run the previous command with one more line:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;dir .\*.tif | Remove-Item&lt;/code&gt;&lt;/blockquote&gt;I had thought about running jobs to accelerate the process, but, wanted to really be sure this works as intended before I add another layer of complication/abstraction.&lt;br /&gt;
&lt;br /&gt;
In my first actual production run I found I was zipping 1000 files in 14 seconds every time. &amp;nbsp;Using my own concoction, not only did I have corrupted zips, if the process got interrupted, but, it took much, much longer (read hours). &amp;nbsp;This way I might be able to finish my work in 1/20th of the time it took me before. &amp;nbsp;Thank you again Powershell and PSCX crew.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-3299649106556136039?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oM0lee1zlaKvvUyolUsr_peFwC4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oM0lee1zlaKvvUyolUsr_peFwC4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oM0lee1zlaKvvUyolUsr_peFwC4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oM0lee1zlaKvvUyolUsr_peFwC4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/qqDXDEtpfiI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/3299649106556136039/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-pscx-write-zip-mass.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/3299649106556136039?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/3299649106556136039?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/qqDXDEtpfiI/powershell-v2-pscx-write-zip-mass.html" title="Powershell (v2) - PSCX : Write-Zip (Mass Zipping Files and Lots of Them)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-pscx-write-zip-mass.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIDQ3Y4fip7ImA9WhRVE0k.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-1517654205636524783</id><published>2012-01-11T21:36:00.000-08:00</published><updated>2012-01-11T21:36:12.836-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T21:36:12.836-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="function Write-DateTime" /><category scheme="http://www.blogger.com/atom/ns#" term="Write-Output" /><category scheme="http://www.blogger.com/atom/ns#" term="Add-Member" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="control loops" /><category scheme="http://www.blogger.com/atom/ns#" term="NotePropety" /><title>Powershell (v2) - Using NoteProperty to Control Processing in Loop</title><content type="html">I am doing some conceptual testing, and, to help me iron out my own test script, I have been looking for ways to control my iterations.  One thing has bugged me is the use of complex counters to monitor status of data.  I thought to myself, why not use the object itself to tell me it's processed state instead of relying on some convoluted status structure to infer this property.  So, using &lt;code&gt;Add-Member&lt;/code&gt; I assigned a new &lt;code&gt;NoteProperty&lt;/code&gt; value of &lt;code&gt;$true&lt;/code&gt; to each object after it had been processed.  This way, when I iterate through my collection, I can simply read the property from the file and automatically know what files have been touched, and, what files are in need of processing.  In this case, I create a test folder, generate the files, and, assign groups (based on intervals of 1000) in a hashtable value where the filename is the key.  I am trying to sort of out some code for larger processes tasks and really want to nail down some simple, but, effective techniques to monitor processing status.  My brain just does not handle convoluted script mechanics well.  This is much more intuitive.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function wdt {&lt;br /&gt;
&amp;nbsp;Get-Date -Format "yyyy-MM-dd hh:mm:ss"&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Clearing screen&lt;br /&gt;
Clear-Host&lt;br /&gt;
&lt;br /&gt;
# Set up variables&lt;br /&gt;
if(Get-Variable hashtable) {&lt;br /&gt;
&amp;nbsp;Clear-Variable hashtable&lt;br /&gt;
}&lt;br /&gt;
$hashtable = @{}&lt;br /&gt;
$counter = 1&lt;br /&gt;
$path = 'C:\testing\powershell\testfiles\largefiletest'&lt;br /&gt;
$hashtable = @{}&lt;br /&gt;
$counter = 1&lt;br /&gt;
$group = 1&lt;br /&gt;
&lt;br /&gt;
# Creating new files&lt;br /&gt;
Write-Output "$(wdt) Creating new folder."&lt;br /&gt;
&lt;br /&gt;
# Creating new folder&lt;br /&gt;
New-Item -Path $path -ItemType Directory -Force | Out-Null&lt;br /&gt;
&lt;br /&gt;
# Creating new files&lt;br /&gt;
Write-Output "$(wdt) Creating new files."&lt;br /&gt;
&lt;br /&gt;
# Generate test files&lt;br /&gt;
for ($i=1; $i -le 10000; $i++) {&lt;br /&gt;
&amp;nbsp;if( -not (Test-Path "$path\$($i.txt)")) {&lt;br /&gt;
&amp;nbsp; Write-Output "$(wdt) Creating $($i.txt)."&lt;br /&gt;
&amp;nbsp; New-Item -Path $Path -Name "$i.txt" -ItemType File -Value $i -Force&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Get file info into variable&lt;br /&gt;
$files = Get-ChildItem $path | Where-Object {( -not $_.PSIsContainer ) -and ( $_.Extension -eq '.txt' )} | Sort-Object -Property Name&lt;br /&gt;
&lt;br /&gt;
# Creating new files&lt;br /&gt;
Write-Output "$(wdt) Iterate collection."&lt;br /&gt;
&lt;br /&gt;
# Group files into sets of 1000&lt;br /&gt;
foreach($file in $files) {&lt;br /&gt;
&amp;nbsp;Write-Output "$(wdt): Processing $($file.Name)."&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if($counter -le 1000) {&lt;br /&gt;
&amp;nbsp; if( -not $file.Processed ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;# Add file to hashtable - filename (key) $group (value)&lt;br /&gt;
$hashtable.Add($file.FullName, $group)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;# Add NoteProperty to file object&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$file | Add-Member -MemberType NoteProperty -Name Processed -Value $true&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;# Increment Counter&lt;br /&gt;
&amp;nbsp; &amp;nbsp;$counter++&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;} else {&lt;br /&gt;
&amp;nbsp; # Increment group&lt;br /&gt;
&amp;nbsp; $group++&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; # Reset counter&lt;br /&gt;
&amp;nbsp; $counter = 1&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Output status to screen&lt;br /&gt;
Write-Output "$(wdt): Sorting hashtable."&lt;br /&gt;
&lt;br /&gt;
# Output collection for proof of concept&lt;br /&gt;
$hashtable.GetEnumerator() | Sort-Object Value, Name | Format-Table -AutoSize&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-1517654205636524783?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/G9DwI647Fu5uYOETolO_oYJ0XM0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G9DwI647Fu5uYOETolO_oYJ0XM0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/G9DwI647Fu5uYOETolO_oYJ0XM0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G9DwI647Fu5uYOETolO_oYJ0XM0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/lg5TDZJjrqU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/1517654205636524783/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-using-noteproperty-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1517654205636524783?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1517654205636524783?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/lg5TDZJjrqU/powershell-v2-using-noteproperty-to.html" title="Powershell (v2) - Using NoteProperty to Control Processing in Loop" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-using-noteproperty-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEGSHY8eSp7ImA9WhRVE00.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-1084631095193618591</id><published>2012-01-11T09:57:00.000-08:00</published><updated>2012-01-11T09:57:09.871-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T09:57:09.871-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="[System.IO.Path]::GetFileNameWithoutExtension" /><category scheme="http://www.blogger.com/atom/ns#" term="$_.fullname" /><category scheme="http://www.blogger.com/atom/ns#" term="dir" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Rename-Item" /><title>Powershell (v2) - Changing File Extensions on All Files in a Folder</title><content type="html">In a current work project we had a customer send us a ton of .tif images without extensions.  After viewing the files binary data, I was able to identify they were in fact .tif files.  To add extensions to these files I went searching for a script to help.  After some hunting I ran across a PowerTip that got the job done.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://powershell.com/cs/blogs/tips/archive/2010/08/11/bulk-changing-file-extensions.aspx"&gt;Bulk-Changing File Extensions&lt;/a&gt;&lt;/blockquote&gt;After hacking the source code to see the full command, I was able to work with it a bit. &amp;nbsp;In my own testing, I came up with this for my own specific needs:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;dir | % { Rename-Item $_.FullName ([System.IO.Path]::GetFileNameWithoutExtension($_.fullname) + ".tif")}&lt;/code&gt;&lt;/blockquote&gt;By using the &lt;code&gt;[System.IO.Path]::GetFileNameWithoutExtension()&lt;/code&gt; method you can simply chop off the extension and add whatever you like. &lt;br /&gt;
&lt;br /&gt;
To suggest another direction this could go: if you wanted to get more elaborate with this, you could add a switch when you are expected specific files with varying extensions. &amp;nbsp;By doing so, you could process a directory once and modify the extensions at once.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-1084631095193618591?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zMHqWuxlXQNwRWozVuWGlrrI1kY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zMHqWuxlXQNwRWozVuWGlrrI1kY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zMHqWuxlXQNwRWozVuWGlrrI1kY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zMHqWuxlXQNwRWozVuWGlrrI1kY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/p7PIXIfDiuc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/1084631095193618591/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-changing-file-extensions.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1084631095193618591?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/1084631095193618591?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/p7PIXIfDiuc/powershell-v2-changing-file-extensions.html" title="Powershell (v2) - Changing File Extensions on All Files in a Folder" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>2</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-changing-file-extensions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQGQ384eSp7ImA9WhRVE00.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-2480051518075260485</id><published>2012-01-11T08:45:00.000-08:00</published><updated>2012-01-11T08:45:22.131-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T08:45:22.131-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PoSH Server" /><category scheme="http://www.blogger.com/atom/ns#" term="web server" /><category scheme="http://www.blogger.com/atom/ns#" term="MVP" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell" /><category scheme="http://www.blogger.com/atom/ns#" term="Yusef Ozturk" /><title>Powershell - Project: PoSH Server (Powershell based web server)</title><content type="html">Powershell MVP Yusef Ozturk has been working on a new project call &lt;a href="http://www.poshserver.net/index.html"&gt;PoSH Server&lt;/a&gt;. &amp;nbsp;As noted in his site, PoSH Server is &lt;i&gt;"a secure, flexible and lightweight web server to meet your requirements.&lt;/i&gt;"  When I downloaded the project and examined the files I found a shockingly small set of files.  I expected there to be tons of code, and, it's anything but bloated.  He gives instructions on how to set it up (very simple) and is actively working on getting it further developed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-2480051518075260485?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Jb9aroTP7RdYICzPnopR4toCbvw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jb9aroTP7RdYICzPnopR4toCbvw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Jb9aroTP7RdYICzPnopR4toCbvw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jb9aroTP7RdYICzPnopR4toCbvw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/MFqSjhuxghs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/2480051518075260485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-project-posh-server.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/2480051518075260485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/2480051518075260485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/MFqSjhuxghs/powershell-project-posh-server.html" title="Powershell - Project: PoSH Server (Powershell based web server)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-project-posh-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIMQ3w4fCp7ImA9WhRVEkQ.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-6920675158622074436</id><published>2012-01-11T06:36:00.000-08:00</published><updated>2012-01-11T06:36:22.234-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T06:36:22.234-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Experts Exchange" /><category scheme="http://www.blogger.com/atom/ns#" term="-ExpandProperty Get-Acl" /><category scheme="http://www.blogger.com/atom/ns#" term="Chris Dent" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Select-Object" /><title>Powershell (v2) - Select-Object: -ExpandProperty</title><content type="html">This morning I was looking at an Experts Exchange article which had this command courtesy of Chris Dent,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-Acl $Target | Select-Object -ExpandProperty Access | ForEach-Object { $_.IdentityReference.Value } | Get-Unique&lt;/code&gt;&lt;/blockquote&gt;As I read through it I wanted to see exactly what this did, so, I went through the command piece by piece.  First, I did this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-Acl C:\test&lt;/code&gt;&lt;/blockquote&gt;It returned this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;    Directory: Microsoft.PowerShell.Core\FileSystem::C:\&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Path                                    Owner                                   Access&lt;br /&gt;
----                                    -----                                   ------&lt;br /&gt;
test                                    BUILTIN\Administrators                  BUILTIN\Administrators Allow  FullCo...&lt;/code&gt;&lt;/blockquote&gt;Next, I added the &lt;code&gt; | Select-Object access&lt;/code&gt; cmdlet to the pipeline.  It now showed&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Access&lt;br /&gt;
------&lt;br /&gt;
{System.Security.AccessControl.FileSystemAccessRule, System.Security.AccessControl.FileSystemAccessRule, System.Secu...&lt;/code&gt;&lt;/blockquote&gt;Great, I thought, another set of properties.  What I didn't realize is that I was going to finally figure out something I should have know months ago: the beauty of &lt;code&gt;-ExpandProperty&lt;/code&gt;.  When I added this new parameter I saw the light bulb click on:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-Acl C:\test | Select-Object -ExpandProperty Access&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FileSystemRights  : FullControl&lt;br /&gt;
AccessControlType : Allow&lt;br /&gt;
IdentityReference : BUILTIN\Administrators&lt;br /&gt;
IsInherited       : True&lt;br /&gt;
InheritanceFlags  : None&lt;br /&gt;
PropagationFlags  : None&lt;/code&gt;&lt;/blockquote&gt;Using &lt;code&gt;-ExpandProperty&lt;/code&gt; iterates through a collection of object members.  This only works if you are passing a collection to the &lt;code&gt;Select-Object&lt;/code&gt; cmdlet's &lt;code&gt;-ExpandProperty&lt;/code&gt; parameter.  For instance, the following will still return a single value,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;dir C:\test | Select-Object -ExpandProperty Name&lt;/code&gt;&lt;/blockquote&gt;because name is a deterministic property with a one-to-one mapping.  This is good to know because you can use &lt;code&gt;-ExpandProperty&lt;/code&gt; on an object that may have one or more member without fear of it blowing up if it only receives a singleton. &amp;nbsp;So instead of having to create some iteration code to enumeration this collection's members, just use&amp;nbsp;&lt;span style="font-family: monospace;"&gt;-ExpandProperty&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-6920675158622074436?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HC01ES1_Iv-KJKxV_Jka3thuTGc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HC01ES1_Iv-KJKxV_Jka3thuTGc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HC01ES1_Iv-KJKxV_Jka3thuTGc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HC01ES1_Iv-KJKxV_Jka3thuTGc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/dxbZY2cfG7o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/6920675158622074436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-select-object.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6920675158622074436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6920675158622074436?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/dxbZY2cfG7o/powershell-v2-select-object.html" title="Powershell (v2) - Select-Object: -ExpandProperty" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-select-object.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UHQXY4fCp7ImA9WhRVEkg.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5745525401903409435</id><published>2012-01-10T21:20:00.000-08:00</published><updated>2012-01-10T21:20:30.834-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-10T21:20:30.834-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="-Path" /><category scheme="http://www.blogger.com/atom/ns#" term="New-Item" /><category scheme="http://www.blogger.com/atom/ns#" term="Where-Object" /><category scheme="http://www.blogger.com/atom/ns#" term="get-childitem" /><category scheme="http://www.blogger.com/atom/ns#" term="Directory" /><category scheme="http://www.blogger.com/atom/ns#" term="ForEach-Object" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Split-Path" /><category scheme="http://www.blogger.com/atom/ns#" term="$_.PSIsContainer" /><category scheme="http://www.blogger.com/atom/ns#" term="leaf" /><title>Powershell (v2) - Create New Folders and Move Files to Folders Based on File Names</title><content type="html">To solve an issue at work with some zip files in a folder, I needed to create new folders based on the .zip file names, then, once the new folders had been created, copy the .zip file to the newly named folder.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;foreach($zip in ( Get-ChildItem 'C:\zipfiles' | Where {(-not $_.PSIsContainer) -and &amp;nbsp;(-not $_.PSIsContainer)})) {&lt;br /&gt;
&amp;nbsp; New-Item -Path (Split-Path $zip.fullname) -Name (Split-Path $zip.fullname -Leaf).ToString().Replace(".zip","") -ItemType Directory&lt;br /&gt;
&amp;nbsp; Copy-Item -Path $zip.fullname -Destination "$(Split-Path $zip.fullname)\$((Split-Path $zip.fullname -Leaf).ToString().Replace('.zip',''))"&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;Above is the script I used to accomplish this. &amp;nbsp;Below is the breakdown of how it works. &amp;nbsp;First, start by gathering a collection of zip file names. &amp;nbsp;The command,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-ChildItem 'C:\zipfiles' | Where {(-not $_.PSIsContainer) -and &amp;nbsp;(-not $_.PSIsContainer)}&lt;/code&gt;&lt;/blockquote&gt;excludes folders, and, returns only .zip files. &amp;nbsp;The Foreach-Object loop iterates the collection into a variable named $zip. &amp;nbsp;Once the loop starts going over the collection it creates a New-Item, in this case, a Directory, with this command.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;New-Item -Path (Split-Path $zip.fullname) -Name (Split-Path $zip.fullname -Leaf).ToString().Replace(".zip","") -ItemType Directory&lt;/code&gt;&lt;/blockquote&gt;This command has several parts:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;New-Item: creates a new item&lt;/li&gt;
&lt;li&gt;-Path: specifies the path to the new object&lt;/li&gt;
&lt;li&gt;(Split-Path $zip.fullname): returns the file path the file in the current iteration. In this case, we want the folderpath, not the file name&lt;/li&gt;
&lt;li&gt;-Name: Specifies the name of the folder to create&lt;/li&gt;
&lt;li&gt;(Split-Path $zip.fullname -Leaf).ToString().Replace(".zip",""): returns to the -Leaf (file name) of the $zip file currently being processed. &amp;nbsp;It then converts the object to a string object, and, replaces .zip with nothing.&lt;/li&gt;
&lt;li&gt;-ItemType: Directory specifies the object type to create. &amp;nbsp;In this case, a folder&lt;/li&gt;
&lt;/ul&gt;The second line of the command copies the zip file to the newly named folder,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Copy-Item -Path $zip.fullname -Destination "$(Split-Path $zip.fullname)\$((Split-Path $zip.fullname -Leaf).ToString().Replace('.zip',''))"&lt;/code&gt;&lt;/blockquote&gt;and has a similar number of parts:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Copy-Item: copies the item specified by the parameters&lt;/li&gt;
&lt;li&gt;-Path: the path to the source object&lt;/li&gt;
&lt;li&gt;$zip.fullname: the full path the current object&lt;/li&gt;
&lt;li&gt;-Destination: the place the object is being copied to&lt;/li&gt;
&lt;li&gt;"$(Split-Path $zip.fullname)\$((Split-Path $zip.fullname -Leaf).ToString().Replace('.zip',''))": this has several parts, so, I'll break them down, one by one:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;double quotes: forces the contents to be evaluated. If I had used single quotes, it would be a literal. By using double quotes, Powershell parses the string looking for special characters.&lt;/li&gt;
&lt;li&gt;$(Split-Path $zip.fullname): This notation forces the contents, Split-Path $zip.fullname to be evaluated. &amp;nbsp;In this case, we want it to execute to return the path portion of the object $zip.fullname. &amp;nbsp;The way to do this here is $().&lt;/li&gt;
&lt;li&gt;As above, Split-Path $zip.fullname returns the path to the current object&lt;/li&gt;
&lt;li&gt;\: this simply acts as a way to join the folder path and the file name. Another way to do thing would be to do Join-Path -Path -ChildPath. &amp;nbsp;The \ is automatically inferred between the two objects.&lt;/li&gt;
&lt;li&gt;$((Split-Path $zip.fullname -Lead).ToString().Replace('.zip','')): There are, again, several parts. &amp;nbsp;I'll break them down as well.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;The $(), again, represents a forced evaulation.&lt;/li&gt;
&lt;li&gt;The first part, (Split-Path $zip.fullname -Leaf), similar to what is shown above, returns the file name when you specify the -Leaf switch. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;.ToString() allows the .System.String.Replace() method to be called. &amp;nbsp;Otherwise, I would get an error by trying to access a .Replace() method on a File object which does not exist.&lt;/li&gt;
&lt;li&gt;.Replace('.zip',''): this causes the file extension, .zip, to be replaced with nothing. &amp;nbsp;If we didn't do this, we'd have folders named after .zip files, instead of, as we want, the folder names to match the file names.&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;As I indicated earlier, there's a lot packed into this little script. &amp;nbsp;But, it allows a lot to get done with very little work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5745525401903409435?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zpjmZyeVkFapkchTH9el91rbkew/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zpjmZyeVkFapkchTH9el91rbkew/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zpjmZyeVkFapkchTH9el91rbkew/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zpjmZyeVkFapkchTH9el91rbkew/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/-8gSM9_gL0I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5745525401903409435/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-create-new-folders-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5745525401903409435?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5745525401903409435?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/-8gSM9_gL0I/powershell-v2-create-new-folders-and.html" title="Powershell (v2) - Create New Folders and Move Files to Folders Based on File Names" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-create-new-folders-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8HRXw_eyp7ImA9WhRVEkQ.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-8134473886913920986</id><published>2012-01-10T20:44:00.000-08:00</published><updated>2012-01-11T06:40:34.243-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-11T06:40:34.243-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Get-WmiObject" /><category scheme="http://www.blogger.com/atom/ns#" term="IIS" /><category scheme="http://www.blogger.com/atom/ns#" term="-Class" /><category scheme="http://www.blogger.com/atom/ns#" term="-Recurse" /><category scheme="http://www.blogger.com/atom/ns#" term="-ExcludeProperty" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Name" /><category scheme="http://www.blogger.com/atom/ns#" term="\\root" /><category scheme="http://www.blogger.com/atom/ns#" term="select" /><category scheme="http://www.blogger.com/atom/ns#" term="Invalid Namespace" /><category scheme="http://www.blogger.com/atom/ns#" term="__namespace" /><title>Powershell (v2) - IIS : Find Redirects on IIS 7</title><content type="html">While perusing the Technet forums, I saw Marco Shaw reply to a post&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/ea169019-6922-4bd1-b2a3-f028d34d37c6"&gt;List HTTP redirects&lt;/a&gt;&lt;/blockquote&gt;indicating a way to locate Redirects in IIS 7 from Experts Exchange,&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_26495980.html"&gt;Powershell or vb script that finds the value in the Redirect To: field in IIS 6?&lt;/a&gt;&lt;/blockquote&gt;Within the post, this comment is made,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-WmiObject IIsWebVirtualDirSetting -Namespace root\MicrosoftIIsV2 -Filter "HttpRedirect&amp;lt;&amp;gt;''" `&lt;br /&gt;
-Authentication PacketPrivacy -Computer TheWebServer |&lt;br /&gt;
Select-Object Name, HttpRedirect&lt;/code&gt;&lt;/blockquote&gt;Yet, when I tried that, simply by changing the computer name, it didn't run.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;code&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Get-WmiObject : Invalid namespace&lt;br /&gt;
At line:1 char:14&lt;br /&gt;
+ Get-WmiObject &amp;lt;&amp;lt;&amp;lt;&amp;lt;  IIsWebVirtualDirSetting -Namespace root\MicrosoftIIsV2 -Filter "HttpRedirect&amp;lt;&amp;gt;''" `&lt;br /&gt;
+ CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException&lt;br /&gt;
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/blockquote&gt;When I decided to look at the namespaces again I found this namespace was not present. &amp;nbsp;As outlined in this post,&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/wmi-discovery-using-powershell.aspx"&gt;WMI Discovery using PowerShell&lt;/a&gt;&lt;/blockquote&gt;You can peruse a namespace, in this case, \\Root, to see what's available. &amp;nbsp;To do this, I used this approach at first:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-WmiObject -Namespace root -Class __Namespace -Recurse&lt;/code&gt;&lt;/blockquote&gt;When I ran this, it returned all of the properties, many of which are simply internal classes (those prefixed with __).&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;__GENUS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 2&lt;br /&gt;
__CLASS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __NAMESPACE&lt;br /&gt;
__SUPERCLASS &amp;nbsp; &amp;nbsp; : __SystemClass&lt;br /&gt;
__DYNASTY &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __SystemClass&lt;br /&gt;
__RELPATH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: __NAMESPACE.Name="subscription"&lt;br /&gt;
__PROPERTY_COUNT : 1&lt;br /&gt;
__DERIVATION &amp;nbsp; &amp;nbsp; : {__SystemClass}&lt;br /&gt;
__SERVER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : MYSERVER&lt;br /&gt;
__NAMESPACE &amp;nbsp; &amp;nbsp; &amp;nbsp;: ROOT&lt;br /&gt;
__PATH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : \\ MYSERVER&amp;nbsp;\ROOT:__NAMESPACE.Name="subscription"&lt;br /&gt;
Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : subscription&lt;/code&gt;&lt;/blockquote&gt;After I ran this tweaked command (as outlined in my post on the Win32_Account class) by using the -ExcludeProperty parameter of the Select-Object cmdlet to disregard the system properties.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-WmiObject -Namespace root -Class __Namespace -Recurse | select * -ExcludeProperty "__*"&lt;/code&gt;&lt;/blockquote&gt;&amp;nbsp;This way I get a lot more info:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Name&lt;br /&gt;
Scope&lt;br /&gt;
Path&lt;br /&gt;
Options&lt;br /&gt;
ClassPath&lt;br /&gt;
Properties&lt;br /&gt;
SystemProperties&lt;br /&gt;
Qualifiers&lt;br /&gt;
Site&lt;br /&gt;
Container&lt;/code&gt;&lt;/blockquote&gt;Going back to the Name search I get this list:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-WmiObject -Namespace root -Class __Namespace -Recurse | select Name -ExcludeProperty "__*"&lt;br /&gt;
&lt;br /&gt;
Name&lt;br /&gt;
----&lt;br /&gt;
subscription&lt;br /&gt;
DEFAULT&lt;br /&gt;
CIMV2&lt;br /&gt;
Cli&lt;br /&gt;
nap&lt;br /&gt;
MicrosoftNLB&lt;br /&gt;
SECURITY&lt;br /&gt;
snmp&lt;br /&gt;
RSOP&lt;br /&gt;
WebAdministration&lt;br /&gt;
WMI&lt;br /&gt;
directory&lt;br /&gt;
Policy&lt;br /&gt;
Interop&lt;br /&gt;
Hardware&lt;br /&gt;
ServiceModel&lt;br /&gt;
Microsoft&lt;br /&gt;
aspnet&lt;/code&gt;&lt;/blockquote&gt;Before anyone else could get an answer, the original poster found their own answer:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$root = "IIS:\Sites\website"&lt;br /&gt;
$all = get-childitem($root)&lt;br /&gt;
$all | foreach {&lt;br /&gt;
$fold_name = $_.name&lt;br /&gt;
$cur_path = "$root" + "\" + "$fold_name"&lt;br /&gt;
$enable = (get-webconfigurationproperty -filter /system.webserver/httpRedirect -PSPath "$cur_path"-name enabled).value&lt;br /&gt;
If ($enable -eq $true) {&lt;br /&gt;
$dest = (get-webconfigurationproperty -filter /system.webserver/httpRedirect -PSPath "$cur_path"-name destination).value&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-8134473886913920986?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5yzQ4Bp0B8D_Ey4ww6tRn4CvqSY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5yzQ4Bp0B8D_Ey4ww6tRn4CvqSY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5yzQ4Bp0B8D_Ey4ww6tRn4CvqSY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5yzQ4Bp0B8D_Ey4ww6tRn4CvqSY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/ued3lHcGm6Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/8134473886913920986/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-iis-find-redirects-on-iis.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8134473886913920986?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8134473886913920986?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/ued3lHcGm6Y/powershell-v2-iis-find-redirects-on-iis.html" title="Powershell (v2) - IIS : Find Redirects on IIS 7" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-iis-find-redirects-on-iis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQMSHw-fSp7ImA9WhRVEU4.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-8358930373708584698</id><published>2012-01-09T09:08:00.000-08:00</published><updated>2012-01-09T11:13:09.255-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-09T11:13:09.255-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="-Path" /><category scheme="http://www.blogger.com/atom/ns#" term="-not" /><category scheme="http://www.blogger.com/atom/ns#" term="New-Item" /><category scheme="http://www.blogger.com/atom/ns#" term="[System.IO.Directory]::Exists" /><category scheme="http://www.blogger.com/atom/ns#" term="Out-Null" /><category scheme="http://www.blogger.com/atom/ns#" term="-ItemType" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-Date -Format" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="if" /><category scheme="http://www.blogger.com/atom/ns#" term="$profile.AllHostsAllUsers" /><category scheme="http://www.blogger.com/atom/ns#" term="Start-Transcript" /><category scheme="http://www.blogger.com/atom/ns#" term="Split-Path" /><title>Powershell - Using Transcript Cmdlets to Ensure All Host Interaction is Captured</title><content type="html">I can't even count how many times I have worked on something and realized, after I closed a session, "I should have recorded what I did." &amp;nbsp;Either some train of thought could not be reproduced or I simply found something clever and couldn't do it again if I tried. &amp;nbsp;While listening to Ed Wilson on last week's Thursday Powershell session he commented on something which gave me the idea to add something to my $profile to automatically generate logs when the session starts. &amp;nbsp;After thinking about it a bit I came up with this snippet in my AllUsersAllHosts profile:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;#region Configure automatic logging for all hosts&lt;br /&gt;
&lt;br /&gt;
$logpath = "C:\logs\powershell\$(Get-Date -Format "`yyyyMMdd_hhmmss`").log"&lt;br /&gt;
&lt;br /&gt;
if( -not ([System.IO.Directory]::Exists((Split-Path -Path $logpath)))) {&lt;br /&gt;
New-Item -Path (Split-Path -Path $logpath) -ItemType Directory | Out-Null&lt;br /&gt;
}&lt;br /&gt;
Start-Transcript -Path $logpath -Force | Out-null&lt;br /&gt;
&lt;br /&gt;
#endregion Configure automatic logging for all hosts&lt;/code&gt;&lt;/blockquote&gt;To easily access this file, if it exists, you can use this command from within Powershell:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;notepad $profile.AllHostsAllUsers&lt;/code&gt;&lt;/blockquote&gt;This will throw notify you if the file does not exist only after you open the file. When you attempt to save it, you are forced to renavigate to the path during the save command.  I will write up a little script to automate this as well with a quick check before opening the command.  Another nice addition for the &lt;code&gt;$profile&lt;/code&gt; management module I'm working on.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;EDIT&lt;/b&gt;&lt;/u&gt;: After I posted some extra details came to mind which should go in the file name. I added the host name (what is running Powershell) annd the username (the account) to the logfile name. &amp;nbsp;This way, it's much easier to track whose logs correspond with which hosts.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$logpath = "C:\logs\powershell\$((Get-Host).Name)_$($env:USERNAME)_$(Get-Date -Format "`yyyyMMdd_hhmmss`").log"&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-8358930373708584698?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ysJizJ5u2r65_DBnY5iWavtgg78/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysJizJ5u2r65_DBnY5iWavtgg78/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ysJizJ5u2r65_DBnY5iWavtgg78/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ysJizJ5u2r65_DBnY5iWavtgg78/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/B1lTtuM57Yg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/8358930373708584698/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-using-transcript-cmdlets-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8358930373708584698?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8358930373708584698?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/B1lTtuM57Yg/powershell-using-transcript-cmdlets-to.html" title="Powershell - Using Transcript Cmdlets to Ensure All Host Interaction is Captured" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-using-transcript-cmdlets-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AHR3Y8eSp7ImA9WhRVEU8.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-4187280308889889429</id><published>2012-01-09T08:15:00.000-08:00</published><updated>2012-01-09T08:15:36.871-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-09T08:15:36.871-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Where" /><category scheme="http://www.blogger.com/atom/ns#" term="Wildcards" /><category scheme="http://www.blogger.com/atom/ns#" term="#" /><category scheme="http://www.blogger.com/atom/ns#" term="LIKE" /><category scheme="http://www.blogger.com/atom/ns#" term="groups" /><category scheme="http://www.blogger.com/atom/ns#" term="FROM" /><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL" /><category scheme="http://www.blogger.com/atom/ns#" term="select" /><category scheme="http://www.blogger.com/atom/ns#" term="[]" /><category scheme="http://www.blogger.com/atom/ns#" term="brackets" /><title>T-SQL - Searching for Wildcard Characters as Literals with LIKE</title><content type="html">If you work with T-SQL long enough you will run into wildcards. &lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms179859.aspx"&gt;LIKE (Transact-SQL)&lt;/a&gt;&lt;/blockquote&gt;Now, wildcards are great. &amp;nbsp;They allow you to find all sorts of things in SQL very easily, with minimal typing, and, work. &amp;nbsp;However, if you want to search against a wildcard, it takes a different approach. &amp;nbsp;This trick came to me via this post,&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://sqlserver2000.databases.aspfaq.com/how-do-i-search-for-special-characters-e-g-in-sql-server.html"&gt;How do I search for special characters (e.g. %) in SQL Server?&lt;/a&gt;&lt;/blockquote&gt;In my case, I was running a search for a field that started with a pound sign, like this, #Report 114. &amp;nbsp;If I ran this query it returned no results,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;SELECT *&lt;br /&gt;
FROM Reports&lt;br /&gt;
WHERE Name LIKE '#%'&lt;/code&gt;&lt;/blockquote&gt;However, if I wrap the character that would normally be interpreted as a wildcard in brackets, [], I can perform the search as if the pound sign is a literal, not a wildcard. &amp;nbsp;It would look like this,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;SELECT *&lt;br /&gt;
FROM Reports&lt;br /&gt;
WHERE Name LIKE '[#]%'&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-4187280308889889429?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KyLhVSvpOfz-64A1prkL9xKlK4M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KyLhVSvpOfz-64A1prkL9xKlK4M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KyLhVSvpOfz-64A1prkL9xKlK4M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KyLhVSvpOfz-64A1prkL9xKlK4M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/Wnkray5SjT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/4187280308889889429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/t-sql-searching-for-wildcard-characters.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/4187280308889889429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/4187280308889889429?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/Wnkray5SjT8/t-sql-searching-for-wildcard-characters.html" title="T-SQL - Searching for Wildcard Characters as Literals with LIKE" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/t-sql-searching-for-wildcard-characters.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIARn8yfSp7ImA9WhRWGUg.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-5232261834296518427</id><published>2012-01-07T08:25:00.000-08:00</published><updated>2012-01-07T08:25:47.195-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-07T08:25:47.195-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Powershell v2" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-Verb" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-Command" /><category scheme="http://www.blogger.com/atom/ns#" term="-Module" /><category scheme="http://www.blogger.com/atom/ns#" term="Best Practices" /><title>Powershell (v2) - Getting Module Members</title><content type="html">As I work through some module definitions on my &lt;code&gt;Base.psm1&lt;/code&gt; module I have encountered a few warnings,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;PS &amp;gt; Import-Module Base&lt;br /&gt;
WARNING: Some imported command names include unapproved verbs which might make them less discoverable. &amp;nbsp;Use the Verbose&lt;br /&gt;
&amp;nbsp;parameter for more detail or type Get-Verb to see the list of approved verbs&lt;/code&gt;&lt;/blockquote&gt;To try and figure out which verbs I was having issues with I went to the approved list of verbs and checked out each one to find the offenders using this command to list my basic command set,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;PS &amp;gt; Get-Command -Module Base&lt;br /&gt;
CommandType &amp;nbsp; &amp;nbsp; Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Definition&lt;br /&gt;
----------- &amp;nbsp; &amp;nbsp; ---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;----------&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Add-NetworkingHostsEntry &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Copy-IOFile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Copy-IOFolder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Create-IISAppPool &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Create-IOFile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Create-IOFolder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Alias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ifum &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Import-UtilityModules&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Import-UtilityModules &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Remove-IOFile &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Remove-IOFolder &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Test-IISAppPoolExists &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Test-IISAppPoolIsStarted &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Test-IOFileExists &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Test-IOFolderExists &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Validate-IISWebApplication &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
Alias &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wfudt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Write-UtilityDateTime&lt;br /&gt;
Function &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Write-UtilityDateTime &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;/code&gt;&lt;/blockquote&gt;Once I had my command set I was able to check each verb out.&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;PS &amp;gt; get-verb create&lt;br /&gt;
PS &amp;gt; get-verb import&lt;br /&gt;
Verb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Group&lt;br /&gt;
---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-----&lt;br /&gt;
Import &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Data&lt;br /&gt;
PS &amp;gt; get-verb test&lt;br /&gt;
Verb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Group&lt;br /&gt;
---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-----&lt;br /&gt;
Test &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Diagnostic&lt;br /&gt;
PS &amp;gt; get-verb validate&lt;br /&gt;
PS &amp;gt; get-verb write&lt;br /&gt;
Verb &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Group&lt;br /&gt;
---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-----&lt;br /&gt;
Write &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Communications&lt;/code&gt;&lt;/blockquote&gt;To automate this further, I used this approach:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;# Clear screen&lt;br /&gt;
cls&lt;br /&gt;
&lt;br /&gt;
# Variables&lt;br /&gt;
$validatedverbs = @{};&lt;br /&gt;
&lt;br /&gt;
# Gather verbs&lt;br /&gt;
$verbs = Get-Command -Module Base -CommandType Function | `&lt;br /&gt;
ForEach-Object { $_.Name.ToString().Split("-")[0] } | `&lt;br /&gt;
Select-Object -Unique;&lt;br /&gt;
&lt;br /&gt;
# Test verbs for validity&lt;br /&gt;
foreach($verb in $verbs) {&lt;br /&gt;
&amp;nbsp; if((Get-Verb -verb $verb) -eq $null) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $validatedverbs.Add($verb, $false);&lt;br /&gt;
&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $validatedverbs.Add($verb, $true);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$validatedverbs.GetEnumerator() | Sort-Object -Property Key&lt;/code&gt;&lt;/blockquote&gt;When I run it I get this clear list of what functions are not on the common verb list,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Value &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
---- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ----- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Add &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Copy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Create &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; False &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Import &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Remove &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Test &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Validate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; False &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Wacky &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;False &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Write &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;True &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-5232261834296518427?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-nZrVxKQjM7d_X23B71t4_LvGpQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-nZrVxKQjM7d_X23B71t4_LvGpQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-nZrVxKQjM7d_X23B71t4_LvGpQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-nZrVxKQjM7d_X23B71t4_LvGpQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/Rrdz7pia4ZU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/5232261834296518427/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-getting-module-members.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5232261834296518427?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/5232261834296518427?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/Rrdz7pia4ZU/powershell-v2-getting-module-members.html" title="Powershell (v2) - Getting Module Members" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>2</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-getting-module-members.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIMQ3s6eip7ImA9WhRWGU8.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-6695533887915122757</id><published>2012-01-07T00:21:00.000-08:00</published><updated>2012-01-07T00:23:02.512-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-07T00:23:02.512-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="[Alias)]" /><category scheme="http://www.blogger.com/atom/ns#" term="-parameter" /><title>Powershell (v2) - Parameter Aliases</title><content type="html">To help speed things up when working with functions you can alias long, unwieldy, or, just plain painful Parameter names.  Accomplishing this can be as simple as adding,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;[Alias("youralias")]&lt;/code&gt;&lt;/blockquote&gt;to your function &lt;code&gt;param&lt;/code&gt; definition.  For example, I am adding a &lt;code&gt;parameter&lt;/code&gt; named &lt;code&gt;"t"&lt;/code&gt; to my &lt;code&gt;function test&lt;/code&gt; below:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;function Test {&lt;br /&gt;
&amp;nbsp; param(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [Alias("t")]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $test&lt;br /&gt;
&amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; return $test;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Test -T 1&lt;/code&gt;&lt;/blockquote&gt;When I run this I simply get back &lt;code&gt;1&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-6695533887915122757?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rQlIJY43vohXgAQGALujtsPKksw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rQlIJY43vohXgAQGALujtsPKksw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rQlIJY43vohXgAQGALujtsPKksw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rQlIJY43vohXgAQGALujtsPKksw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/P1pyBONtF1U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/6695533887915122757/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-parameter-aliases.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6695533887915122757?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/6695533887915122757?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/P1pyBONtF1U/powershell-parameter-aliases.html" title="Powershell (v2) - Parameter Aliases" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-parameter-aliases.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcHQXo4fSp7ImA9WhRWGEo.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-4066480786348176947</id><published>2012-01-06T09:47:00.000-08:00</published><updated>2012-01-06T09:47:10.435-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-06T09:47:10.435-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Remove-Item" /><category scheme="http://www.blogger.com/atom/ns#" term=".Remove()" /><category scheme="http://www.blogger.com/atom/ns#" term="dir ." /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><title>Powershell (v2) - Remove-Item (Passing Collections to Cmdlet)</title><content type="html">After working to get some quick file generation script, I added on this one to delete files quickly as a collection:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$files = dir .;&lt;br /&gt;
$files | Remove-Item&lt;/code&gt;&lt;/blockquote&gt;I noted on Twitter that a cool hack would be doing something like this:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$files = dir .;&lt;br /&gt;
$files.Remove()&lt;/code&gt;&lt;/blockquote&gt;Or, to shorten it up even more:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;(dir .).Remove();&lt;/code&gt;&lt;/blockquote&gt;Ah, the power of imagination.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-4066480786348176947?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UEBLmlY6QoEiwwizQI0ORdy58kM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UEBLmlY6QoEiwwizQI0ORdy58kM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UEBLmlY6QoEiwwizQI0ORdy58kM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UEBLmlY6QoEiwwizQI0ORdy58kM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/Fv1OcmHDVUE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/4066480786348176947/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-remove-item-passing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/4066480786348176947?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/4066480786348176947?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/Fv1OcmHDVUE/powershell-v2-remove-item-passing.html" title="Powershell (v2) - Remove-Item (Passing Collections to Cmdlet)" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-remove-item-passing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8FR38-cCp7ImA9WhRWGEs.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-7789271861777709781</id><published>2012-01-06T08:20:00.000-08:00</published><updated>2012-01-06T08:20:16.158-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-06T08:20:16.158-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="get-member" /><category scheme="http://www.blogger.com/atom/ns#" term="WMI Class Definitions" /><category scheme="http://www.blogger.com/atom/ns#" term="Get-WmiObject" /><category scheme="http://www.blogger.com/atom/ns#" term="-Class" /><category scheme="http://www.blogger.com/atom/ns#" term="Win32_LogicalDisk" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><category scheme="http://www.blogger.com/atom/ns#" term="Select-Object" /><category scheme="http://www.blogger.com/atom/ns#" term="Meta_Class" /><title>Powershell (v2) - Get-WmiObject: Get Class Definitions</title><content type="html">My past exploits have led me to become much more familiar with WMI than I had ever hoped to be. &amp;nbsp;As a result, I know how to get around the information provided by WMI pretty well. &amp;nbsp;Yet, this morning, I needed to figure out how large a given field for the &lt;code&gt;Win32_LogicalDisk&lt;/code&gt; Description property could be and wasn't quite sure how to do it with Powershell. &amp;nbsp;I tried a few approaches (listed below), but, none of them worked. &amp;nbsp;You can walk through each to see what it returned as an exercise:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;code&gt;Get-WmiObject -Class Win32_LogicalDisk | select *&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -Class Win32_LogicalDisk | Get-Member&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -Class Win32_LogicalDisk | Get-Member | select *&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -Class Win32_LogicalDisk | Get-Member | select * | ft -auto&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -Class Win32_LogicalDisk | Get-Member | select * | Format-Wide&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -list win32_logicaldisk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -class Win32_LogicalDisk | Get-Member -name Description&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Get-WmiObject -class Win32_LogicalDisk | Get-Member -name Description | select *&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;At this point I decided to go a different route and look at the class definition itself. This link,&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;&lt;a href="http://www.codeproject.com/KB/system/WQLByExample.aspx"&gt;http://www.codeproject.com/KB/system/WQLByExample.aspx&lt;/a&gt;&lt;/blockquote&gt;helped me get the right query to figure out how to do that. &amp;nbsp;The &lt;code&gt;meta_class&lt;/code&gt; object had escaped memory. &amp;nbsp;Once I had the appropriate reference&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Get-WmiObject -Query "select * from meta_class where __Class = 'Win32_LogicalDisk'"&lt;/code&gt;&lt;/blockquote&gt;As noted in the article,&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;Schema queries are used to get information about WMI itself and its structure.&lt;/i&gt;&lt;/blockquote&gt;To illustrate how to use this, the author gives and example,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;Select * From Meta_Class &lt;/code&gt;&lt;/blockquote&gt;and explains,&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;This is the most basic schema query. You can connect to any WMI namespace and use this query to get all the classes present in it. &lt;code&gt;Meta_Class&lt;/code&gt; is a meta class used only in schema queries.&lt;/i&gt;&lt;/blockquote&gt;There are several other directions I could go with this, but, I don't want to get too far off into WMI details.  When you run the query listed above to gather &lt;code&gt;__Class&lt;/code&gt; details for &lt;code&gt;Win32_LogicalDisk&lt;/code&gt; it returns specific properties and class definitions for each property.  Here is my walkthrough to get the specific properties and their definitions:&lt;br /&gt;
&lt;blockquote style="background-color: blue; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;code&gt;&lt;span style="color: white;"&gt;PS &amp;gt; Get-WmiObject -Query "select * from meta_class where __Class = 'Win32_LogicalDisk'"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; NameSpace: ROOT\cimv2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name                                Methods              Properties&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; ----                                -------              ----------&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Win32_LogicalDisk                   {SetPowerState, R... {Access, Availability, BlockSize, Caption...}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; PS &amp;gt; $Win32_LogicalDisk = Get-WmiObject -Query "select * from meta_class where __Class = 'Win32_LogicalDisk'"&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; PS &amp;gt; $Win32_LogicalDisk.__CLASS&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; PS &amp;gt; $Win32_LogicalDisk | % {$_}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; NameSpace: ROOT\cimv2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name                                Methods              Properties&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; ----                                -------              ----------&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Win32_LogicalDisk                   {SetPowerState, R... {Access, Availability, BlockSize, Caption...}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; PS &amp;gt; &lt;/span&gt;&lt;span style="color: red;"&gt;&lt;b&gt;$Win32_LogicalDisk | % {$_.Properties}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Access&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt16&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_StorageExtent&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Availability&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt16&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read, ValueMap}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : BlockSize&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt64&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_StorageExtent&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Caption&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_ManagedSystemElement&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MaxLen, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Compressed&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ConfigManagerErrorCode&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt32&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read, ValueMap}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ConfigManagerUserConfig&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : CreationClassName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIM_Key, CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Description&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_ManagedSystemElement&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : DeviceID&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIM_Key, CIMTYPE, key, MappingStrings...}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : DriveType&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt32&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ErrorCleared&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ErrorDescription&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ErrorMethodology&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_StorageExtent&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : FileSystem&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : FreeSpace&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt64&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : InstallDate&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : DateTime&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_ManagedSystemElement&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : LastErrorCode&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt32&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : MaximumComponentLength&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt32&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : MediaType&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt32&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Name&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_ManagedSystemElement&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : NumberOfBlocks&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt64&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_StorageExtent&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : PNPDeviceID&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : PowerManagementCapabilities&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt16&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : PowerManagementSupported&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : ProviderName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Purpose&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_StorageExtent&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : QuotasDisabled&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : QuotasIncomplete&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : QuotasRebuilding&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Size&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt64&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : Status&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_ManagedSystemElement&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MaxLen, read, ValueMap}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : StatusInfo&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : UInt16&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read, ValueMap}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : SupportsDiskQuotas&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : SupportsFileBasedCompression&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : SystemCreationClassName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIM_Key, CIMTYPE, Propagated, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : SystemName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : CIM_LogicalDevice&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIM_Key, CIMTYPE, Propagated, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : VolumeDirty&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : VolumeName&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read, write}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: white;"&gt; Name       : VolumeSerialNumber&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Value      :&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Type       : String&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsLocal    : True&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; IsArray    : False&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Origin     : Win32_LogicalDisk&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: white;"&gt; Qualifiers : {CIMTYPE, MappingStrings, read}&lt;/span&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-7789271861777709781?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gZwCDkfcXeET8RLkbDbgEHU8ZF0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gZwCDkfcXeET8RLkbDbgEHU8ZF0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gZwCDkfcXeET8RLkbDbgEHU8ZF0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gZwCDkfcXeET8RLkbDbgEHU8ZF0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/ntejvH83wN8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/7789271861777709781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-get-wmiobject-get-class.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/7789271861777709781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/7789271861777709781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/ntejvH83wN8/powershell-v2-get-wmiobject-get-class.html" title="Powershell (v2) - Get-WmiObject: Get Class Definitions" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-get-wmiobject-get-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YFQ3s_fyp7ImA9WhRWGE8.&quot;"><id>tag:blogger.com,1999:blog-7056707239581791643.post-8885050431331343852</id><published>2012-01-05T21:51:00.000-08:00</published><updated>2012-01-05T21:51:52.547-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-05T21:51:52.547-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="get-childitem" /><category scheme="http://www.blogger.com/atom/ns#" term="Test-path" /><category scheme="http://www.blogger.com/atom/ns#" term="-ne" /><category scheme="http://www.blogger.com/atom/ns#" term="Move-Item" /><category scheme="http://www.blogger.com/atom/ns#" term="for" /><category scheme="http://www.blogger.com/atom/ns#" term="Powershell (v2)" /><title>Powershell (v2) - Quick File/Folder Generation</title><content type="html">&lt;b&gt;&lt;u&gt;Problem&lt;/u&gt;&lt;/b&gt;: how do I quickly create bulk folders and/or files?&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Quick Answer&lt;/u&gt;&lt;/b&gt;: use a &lt;code&gt;for&lt;/code&gt; loop to repeat &lt;code&gt;New-Item&lt;/code&gt; and specify whether you want &lt;code&gt;File&lt;/code&gt; or &lt;code&gt;Directory&lt;/code&gt; in the &lt;code&gt;New-Item&lt;/code&gt; call.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Long Answer&lt;/u&gt;&lt;/b&gt;:&amp;nbsp;I often am in a hurry, and, to test things, don't have time to go create dummy files (or folders) for validation some data management script. &amp;nbsp;To quickly generate 100 files use this approach,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$path = "C:\testing\powershell\testfiles"&lt;br /&gt;
if((Test-Path $path) -ne $true) {&lt;br /&gt;
&amp;nbsp; for($i=1;$i -le 100;$i++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; New-Item -Path $path -Name "$i.txt" -ItemType File -Value $i -Force&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;This script will generate 100 files in just a few seconds, where each file has a numeric name (with .txt extension) and the value in the .txt file matches the name. &amp;nbsp;I use this in a pinch to have something I can manipulation where the test is really more about the file/folder management than the file content. &amp;nbsp;In short, I just need something, nothing really, to work with.&lt;br /&gt;
&lt;br /&gt;
To take this one step further, I wrote the following script to test out some folder/file management logic which I perfected in a post I made earlier today,&lt;br /&gt;
&lt;blockquote style="background-color: blue; border: 1px solid black; color: white; padding: 10px;"&gt;&lt;code&gt;$path = "C:\testing\powershell\testfiles"&lt;br /&gt;
if((Test-Path $path) -ne $true) {&lt;br /&gt;
for($i=1;$i -le 100;$i++) {&lt;br /&gt;
New-Item -Path $path -Name "$i.txt" -ItemType File -Value $i -Force&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Split files into subdirectories&lt;br /&gt;
$files = Get-ChildItem -Path $path | Where-Object {$_.PSIsContainer -ne $true};&lt;br /&gt;
for($i = 1; $i -lt (($files).Count); $i++) {&lt;br /&gt;
&amp;nbsp; $minifileset =  $files | Select-Object -First 10;&lt;br /&gt;
&amp;nbsp; $newpath = $files.fullname;&lt;br /&gt;
&amp;nbsp; New-Item -Path $newpath -Name $i -ItemType Container -Force;&lt;br /&gt;
&amp;nbsp; foreach($file in $minifileset) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; move $file.fullname "$newpath\$i"&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;The link I posted earlier can be found here,&lt;br /&gt;
&lt;blockquote&gt;&lt;a href="http://learningpcs.blogspot.com/2012/01/powershell-v2-splitting-up-very-large.html"&gt;Splitting up very large file sets into subfolders&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7056707239581791643-8885050431331343852?l=learningpcs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ruDcfyAAmoNhlnda1T8Zoy3cZfU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ruDcfyAAmoNhlnda1T8Zoy3cZfU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ruDcfyAAmoNhlnda1T8Zoy3cZfU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ruDcfyAAmoNhlnda1T8Zoy3cZfU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/QnDb/~4/cTlexKx1fTI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://learningpcs.blogspot.com/feeds/8885050431331343852/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://learningpcs.blogspot.com/2012/01/powershell-v2-quick-filefolder.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8885050431331343852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7056707239581791643/posts/default/8885050431331343852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/QnDb/~3/cTlexKx1fTI/powershell-v2-quick-filefolder.html" title="Powershell (v2) - Quick File/Folder Generation" /><author><name>Will</name><uri>http://www.blogger.com/profile/01117560353477755192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="11" src="http://3.bp.blogspot.com/_8P4y2XCCWQw/TCfUEIo5T1I/AAAAAAAAACM/RgpUHF7wZpA/S220/IMG_1285.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://learningpcs.blogspot.com/2012/01/powershell-v2-quick-filefolder.html</feedburner:origLink></entry></feed>

