Monday, 26 March 2018

HP Event notifier cannot start

Problem:
You cannot install HP Event Notifier on the Windows Server (2012+)
Solution:
First, you need to add SNMP Service feature to your server.
Then to be sure it runs correctly, add localhost to allowed senders for SNMP packets:



Next, install HP providers, for example from this link:
https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_c93c5f85ea0d471baddb6eadfe
Then, run Event Notifier as an administrator:

After configuring, for sending test, run Test WBEM Events as an administrator.

If you encounter an error during sending test or tests are not sent do recipient, restart this service:
and the same with SNMP service

Thursday, 15 February 2018

Remote Desktop Services deployment does not exist


When you are on the server and want to list active session using Get-RDUserSession command, you can see an error telling you that your have no RDS installed (even on RDS session broker), like the one below:


Don't be fooled by this - it shows only because you don't have enough privileges. Just run Powershell session as an administrator and bam! You can see desired list.


BTW: My small advice here - if you see PS errors, but you're sure, that cmd-let should work, check it with elevated privileges.

Tuesday, 8 August 2017

Windows 10: my screen went black

In Windows 10 there are color filters feature controlled with shortcut.
If you mistakenly hit that Ctrl+Win+C, you will apply color filter, which default settings is Greyscale. Hit it again to turn it off.
That's it!

Saturday, 1 July 2017

2003: Cannot start server after cloning it - activation error

After cloning 2003 server, because of hardware change you can see information that you have to activate Windows.
Your system probably has no drivers installed, so you will not be able to connect to the network and activate it again.
The solution is to do workaround for the time of installing drivers.
This omits activation and let you install whatever you need before turning it back off.
1.Open your regedit RUN > REGEDIT
2.Find key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents
3.see the string OOBETimer
4.Double click.change all content with this one FF D5 71 D6 8B 6A 8D 6F D5 33 93 FD
5.Right Click on WPAEvents(Regedit)and choose Permissions
6.Window will show up,click to System and check all of Deny Listbox
7.Restart Your PC

To complete your device settings, it's good to get rid of old hardware that is hidden now and cause problems.
Run command:
set devmgr_show_nonpresent_devices=1

Add Legacy driver to 2003 OS
http://blogs.technet.com/b/raghavan/archive/2009/05/12/3239838.aspx

Friday, 30 June 2017

Windows10: If Google Chrome is loading webpages slowly

Right-click on the Chrome Icon, select "Properties".. 
Uncheck if set in compatibility mode for windows.

Also, try running the Compatibility Troubleshooter.

Powershell : How to export only errors from powershell command?

Sometimes, you need to export only the errors to your file, for example to show what needs to be corrected.

As you know, you can do an export from powershell cmd-let to a xml, csv or txt.
For example:
Get-Mailbox |Export-Csv .\mailboxes
Get-Mailbox |Export-Clixml
Get-Mailbox > mailboxes.txt

Additionally,  working in the loop, you can append data to the file, using -Append switch:
$users|%{Get-Mailbox $_.id|Export-Csv .\mailboxes -Append}
But what to do in the situations when you need to export only errors in the current command?
For example you've created mailboxes according to the list, but then some of them were deleted.
One of the possibilities is to compare your list with errors from cmd-let.
You can do it manually, but it could be painful.
I propose you to use pipeline with using not well known switch >>.
This will output only errors to your txt file.
$users|%{get-mailbox $_.userprincipalname |select displayname, userprincipalname} 2>>MailboxNotExists.txt
Here are the switches you can use:
 > - Redirect pipeline output to a file,overwriting the current contents.
 >> - Redirect pipeline output to a file,appending to the existing content.
2>> - Redirect error output to a file,appending to the current contents.
2> - Redirect error output to a file,overwriting the current contents.
2>&1 - The error messages are written to the output pipe instead of theerror pipe.

Good reference here:
https://devcentral.f5.com/articles/powershell-abcs-o-is-for-output

Tuesday, 17 January 2017

Powershell - how to get virtual machine GUID / ID (easiest way) from the hypervisor

Hi,
Today, easy thing to manage, but of course - if you now how to do it.
To get VM ID from hypervisor, for example - to manage virtual machine from the powershell direct - you need to run simple command in the administrator session:

(get-vm virtualmachinename).id