Cloud Computing

PowerShell: Advanced Profile

Posted on


In my last post almost 6 months ago I spoke about PowerShell profiles, especially how I preferred a simple profile. If you are just doing some simple things that you need right away or aren’t administering an application like Azure, SharePoint or Office365 then you can suffice with the simple profile. Since I manage Office365 and the applications mentioned above I have morphed to a second profile that I now load to load everything that I need for those applications. The time entering my username and password for those accounts, saves on having to load a different PS1 or create a function to do it later. My thoughts about not creating the function is if I do it once the first time I can just continue working without stopping when I need to do something in those applications.

My previous profile looked like this:

set-location c:\Powershell
$a = (Get-Host).PrivateData
$a.ErrorForegroundColor = “green”
cls

Just your basic profile that sets my default location, and sets the color of the evil error message RED to easier to read GREEN on the blue background. Now for my work within all of the applications that I admin this is the profile I use:

set-location c:\PowerShell
$env:path += “;C:\PowerShell”
$host.ui.RawUI.WindowTitle = “Administrator – Sysadmin Mode”
$Shell = $Host.UI.RawUI
$a = (Get-Host).PrivateData
$a.ErrorForegroundColor = “green”
import-module MSOnline
Import-Module AzureAD
Import-Module AzureADPreview
Import-Module ‘C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell’
$cred = Get-Credential
Connect-MsolService -Credential $cred
Connect-AzureAD -Credential $cred
Connect-SPOService -Url https://company-admin.sharepoint.com -Credential $cred

So, that is a lot more involved, but I only interact with the loading of the profile once at the line: $cred = Get-Credential, which is where I enter my credentials for Office365. Obviously our AzureAD is connected to Office365 which includes our SharePoint too so I only need to enter my credentials once.

First a disclaimer: I close this profile shell when I leave the computer even though I lock the computer screen.  This is best practice so that if anyone gains access to my workstation, they do not gain access to my Sysadmin account in PowerShell to do damage. We change our passwords on a regular basis to prevent access as is also best practice, but anything you can do to lower a hackers attack surface the better.

So, what does this all do? Well that is a pretty good question.

  1. I set the default location of my console as my PowerShell folder that contains all my scripts.
  2. I add the PowerShell folder to the system path
  3. Change the title of the shell to let me know I am running in Sysadmin mode.
  4. Set the system shell as the current console
  5. Set the error color to green
  6. Import all the Modules I need to make sure they do get loaded, including the SharePoint Module that is an MSI install
  7. Store my credentials for this session for use logging in
  8. Connect to all the services using the credentials I supplied. The SharePoint SPOService would need you to replace the word “company” with your company name.

 

I believe that this front end work saves me a lot of time when I have to do something in SharePoint or the SAAS client or AzureAD.

 

Advertisements

New Apple Music Deletes PlayLists

Posted on


With the new Apple iOS 8.4 our friends in Cupertino decided to add “enhancements” to our music with Apple Music. Unfortunately, if you turn on  iCloud Music with Apple Music to get enhancements it can in turn can and most likely will delete some of your music and Playlists. For me it deleted ALL of my Playlists from my iPhone, but not from my iTunes on my computer.

Of course I didn’t know until I looked for my Playlist that I created for my son when he is having trouble sleeping and it was gone. Not just that one, but every single Playlist I had created over the many years I have had iTunes on my computer. Well, I flipped a gasket at this point, but when I got to the point of sanity again I said to myself “what deleted them from my phone?” One of the first things I thought was one of my kids hit something while playing Lego’s or SpongeBob. Problem is they never click an “okay” button or anything that isn’t part of the game that they have played with me at least a few times before I let them go with it themselves.

By this time I finally gotten to the point that I was going to just sync everything back. This is where the kicker hit me. I plugged the iPhone into the computer, went to the Music part of the Sync to select the “sync ALL music to my iPhone” it wasn’t there. In its place was the big bold message that my music was synced with my “iCloud Library” and no choice to select what I wanted to Sync. Since I had read about the “My Music” and looked it over with a glance after the initial iOS upgrade I decided to give the My Music the free trial last week. I didn’t see that turning on the iCloud Library was going to delete anything. It was enhanced features and just supposed to be music selected for me with these cute bubbles with artist in that I chose.

Since I couldn’t see a way to sync the music back I thought that it had to be a setting in the iPhone that was causing my Desktop iTunes client to present the iCloud Music Library message. Low and behold when I went into my Setting > Music did I find the screen pictured here. If you make sure to turn off the ones circled in Red you will be able to plug your phone back into your computer, let iTunes load and see the old Sync Music page to re-sync your Playlist or any missing music. I turned off Apple Music as a whole for my iPhone as you can see in the picture.IMG_1347

It is completely out of my thought process as a SysAdmin and a beta tester for many programs that this wasn’t caught. This is a major issue that someone has had before. In fact, after a little Google Search I found multiple web sites with info and a discussion post on the Apple Forums from users with the problem. One of the web sites is one that I read and follow on Twitter, but had missed this article on iPhone in Canada. I wish I had paid better attention and Gary I will from now on. I had not used the feature until last week and didn’t notice the problem until tonight when I went to use the Playlist I created for my son.

I love my iPhone, I really dislike Apple as a company.

Google Reader No Longer Reader Friendly

Posted on Updated on


Google Reader No Longer Reader Friendly

User friendly is a key term in keep users, customers and getting students interested. In K12IT we use all kinds of user friendly tech tools like Angel Web and Safari Montage for delivering data to the students. We have textbooks online, we have virtual classrooms, but we also have real hardback textbooks. Not all users are tech savy, not all people learn well using a computer. They need an alternative choice to learn. Hardcover books is one way, but we can also find other tech ways to deliver the text or video or whatever to the students that they can learn. You just have to work at finding it.

It’s the same in the real world, but that is where it is most over looked. Take the Bank of America $5 debit card fee. They caused an uproar when they said it was going to start at the beginning of next year without any public trials. Today they backed off while in the process they lost customers and a lot of goodwill.

Another great example is the way Google is integrating the minimal look of G+ into its other products. But, they are doing so at putting a square peg in a round hole. It might work to a degree, but just shoving it down an end users throat in not the proper approach. You need to have alternatives, something not quite just white, off black and gray. Oh, lest I not forget the big red “Subscribe” button that is rarely used at the top of the Reader window. A stepped approach makes change a lot easier on people, especially when it is a known fact that people resist change. Little by little and take user feedback. By doing that you don’t leave yourself open to major revolt and media exposure of the negative variety.

If Google hadn’t went to just the bland current new Google Reader look they would have found out that end users need color on a white background. Tip: Gray and Black are not color! Hyperlinks have always been blue on the Web, and if Google had made the links blue, given some color to other buttons on the page they wouldn’t have gotten the negative response from long time users and the media.

Lesson? Listen to your end users, beta test it with actual users, beta test it with a larger group of actual users and don’t just jump to the opposite extreme from your current settings. That is a sure way to piss people off.

I’m personally now testing Feedly and I have imported all my feeds into My Yahoo. I like the Feedly web interface, but it isn’t perfect and will take some time to check out all the features.

from Ray Ebersole – Google+ Post Feed

https://plus.google.com/116971187524635952368/posts/fQFzVyRskPr