Centreon through Powershell
May one day you’ll have to request centreon through Powershell, who knows !
I wrote a little function for that.
First, you’ll have to get your authtoken using this :
May one day you’ll have to request centreon through Powershell, who knows !
I wrote a little function for that.
First, you’ll have to get your authtoken using this :
The best ways to be able to look at your scripts some weeks/months/years after writing it is to script properly.
Here below is the format at always use, I use it as a script template :
PSScriptAnalyzer is a static code checker for Windows PowerShell modules and scripts. PSScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements.
I wish you a really Powershell New Year 2019 !!!
Sometimes you get a requirement to start a Powershell script from an elevated prompt. Here is a quick function to check that :
function Test-ElevatedPrompt { [Security.Principal.WindowsPrincipal] $Identity = [Security.Principal.WindowsIdentity]::GetCurrent() $Identity.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) }
This will return a simple boolean so you can use it this way :
Install-Module BurntToast
Hi !
Roualin.fr is now PowershellTips.fr !
Same site, same kinds of tips, infos, scripts, don’t worry !
Hope you will still enjoy !
Monitoring servers is an important thing, almost uptime of all servers. You should have some dedicated tools such as Zabbix, Nagios, etc… BUT ! Here is a script to generate an HTML report of all your servers uptime.
Those servers are all registered into AD and the ‘get’ is based on the operating system detected by AD.
Sometimes, for several reasons, you’ll have to import calendar events into users mailbox in O365.
That could be done using different methods, directly using a service account (with a mailbox !), impersonated (as if the user created the event).
Here below is a quick example of a small script (powershell of course ! )
PowerShell Conference Europe is the largest PowerShell-themed conference in Europe, and is held in Hanover, Germany each year. We attract speakers and attendees from all over the world, with such topics as security, DevOps, databases, core language features, optimization, DSC, best practices and much more.
You must be logged in to post a comment.