PowerShell – Dispose()

You may be asking yourself “Why is that one script keeping all my RAMs?!”.

Maybe you should call the .Dispose() method on the variable to clean-up.

Another option is to use Remove-Variable .

References:
http://technet.microsoft.com/en-us/library/ff730962.aspx
http://msdn.microsoft.com/en-us/library/system.management.automation.powershell.dispose(v=vs.85).aspx

Linux Adventures With Debian

1 – Install your distro, I am using Debian NetInst and then adding in some XFCE. A nice Terminal command for some more info:

uname -a && cat /etc/*release

2 – Patch!:

apt-get update && apt-get upgrade -y

3 – Customize your Terminal (bash) prompt:

a. Yours:

/home/<username>/.bashrc

(Hidden Path) a.k.a.

~/.bashrc

b. The “root” account’s is located here:

/root/.bashrc

I used this: http://ezprompt.net/

4. Install some themes:

/usr/share/themes

5. More visuals: conky :

apt-get install conky-all

a. Custom conky files –

Your conky preferences are stored here:

/home/<username>/.conkyrc

Additional add-on files/scripts can be placed here (?):

/home/<username>/.conky

6. Adding/editing repos:

/etc/apt/sources.list

PowerShell – Workflows

Reference material:
http://technet.microsoft.com/en-us/library/jj134242.aspx
http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/26/powershell-workflows-the-basics.aspx

Import-Module PSWorkflow

workflow Test-WorkflowInline{
    InlineScript{
        $object = New-Object -TypeName PSObject
        $object | Add-Member -MemberType NoteProperty `
                -Name ExampleProperty `
                -Value 'Hello!'
        $object | Get-Member
    }
    # The $object variable no longer exists at this point as it has left the InlineScript block.
    #The below line fails if uncommented.
    # $object |Get-Member
}

workflow Test-WorkflowParallel{
    "This line will always run first!"
    parallel {
        "Command One."
        "Command Two."

        sequence{
            "Command Alpha."
            "Command Beta."
        }
    }
}

# Possible output from Test-WorkflowParallel:
# This line will always run first!
# Command One.
# Command Alpha.
# Command Beta.
# Command Two.