Skip to main content

Posts

Type equal sign in Excel Office 365 without evaluating

How to type equal sign "=" in Excel without evaluating? Typing equal sign in Excel will trigger Excel to evaluate the contents or the formula that is being typed. But how to type equal sign plus the contents without evaluating the formula? Or how to display a formula in a cell using Excel? In VBA, Excel Macro, VBscript and VB.Net; to put comments or remarks on the code is to use single quote. A single quote tells the engine that whatever that follows from the quote is a string and not a command and should not be evaluated. In this way, you can type anything after the single quote “ ‘ “. So, this goes the same way in the Excel interface. If you want just to show the formula for remarks or whatever purposes but don’t want Excel to evaluate the contents, then just type a single quote before the equal sign or the formula. Example: ‘=1+1 Excel will just display =1+1 It will be treated as a literal string. Of course, without the single quote ...

PowerShell get screen resolution

Check screen resolution of the monitor using PowerShell. Get-WmiObject -Query "Select * from Win32_desktopmonitor" -Namespace 'Root\CIMV2' | select name , screenheight , screenwidth Sample output: name                 screenheight screenwidth ----                 ------------ ----------- Default Monitor                               Generic PnP Monitor 1080          1920    To check remote PCs, use the code below, of course proper credentials is required. Invoke-Command -ComputerName 192.168.1.20 -ScriptBlock { Get-WmiObject -Query "Select * from Win32_desktopmonitor" -Namespace 'Root\CIMV2' | select n...

PowerShell check sound devices

PowerShell code below will list the names of the sound devices and its status on the system. The status might show OK, I believe this refers to the driver installation but if some settings are misconfigured that will be another issue. Here’s the code: Get-WmiObject -Query "Select * from Win32_sounddevice" -Namespace 'Root\CIMV2' Sample output: Manufacturer          Name                           Status StatusInfo ------------          ----                           ------ ---------- Intel(R) Corporation Intel(R) Display Audio         OK           ...

PowerShell get Printer Name and Driver path

Descriptive Printer name is quite useful especially if managing quite a few printers on a network. Knowing the driver path of the printers is also useful, the file can be copied and can be used to install on another computer if necessary. Here’s the PowerShell code: Get-WmiObject -Query "Select DriverPath, Name from Win32_printerdriver" -Namespace 'Root\CIMV2' | Select Name , DriverPath | ft -wrap Sample Output: Cheers..till next time. :) ================================ Free Android Apps: Click  links below to find out more: Excel Keyboard guide: https://play.google.com/store/apps/details?id=chrisjoms.myexcelapplicationguide Heaven's Dew Fall  Prayer app for Android : https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer Catholic Rosary Guide  for Android: http...

PowerShell GUI with buttons, textbox and combobox

GUI makes life easier, but of course command line has a power of its own. How to add a form in PowerShell with Buttons, TextBox and ComboBox? Adding GUI forms in PowerShell must be done manually by code. It’s not that hard, you just need to love PowerShell and see what it can do to automate IT administration and makes your life easier. Anyway, code below introduces how to add GUI to PowerShell and it also illustrates how to make use of those GUI buttons and send a command to remote computers. Code to add buttons, textbox and combobox in PowerShell, and how to execute a command after the button is clicked. #initialize the main form $form = new-object Windows.forms.form $form . text = "Server Selection Form" $form . minimumSize = New-Object System.Drawing.Size ( 600 , 300 ) $form . maximumSize = New-Object System.Drawing.Size ( 600 , 300 ) #add a button to the form $button = new-object windows.forms.button $button . text...