Skip to main content

Posts

PowerShell regex count specific character or number

Recent posts

Print error 016-799 - Fuji Xerox

016-799 Fuji Xerox print error code. That shows a description error as “Print instruction Fail detected in decomposer.”
The error code and error description are alien languages for users and even system administrators who are not familiar with Fuji Xerox error code.
The error code is quite simple and easy to fix, if the job print goes to the printer but print out doesn’t come out.
So, basically the print job was received by the printer, but the printer just doesn’t know what type of paper or what size to use or which tray to utilize for the print out.
In some instances, this is just a paper mismatch but the error description; if using Windows 10 to print does not exactly points to what is the issue.

First thing to check, is the paper size selected by the user to print.
Example, if the printer configuration is A3 and A4 sizes only.

But then the person printing the file accidentally chooses “A4 Cover” then this error 016-799 will occur.

It’s quite misleading “A4 Cover” and “A4” only, so …

PowerPoint contact System Administrator error while opening the file

Office 365 PowerPoint shows an error contact system administrator when opening the file.
The error if interpreted literally shows that a system administrator is needed to fix the issue due to a security or permissions issue.
Notification errors or any errors that are displayed to inform the user that some processes have gone wrong while processing or opening the file are quite helpful to begin troubleshooting.
But some errors are quite generic or does not really point to what type of solution should be done to resolve the issue.
Literally interpreting the error to resolve the issue sometimes work but sometimes it won’t work as well.
For this error it seems like a permission issue but it’s not.
The first thing to try to eliminate the issue is to open the file manually, like going to “File”, select “Open”, then browse to the folder location of the file and open the file.
If the file can be opened, then security issue or permission issue is not a concern.
But when double clicking the f…

Backup SystemState Windows Server to a network share

Backup SystemState of a server to a network share is preferable rather than backing up to another partition within the local server.
Backing up to a network share is quite a good practice, so just in case anything goes wrong to the local server the system state is still safe since the backup is on a network share.
So, it’s like the old adage. Don’t put eggs in one basket. If all eggs are in one basket and if the basket is broken then everything is gone. Same logic goes to a server backup, protecting a server with a backup but then putting the backup to a local partition does not really protect the server from hard disk failure.
How to backup system state using wbadmin to a network share?
It’s quite straight forward but command prompt must be run at an elevated mode, and a network share that is accessible by the server and has enough space to hold the backup.
Command below will work with Windows 2008 and Windows 2012; newer version of Windows may still work but not tested.
wbadmin star…

Test AD account password without logging in to the computer

Documenting AD password is a good practice and should be a part of IT policy.
It’s easier to troubleshoot and support users if the password is known to IT. Of course, ethical use of the password should be followed.
How to test an active directory account password whether it’s working or not, without logging in or signing in on a computer?
PowerShell can help to test a user account password quite easily.
AD admin account is needed and the PowerShell must be elevated while running the script below. Correct version of PowerShell is needed for this script.
See image below:


That’s it! Just replace the username and password to be tested and you can tell your users that the password is not working and needs password reset for their account to work.
The script is written for educational purposes and used it ethically.
Cheers!! Till next time. Happy Coding!!!
================================ Free Android Apps:
Click  links below to find out more:
Excel Keyboard guide: https://play.google.com/store/apps/det…

Replace column value of text files using awk

AWK is a handy tool to process large text files.
Ever came across a need to replace 100 or more text files value in a single column?
Of course, the old school method is to do it manually which is definitely time consuming and not efficient at all.
Below is a sample code how to replace value in a column for all text files found in the directory specified.
#!/bin/bash
for file in /home/pc_text/Documents/source/*
do xfilename=$(basename $file)
#echo "$xfilename" if you need to display the filename while the code is running
awk 'FNR==1{print $0}' $file >> /home/pc_text/Documents/output/$xfilename
awk 'NR>1{print $1 , $2 , $3 , $4, "0.873" , $6 , $7 }' $file >> /home/pc_text/Documents/output/$xfilename
done
Code explanation:
for file in /home/pc_text/Documents/source/* - get all text files for processing
xfilename=$(basename $file) – get all the filename of the text files
awk 'FNR==1{print $0}' $file >> /home/pc_text/Documents/outpu…

Error: the type or namespace name does not exist in the namespace using visual studio 2017

When compiling an error will occur that a name space does not exist. An example error like the message below:
The type or namespace name 'Microsoft.Office.Interop.Outlook' does not exist in the namespace 'Microsoft'(are you missing an assembly reference?)
The system is trying to find a reference for a specific namespace or dll.
One solution for this is to add the reference to the missing namespace.
Find the “solution explorer” window like the image below:


After opening the “solution explorer” window, right click the name of the project just below the solution explorer. Beside the C# icon.
A new window will open like the image below. Click “Add”, then click “Reference”.



After clicking “Reference”, the “Reference Manager” window will open.
Click “COM” option, then use the filter option to go directly to the desired namespace or reference. Since the error is a Microsoft namespace, type “Microsoft” and “Microsoft” namespace will be filtered from the list. See image below…