{"id":76453,"date":"2024-12-08T01:57:28","date_gmt":"2024-12-08T01:57:28","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=76453"},"modified":"2024-12-08T01:57:28","modified_gmt":"2024-12-08T01:57:28","slug":"power-shell-archive-un-archive","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76453","title":{"rendered":"Power Shell: Archive\/Un Archive"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u2022<strong>powershell<\/strong><strong> Compress-Archive &#8211;<\/strong><strong>LiteralPath<\/strong><strong> lab8 &#8211;<\/strong><strong>DestinationPath<\/strong><strong> lab8.zip<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2022<strong>powershell<\/strong><strong> Expand-Archive &#8211;<\/strong><strong>LiteralPath<\/strong><strong> lab8.zip &#8211;<\/strong><strong>DestinationPath<\/strong><strong> &#8220;C:\\mypath&#8221; -Force<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2022powershell Compress-Archive &#8211;LiteralPath lab8 &#8211;DestinationPath lab8.zip \u2022powershell Expand-Archive &#8211;LiteralPath lab8.zip &#8211;DestinationPath &#8220;C:\\mypath&#8221; -Force<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-76453","post","type-post","status-publish","format-standard","hentry","category-root","item-wrap"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":72015,"url":"http:\/\/bangla.sitestree.com\/?p=72015","url_meta":{"origin":76453,"position":0},"title":"Output for the command: composer require sparsh\/buy-now-magento-2-extension","author":"Sayed","date":"November 28, 2021","format":false,"excerpt":"Output for the command: composer require sparsh\/buy-now-magento-2-extension Output: Using version ^1.0 for sparsh\/buy-now-magento-2-extension .\/composer.json has been updated Running composer update sparsh\/buy-now-magento-2-extension Loading composer repositories with package information In Laminas\\DependencyPlugin\\DependencyRewriterV2::onPrePoolCreate Updating dependencies Lock file operations: 1 install, 0 updates, 0 removals - Locking sparsh\/buy-now-magento-2-extension (1.0.1) Writing lock file Installing dependencies from\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":73963,"url":"http:\/\/bangla.sitestree.com\/?p=73963","url_meta":{"origin":76453,"position":1},"title":"composer global require laravel\/installer","author":"Sayed","date":"March 28, 2022","format":false,"excerpt":"composer global require laravel\/installer Changed current directory to ... Using version ^4.2 for laravel\/installer .\/composer.json has been created Running composer update laravel\/installer Loading composer repositories with package information Updating dependencies Lock file operations: 10 installs, 0 updates, 0 removals - Locking laravel\/installer (v4.2.10) - Locking psr\/container (2.0.2) - Locking symfony\/console\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78663,"url":"http:\/\/bangla.sitestree.com\/?p=78663","url_meta":{"origin":76453,"position":2},"title":"write-output vs write-host","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"Write-Output vs Write-Host in PowerShell FeatureWrite-OutputWrite-HostSends data to pipeline\u2705 Yes\u274c NoCan be stored in variable\u2705 Yes\u274c Usually noCan be redirected to file\u2705 Yes\u274c Not normally usefulUsed for script output\u2705 Recommended\u26a0\ufe0f Mainly for display messagesSupports formatting\/colorLimited\u2705 Good for colors 1. Write-Output Write-Output sends data to the PowerShell pipeline. Write-Output \"Hello PowerShell\"\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78721,"url":"http:\/\/bangla.sitestree.com\/?p=78721","url_meta":{"origin":76453,"position":3},"title":"DHCP: Powershell Commands","author":"Sayed","date":"June 27, 2026","format":false,"excerpt":"Commands that work in Windows PowerShell 5.1 These DHCP\/networking commands are intended for Windows Server PowerShell: Install-WindowsFeature DHCPInstall-WindowsFeature DHCP -IncludeManagementToolsImport-Module DHCPServerAdd-DhcpServerv4ScopeSet-DhcpServerv4OptionValueGet-DhcpServerv4ScopeGet-DhcpServerv4LeaseGet-DhcpServerInDCAdd-DhcpServerInDCRestart-Service DHCPServerGet-Service DHCPServer Related: Get-NetAdapterGet-NetIPAddressNew-NetIPAddressSet-DnsClientServerAddressGet-DnsClientServerAddressipconfig \/all","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78719,"url":"http:\/\/bangla.sitestree.com\/?p=78719","url_meta":{"origin":76453,"position":4},"title":"CmdletBinding","author":"Sayed","date":"June 27, 2026","format":false,"excerpt":"Ref: AI Tools\/ChatGPT [CmdletBinding()] turns a normal PowerShell function into an advanced function. That means the function behaves more like a real PowerShell cmdlet. Basic example Normal function: function Install-Office { param( [string]$Version ) Write-Host \"Installing Office $Version\" } Advanced function: function Install-Office { [CmdletBinding()] param( [string]$Version ) Write-Host \"Installing\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78104,"url":"http:\/\/bangla.sitestree.com\/?p=78104","url_meta":{"origin":76453,"position":5},"title":"PowerShell : Check the Block Size of a Drive","author":"Sayed","date":"May 8, 2025","format":false,"excerpt":"Command: Get-CimInstance -ClassName Win32_Volume | Select-Object Name, FileSystem, Label, Size, BlockSize | Sort-Object Name | Format-Table -AutoSize Sample Output: Needed to format a 1TB Memory Card. 64 KB seemed to be a good Block Size for general use. Windows by default did not give an option to select a smaller\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=700%2C400 2x"},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76453"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76453\/revisions"}],"predecessor-version":[{"id":76454,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76453\/revisions\/76454"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76453"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}