Hey Guys,
How are you doing? seems like I missed posting this article
before posting few others…
When we run Get-Service cmdlet in PowerShell we get an output as shown in below snap.
As the above representation of the actual output is in the
form of its cropped image where we cannot select any text of it.
Below is a trick based on LazyWinAdmin blog article
which will allow you to share your output on your blog posts like the actual PowerShell output.
Steps
- Go to blogger dashboard
- Click theme
- Click Customize
- In the Blogger Template Designer, Click Advanced
- Click on Add CSS
CSS Code
.PoshConsole {
color:
#EEEDF0;
background-color: #012456;
font-family:
consolas;
font-size:
0.99em;
padding:
.25em;
padding-top: 0.25em;
padding-right: 0.25em;
padding-bottom: 0.25em;
padding-left: 0.25em;
}
Now insert you copied output to the blog post as shown below
All you need to do now is add the following line with your code in HTML mode.
<pre class="PoshConsole">PS E:\> Get-Service
Status Name DisplayName
------ ---- -----------
Stopped AJRouter AllJoyn Router Service
Running ALG Application Layer Gateway Service
Running AppHostSvc Application Host Helper Service
Stopped AppIDSvc Application Identity
Running Appinfo Application Information
Stopped AppMgmt Application Management
Stopped AppReadiness App Readiness
Stopped AppXSvc AppX Deployment Service (AppXSVC)
Stopped aspnet_state ASP.NET State Service
Running AudioEndpointBu... Windows Audio Endpoint Builder
Running Audiosrv Windows Audio
Running AVP Kaspersky Endpoint Security Service
Running avpsus Kaspersky Seamless Update Service
Stopped AxInstSV ActiveX Installer (AxInstSV)
Stopped BDESVC BitLocker Drive Encryption Service
Running BFE Base Filtering Engine
</pre>
With above steps, you will get result on your blog post as below.
PS E:\> Get-Service Status Name DisplayName ------ ---- ----------- Stopped AJRouter AllJoyn Router Service Running ALG Application Layer Gateway Service Running AppHostSvc Application Host Helper Service Stopped AppIDSvc Application Identity Running Appinfo Application Information Stopped AppMgmt Application Management Stopped AppReadiness App Readiness Stopped AppXSvc AppX Deployment Service (AppXSVC) Stopped aspnet_state ASP.NET State Service Running AudioEndpointBu... Windows Audio Endpoint Builder Running Audiosrv Windows Audio Running AVP Kaspersky Endpoint Security Service Running avpsus Kaspersky Seamless Update Service Stopped AxInstSV ActiveX Installer (AxInstSV) Stopped BDESVC BitLocker Drive Encryption Service Running BFE Base Filtering Engine
Kindly Share your experience in comment section with my blog/post if it did help you !!
Stay Blessed!!
Thank You!!
Gr8 post
ReplyDelete