Skip to main content

Posts

PowerShell check wallpaper location

How to check or save wallpaper in Windows 10? How to find current wallpaper in Windows 10? Check or find remote computer wallpaper location. Code snippet below will check the current or find the location of Windows 10 wallpaper, where it's located and can be copied or back up if desired. PowerShell code snippet to check wallpaper: #========================= $strcomputer = "." $w = get-wmiobject Win32_Desktop -ComputerName   $strcomputer $w . Wallpaper #========================= $strcomputer   =   "." To check remote PC replace with the remote computer name. Sample output: c:\windows\web\wallpaper\theme1\img1.jpg Code snippet works fine in Windows 10. Cheers.. ================================ Free Android Apps: Click  links below to find out more: Excel Keyboard guide: https://play.google.com/store/apps/details?id=chrisjoms.myex...

PowerShell rename and shorten folder names

Ever want to shorten folder names due to a long or exceeding path? PowerShell will take it easy to shorten folder names. For example if you have a folder naming structure of project folder name plus descriptions or generic folder name plus detailed name of the folder. Example: Images at the beach located in the other side of the world, Photos taken while climbing Mount Everest, 07112015 reports about findings on the walls of the cave under the cemetery, 20150911 metaphors and narratives just about anything, Folder1 photos of the earth, Folder2 images on the south Obviously, such folder names will easily consume the limitations of the folder path. To shorten or rename such folders can be done manually if there are only 3 folders but if there are  hundreds or thousands of such folders can be a huge task and may take a while to do such work. With the help of PowerShell it can be done automatically. Here’s the script below, that shows how to mess up wit...

VB.Net check string for special characters

    Code snippet below will check for letters and numbers on the string.   Sub check_for_special_char()         Dim regexItem As Regex = New Regex("^[a-zA-Z0-9 ]*$")         Dim xval_regex As Boolean         xval_regex = regexItem.IsMatch(TextBox1.Text)         '        MsgBox(xval_regex)         If xval_regex = "False" Then             MsgBox("No special characters/symbols allowed.")                else             MsgBox("No special characters found on the string")          End If   End Sub To...

WMIC Get IP Address

How to get IP Address via command line using WMIC? Get IP Address of   remote computer. Get IP Address using WMIC.       wmic nicconfig get IPAddress,ServiceName Sample output: IPAddress                                       ServiceName                                                 kdnic {"169.254.0.241", "fe80::26d0:eff6:cc27:e1"}    VBoxNetAdp {"192.168.11.6", "fe80::8798:acfe:6ee9:8b7c"}    athr                                                 L1C                                             ...

PowerShell Get IP Address and Subnet mask

 Get IP Address, MAC Address and Subnet mask. It also displays the CIDR (Classless InterDomain Routing) notation. Here's the script:  ====================================== $nic_configuration = gwmi -computer .  -class "win32_networkadapterconfiguration" | Where-Object {$_.defaultIPGateway -ne $null} $IP = $nic_configuration.ipaddress write-output " IP Address : $IP" $MAC_Address = $nic_configuration.MACAddress write-output " MAC Address :  $MAC_Address" $SubnetMask = $nic_configuration.ipsubnet switch ($SubnetMask) { 255.255.255.255   {" Subnet mask is: 255.255.255.255 or /32 "} 255.255.255.254   {" Subnet mask is: 255.255.255.254  or   /31 "} 255.255.255.252   {" Subnet mask is:  255.255.255.252 or   /30 "} 255.255.255.248   {" Subnet mask is: 255.255.255.248 or  /29 "} 255.255.255.240   {" Subnet mask is:   255.255.255.240   or   /28"} ...

Excel count non-empty cells or blank cells

Excel provides a function to check blank cells and also provide functions to check cells that are not empty. CountA function will check cells that are not empty. Countblank function as its name literally implies will check or count for blank or empty cells. Example for Countblank function: =COUNTBLANK(A1:B11) --- Function will check for empty spaces from A1 to B11 (2 columns) =COUNTBLANK((A1:A11)) --- Function will check for empty spaces in a single column. Note the double parentheses Example for CountA function: =COUNTA(A1:A11) --- Function to check cells with values in a single column (Column A only) =COUNTA(A1:B11)   --- Functio to check cells with values in two columns from A1 to B11 (Column A and B) To enter formula above using VBA: ============================== Sub VBA_Formula() Dim Cell_Formula As String Dim xvalue As String Cell_Formula = "=COUNTA(A1:A11)" 'Cell_Formula = "=COUNTBLANK((A1:A...

Check startup items in Windows

Startup items might slow down your computer during logon or boot up process and some malware or viruses can also be triggered using startup items in Windows registry. How to check startup items in Windows? If you want to have a  simple reminder upon startup the "run" item on the registry will be able to help. A reminder during Windows logon or startup can be set on the "run" key registry. Like running a notepad with notes on it, so every time the computer boots up the notepad will open and you can read whatever notes are written on the notepad. How to query the run item in Windows registry for programs that run automatically on startup? Of course, this can be done manually by opening the registry editor and browsing to the desired registry keys. Command line is useful to automate the process or query a remote computer without disturbing the user. Here's the link on how to query remote computers registry using command line: ...

Excel VBA autofill date range

How to auto fill a range of cells with date? To auto fill range of cells can be done via VBA or manually. To manually fill a range of cells with date. Type two dates on two cells and highlight the two cells and manually drag to the desired range of cells. Drag from the bottom right with the "+" sign on it. See screen shot below:            To do it via VBA is quite simple also using autofill function. Sub AutoFill_Dates()   Dim srcRange As Range   Dim destRange As Range   Set srcRange = ActiveSheet.Range("E1") 'E1 should have valid date value   Set destRange = ActiveSheet.Range("E1:E15") 'E1 to E15 will be filled with the dates (starting the date specified on E1)   srcRange.AutoFill destRange, xlFillSeries 'xlFillSeries will auto fill the dates in sequence End Sub Cheers.. Hope it helps..