PowerShell 10 Year

PowerShell got 10 years and our usergroup made an contribution to the 10 years anniversary. We had a lots of fun and we finnaly made a really nice video for the Channel 9 stream.

I want to thank all for making the video possible. Thanks to Daniel, who cut the statement video. He also made some Mountain videos – mainly from Upper Austria. These are really nice – so have a look at them.

What will you see in our contribution? Our usergroup members made some statements how PowerShell changed their lives and Roman & friends did an IoT video of his garden sprinklers – with some real nice action in it. Now have a look at the videos on Channel9:

Austrian contribution – Dwarfs and Moods and member statements

10 Year anniversary of PowerShell

Review of our Usergroup Meeting in Linz / Austria

We had our Linzer spring System Center and Powershell Usergroup on 28th of April. We managed to get three top speakers for the event. Our next Usergroup event will be at Microsoft Vienna on 30th of June. Register now!

So when you get interested in the user group, the information we share – find us on Xing or follow us on twitter for the newest information. (@scug_at).

As always we have had a nice location. The photos are this time from Stefan Koell.

Session 1: The role of IT operation in times of SaaS and PaaS

Rainer presented us in a really great and enthusiastic way how they see operations in their company timecockpit. He mentioned that they need very little ops and they need ops to know the service level agreements in the cloud.

He also teased, that Powershell is not necessary anymore, because in a SaaS world it should be only necessary to use the Service.

More about his thoughts is here in the Interview and he also recorded the session.

Session 2: SCOOSP – System Center Orchestrator Service Portal

In the second session Michael Seidl (aka Techguy) presented us SCOOSP – an easy to manage Portal for the System Center Orchestrator. With this portal you can do lots of things with less technical effort than using the System Center Service Manager and its portal. So when you are interested – have a look at it.

Session 3: Attack & Defend mit Powershell

In our last session Alexander Graf from Antares showed us their intrusion detection solution. They assumed an usb stick with maleware on it, which communicates with a command server. So their solution found the suspicious behavior.

So we have had three interesting Sessions from interesting speakers with some networking at the end with a really tasty “Mostviertler Bauernjause” including fantastic juices. Thank you Antares!

System Center Usergroup Meeting in Linz/Austria

On 16th November we have had our second System Center User Group meeting in Linz/Austria and the 11th in Austria. 16 attendees could enjoy 3 great practical sessions.

At first I gave a quick overview about the System Center User Group and upcoming Events (slides). Our next event will be on Januar 19th in Vienna at Microsoft – the simulcast of SCU Texas. The registration is open.

So when you get interested in the user group, the information we share – find us on Xing or follow us on twitter for the newest information. (@scug_at).

Session 1: Operational Management Suite (OMS)

In the first talk Stefan Koell began and showed us the insights what’s OMS for. Impressive were the short improvement cycles in OMS.

clip_image002

Session 2: Limit the power of Powershell 5 with JEA

Next was Roman Stadlmair who presented the possibility of limiting the Power of PowerShell 5 with JEA – an advanced PowerShell topic. It was an exciting talk from Roman about an interesting upcoming concept in PowerShell. He provides his slides for us.

clip_image004

Session 3: myOperations IT

In the last session Alexander Becker presented the myOperations IT Management Portal. It is one web portal for some system center products.

clip_image006

After the sessions we have had in deep technical discussions in the networking part(y) of the meeting. Stefan sponsored the pizzas and I brought the drinks.

clip_image008

Finally you get some impressions of the meeting room. Thanks for Michael Seirer our professional meeting photograph for shooting and sharing the photos.

So enjoy the photos and let’s see you in our next user group – maybe in Vienna at the System Center Universe Texas 2016 streaming.clip_image010

clip_image012

 

Reactivate CRs and all related MAs

The following short script will set a specific CR in progress and all related MAs to active.

$smdefaultcomputer = <computer>
$crclass=Get-SCSMClass System.Workitem.ChangeRequest$
$maclass
= Get-SCSMClass -Name System.WorkItem.Activity.ManualActivity$
$maStatusActive
=get-scsmenumeration ActivityStatusEnum.Active$
$crStatus
=get-scsmenumeration ChangeStatusEnum.InProgress$
$cr
=smlets\get-scsmobject -Class $crclass -Filter “Name -eq ‘CR83769′”
$mas
=Get-SCSMRelatedObject $CR | ? classname -eq ‘System.WorkItem.Activity.ManualActivity’
$masu=$mas | %{$i=$_.id;get-scsmobject -class $maclass -Filter “Id -eq $i}
$masu
| Set-SCSMObject -Property status -Value $maStatusActive
$cr
| Set-SCSMObject -Property status -Value $crStatus

Import Excel generated csv to SCSM via powershell

If you want to bulk Import data to System Center Service Manager from CSV with german data using powershell, there two things to do right:

  1. Save the Excel spreadsheet as “CSV (Trennzeichen-getrennt) .csv”
  2. Import into SCSM with right encoding
    1. Import-Csv $Filename -Delimiter ‘;’ -Encoding Default
    2. Import-Csv $Filename -Delimiter ‘;’ -Encoding UTF7

That’s it.

SCSM Templates – Get all Workitems with a specific Title in an Activity

I wanted to find out, which Templates use a manual activity with a specific Value in the Title. This can also be used for other properties.

$findMAmatchTitle = ‘IMPORTANT’
import-module smlets
## get all Workitems at the highest level
get-scsmobjecttemplate | %{$so= $_ ; $_.ObjectCollection} | % {$_.Propertycollection} | ? { $_.mixedvalue -match $findMAmatchTitle } | %{$so}
## get all Activities - be aware no cascades like activities in parallel activities.
get-scsmobjecttemplate | %{$_.ObjectCollection} | % {$_.Propertycollection} | ? { $_.mixedvalue -match $findMAmatchTitle } | %{$_}

If you have activities in activities (eg parallel) you won’t get the second level.

How to find user directories from unauthorized Users

We wanted to clean up our Terminal Servers a little. So we wanted to delete existing user directories from unauthorized users. As a side effect we also got all authorized users never logged in on the server.

# Find User directories on a server (eg Terminal Server) from unauthorized Users (eg deleted Users) and delete them.
# Find authorized Users not logged in yet (authorized users without user directory)
import-module activedirectory
# The directory name has to be equal to the Sam Account Name, the path has to end with ""
$path = "C:Users"
# Subgroups are not supported
$adgroup = <AD group with all authorized Users>
$users = get-adgroupmember $adgroup |select samaccountname
$Users = $Users | add-member -membertype Aliasproperty -Name name -value samaccountname –passthru
$dirs=Get-ChildItem $path | where {$_.Attributes -eq 'Directory'} | select Name
$delme=Compare-object $dirs $users -property name | ? {$_.sideindicator -eq "<="}
$nie = Compare-object $dirs $users -property name | ? {$_.sideindicator -eq "=>"}
#delete them all
foreach ($d in $delme) { $dd = $path + $d.name; rm -r $dd }