Giter Site home page Giter Site logo

invoke-clippy's Introduction

Invoke-Clippy

Back with the release of Office ’97 in November of 1996, Microsoft introduced a beloved new helper tool to assist users in navigating through the daunting changes in Microsoft Office,

Microsoft Clippy!

Clippy

For too many years, Clippy has gone missing in Windows, and admins were left with horrible solutions, like sending e-mails or talking to their users face-to-face.

But now he’s back!

I am proud to share with you my newest slap-dash project, ‘Invoke-Clippy!‘

Installation

Install the module by downloading from here, or using the PowerShell Gallery

Manual steps
  • Copy the "PowerClippy" folder into your module path. Note: You can find an appropriate directory by running $ENV:PSModulePath.Split(';').
  • Run Import-Module PowerClippy from your PowerShell command prompt.
Using the PowerShell Gallery (WMF 5 and up!)

Find-Module -Name PowerClippy | Install-Module

Syntax

Syntax is simple!

This adds a new PowerShell icon to the system tray. When clicked, you'll see a familiar friend. If you'd like Clippy to appear straight away (add this feature tomorrow)

Invoke-Clippy -text 'Would you like to install Windows 10?' -Button1Text Yes -Button2Text 'Restart PC'

Provides a helpful Clippy UI to notify users of the wonders of Windows 10, in case they were unaware. If the user isn't interested, shuts down their PC.

##Clippy, how I've missed you!

Today, it pretty much just pops up the familiar character. Being a very lazy retreading of Chrissy’s code from her ‘Hey Scripting Guy’ article, it also features the PowerShell logo in the system tray to end the code! AND it runs hidden!

You have the option of specifying -Button1 or -Button2 to add additional buttons. If you’d like the buttons to do anything, add some code for them to the empty script blocks on line 71 and line 80.

Consider this a framework to use to annoy notify your coworkers with helpful reminders.

Suggestions

Scheduled Task on your coworkers machine every 15 minutes to remind them to check the ticket queue Add two buttons, and make the second button spawn another instance of Clippy (consider reversing the X,Y values to make Clippy appear on the other side) Use this as a nice and professional way to communicate mandatory reboots to your end users No matter what you come up with, share it with the class! Did you find a way to make this appear interactively on a remote session? Did you add -ComputerName support (If you did, AWESOME!).

Either comment here or make your own fork and send me a Pull Request. I’d love to see what you come up with.

References

Pretty much everything here I learned on the spot thanks to Stack Overflow. Also big big thanks to Chrissy Lemaire in her excellent Scripting Guys article, ‘How to Create Popups’ in PowerShell. Most of the code for window sizing comes from her work!

How do I apply a style to all buttons How to make rounded corners on a button Corner Rounded Buttons in WPF Creating a custom template in WPF

invoke-clippy's People

Contributors

1redone avatar dbremner avatar gerane avatar

Stargazers

poa00 avatar ComputerGuy avatar Gavin avatar NaveenKumar Namachivayam ⚡ avatar Chase  avatar Sam Oates avatar Mike Tupker avatar Calum Dingwall avatar Glenn Goffin avatar Pedro Boechat avatar Nathan avatar  avatar Matt Moradi avatar  avatar Flavien MICHALECZEK avatar Velocet avatar Joshua Magady avatar Jeff McCollum avatar Garrett Scott avatar Kevin Kirkpatrick avatar François-Xavier Cat avatar Nick Rodriguez avatar  avatar Michael Willis avatar Justin Smith avatar Ryan Conrad avatar

Watchers

James Cloos avatar  avatar Joshua Magady avatar

invoke-clippy's Issues

Clippy.png file path needs to be fixed

Currently the path to the clippy source file is hardcoded. It should be a relative path, based on the modules invocation directory.

As a workaround, edit the path in the Invoke-Clippy file itself.

Won't install/import through PSGallery correctly

Find-Module -Name PowerClippy | Install-Module
The above command runs fine but importing it and everything else won't.

PS C:\Windows\system32> Import-Module PowerClippy
Import-Module : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
In Zeile:1 Zeichen:1
+ Import-Module PowerClippy
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], NullReferenceException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Button Visibility is Hidden in the version on Github

I wasn't sure if the version her on Github is different that the one on the gallery.

I just made a Pull Request to fix the image path, but then when I was looking into the buttons missing for me I noticed they were set to hidden. The format ps1xml was empty as well. I figured I would ask if they were different or if you were still working on this before I dug any further.

Another idea I had was finding the original clippy tray icon and using that. I also might look into adding invoking it without the tray.

PowerClippy.Format.ps1xml is empty

PowerClippy.Format.ps1xml is an empty file and throws an error on import.

VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\powerclippy\1.0\powerclippy.psd1'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program Files\WindowsPowerShell\Modules\powerclippy\1.0\PowerClippy.Format.ps1xml'.
import-module : Object reference not set to an instance of an object.
At line:1 char:1
+ import-module powerclippy -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], NullReferenceException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Windows 10 Crash

Clippy, pls help! Upon running within the PS ISE in Windows 10, the ISE process immediately closes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.