PowerShell

PowerShell : Compress files with Windows an improved version

English When I am looking for a way to compress file(s) into Zip, I find a blog from David Aiken here (Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget) . I will just focus on Add-Zip function and nothing more. Here is the original code: function Add-Zip { param(\[string\]$zipfilename) if(-not (test-path($zipfilename))) { set-content $zipfilename ("PK" + \[char\]5 + \[char\]6 + ("$(\[char\]0)" \* 18)) (dir $zipfilename).IsReadOnly = $false } $shellApplication = new-object -com shell.

PowerShell : Compress files with Windows an improved version

English When I am looking for a way to compress file(s) into Zip, I find a blog from David Aiken here (Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget) . I will just focus on Add-Zip function and nothing more. Here is the original code: function Add-Zip { param(\[string\]$zipfilename) if(-not (test-path($zipfilename))) { set-content $zipfilename ("PK" + \[char\]5 + \[char\]6 + ("$(\[char\]0)" \* 18)) (dir $zipfilename).IsReadOnly = $false } $shellApplication = new-object -com shell.

PowerShell : How to overcome double-hop problem in PowerShell remoting

PowerShell : Remote StsAdm using PowerShell | Ideas For Free - Aug 3, 2011 […] Remember my previous post about how to avoid double hop problem? (http://blog.libinuko.com/2011/04/29/powershell-how-to-overcome-double-hop-problem-in-powershell-remo...) . Now we will create new function that uses Invoke-RemoteCommand. Basically, we will construct […] Mike C - Jun 5, 2012 I am getting the error shown below: Invoke-RemoteCommand : A parameter cannot be found that matches parameter name ‘cmd’. PS C:\Users\myname> invoke-command -script { Invoke-RemoteCommand -cmd “powershell -noprofile -command ‘dir \\server1\d$‘” -username “domain\myname” -password “########” } At line:1 char:51 + invoke-command -script { Invoke-RemoteCommand -cmd <<<< ”powershell -noprofile -command ‘dir \\server1\d$‘” -use rname “domain\myname” -password “#####3!

PowerShell : How to overcome double-hop problem in PowerShell remoting

PowerShell : Remote StsAdm using PowerShell | Ideas For Free - Aug 3, 2011 […] Remember my previous post about how to avoid double hop problem? (http://blog.libinuko.com/2011/04/29/powershell-how-to-overcome-double-hop-problem-in-powershell-remo...) . Now we will create new function that uses Invoke-RemoteCommand. Basically, we will construct […] Mike C - Jun 5, 2012 I am getting the error shown below: Invoke-RemoteCommand : A parameter cannot be found that matches parameter name ‘cmd’. PS C:\Users\myname> invoke-command -script { Invoke-RemoteCommand -cmd “powershell -noprofile -command ‘dir \\server1\d$‘” -username “domain\myname” -password “########” } At line:1 char:51 + invoke-command -script { Invoke-RemoteCommand -cmd <<<< ”powershell -noprofile -command ‘dir \\server1\d$‘” -use rname “domain\myname” -password “#####3!

PowerShell : How to overcome double-hop problem in PowerShell remoting

English: I am interesting to the PowerShell remoting topic from PowerShell Cookbook Chapter 29 here (http://www.pavleck.net/powershell-cookbook/ch29.html). In order to solve double-hop problem, it uses schedule task. The sample create schedule task to Enable-PSRemoting in remote machine. But don’t you think we need something more generic to overcome double-hop problem? PowerShell offers Enable-WSManCredSSP or Kerberos so that the process can delegates the credential to execute next-hop process. However, CredSSP is only available on Windows 7 and above.

PowerShell : How to overcome double-hop problem in PowerShell remoting

English: I am interesting to the PowerShell remoting topic from PowerShell Cookbook Chapter 29 here (http://www.pavleck.net/powershell-cookbook/ch29.html). In order to solve double-hop problem, it uses schedule task. The sample create schedule task to Enable-PSRemoting in remote machine. But don’t you think we need something more generic to overcome double-hop problem? PowerShell offers Enable-WSManCredSSP or Kerberos so that the process can delegates the credential to execute next-hop process. However, CredSSP is only available on Windows 7 and above.

SharePoint 2010: How to change rating icons

[Yuva]( “yuva.jeeva@gmail.com”) - Dec 3, 2010 Thanks for the clue dude. It saved me a lot of work. [cakriwut]( “cakriwut@gmail.com”) - Dec 3, 2010 You’re welcome. -:D

SharePoint 2010: How to change rating icons

[Yuva]( “yuva.jeeva@gmail.com”) - Dec 3, 2010 Thanks for the clue dude. It saved me a lot of work. [cakriwut]( “cakriwut@gmail.com”) - Dec 3, 2010 You’re welcome. -:D

SharePoint 2010: How to change rating icons

English: Sometimes you may received a request to change rating icons, from a normal star to a love icon. So, how would you do it? Figure 1. Original rating icons Figure 2. Modified love rating icons 1. Find and prepare rating icons. In this case I will need to prepare 4 styles rating icons Title Sample Size a. Empty Rating 16x16 b. Selected Rating 16x16 c. Rating Overlay

SharePoint 2010: How to change rating icons

English: Sometimes you may received a request to change rating icons, from a normal star to a love icon. So, how would you do it? Figure 1. Original rating icons Figure 2. Modified love rating icons 1. Find and prepare rating icons. In this case I will need to prepare 4 styles rating icons Title Sample Size a. Empty Rating 16x16 b. Selected Rating 16x16 c. Rating Overlay