How to use Powershell to programmatically create a three-tier enumeration list?
Hi,
I'm tasked with creating an MP, say AdvantageLevelEnum.
It has, say, four Tier 1 values: Platinum,Gold,Silver, Bronze.
Each Tier 1 has, say, 4 Tier 2 values: Red,Green, Yellow.
Each Tier2 has 3 Tier 3 values: A, B, C.
What Service Manager Powershell example can you provide that would create, programmatically create such a 3-Tier list?
Hi,
As far as I know you can't create a Service Manager enumerator with PowerShell cmdlets (default ones). You can create an XML file using PS and import it to SCSM but I hardly can imagine the reason.
Instead you could try this
solution.
P.S. Using SMlets you can add new List Item.
Add-SCSMEnumeration
Cheers,
Marat
Site: www.scutils.com
Twitter: LinkedIn:
Graveyard:
Similar Messages
-
How to use the DLLs which created from c++ in Java?
And How to use the DLLs which created from JNI in C++?
Huh?
Are you asking how to do JNI - you should read the tutorial.
Are you asking how to load it - then use System.loadLibrary()
Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll. -
How to Use PowerShell to Delete FIM Users That Have a Null attribute name
FIM Community Information Center Article
Wiki Page:
How to Use PowerShell to Delete FIM Users That Have a Null <attribute name>
Go to the FIM Community Information Center
Mike Crowley | MVP
My Blog --
Planet TechnologiesHave you run side-by-side metrics on this?
I've run the Delete Object method and your script against similar data sets and yours appears to take a fair bit longer. I'd have to re-run in identical circumstances, a few times, to really say for sure, but my initial impression is that it will take hours
longer.
I guess the point is somewhat moot anyway, as for me the bit that generally takes longest is the actual query, rather than the deletions.
Boy how I wish I could just enter something into the FIM Portal directly that would blast out a bunch of users matching a query. One day...
FIMSpecialist.com | MCTS: FIM 2010 | Now Offering
ECMA1->ECMA2 Upgrade Services -
How to use powershell in sharepoint 2007
How to use powershell in sharepoint 2007
SPWeb site = SPContext.Current.Web;
SPGroup managerGroup = site.Groups["Group Name"];
bool isManager = site.IsCurrentUserMemberOfGroup(managerGroup);******Please mark as ANSWERED if this helps************
Thanks Rahul Prabhune -
Learn how to use Powershell with AD, Exchange and Excel
Hi.
I want to learn how to script in Powershell to make my life easier at work.
Now, I'm creating Distribution Lists with cmdlets, and other simple moves, but I'd like understand and use scripts with Excel to make it easier in AD and Exchange.
Can anyone help me find out where I can learn Powershell with those tools? I've searched google and youtube, and bought books, but I'd like to learn especially about AD and Exchange through Excel.
I also have another question, I'm trying to collect the telephonenumbers in one OU in AD, and found this cmdlet:
Get-AdUser -Filter * -Properties OfficePhone | FT OfficePhone,UserPrincipalName
I lined ut the OU path before -Filter, and used * -Properties Telephones Mobile to find the phonenumber in Properties-Telephones-Mobile in Active Directory. But I'm obviously doing something wrong.
Could anyone please help me?Hi Wezcomp,
first of all, you can use Get-Help to learn how to use Cmdlets, by asking them what it is they do:
Get-Help Get-ADUser -Detailed
By Adding the -Detailed Parameter, it will explain each Parameter of Get-ADUser and what it does. Then it will show you examples on how to use the cmdlet. Very useful tool,
Get-Help, learning to use it fully ought to be your first step, as this unlocks your access all other aspects of PowerShell. With that tool in hand, you could theoretically do the rest fully autodidactically (would be frustrating though, since you'd
like to be able to do something specific right now. Don't worry, we'll gladly help anyone truly trying to learn.).
There are lots of tutorials out there that can be useful in a general way (I added my own here). But regarding Excel:
As Fausto said, CSVs are the simple most way to do this. I'd advice against delving too deep into Excel manipulation right now (lots of frustration, little immediate rewards), Csv is your friend. Notable Commands:
Import-Csv
Export-Csv
For example, if you want to create a csv list with user data in it, using your previous example, you can do this:
Get-ADUser -Filter "*" -Properties OfficePhone | Export-Csv "C:\example\users.csv" -NoTypeInformation
By the way: FT (Format-Table) is a treacherous command: It displays objects to the console, but it is a dead end where data is concerned! Only use it when you want to check something quick on the console (like whether you got the right data), before
continuing on without using a Format command.
Cheers,
Fred
There's no place like 127.0.0.1 -
How to use migration assistant without creating dual user accounts
I want to use migration assistant to transfer apps, software & files on my macbook pro to my new macbook air. How can I do this without creating two user accounts for myself on the m-book air -- my account from the m-book pro & the one that the air makes me create as soon as I do start-up? Can I just use the same name & password for both? or will that make things go badly awry?
Thanks!If you have not booted the MBA for the first time and gone through the Setup Assistant, then I would use the Setup Assistant to make the transfer before you even create another user account. However, if you've already created the new user account on the MBA, then create a new admine one with a different username than the account you will migrate. Log into this new account, delete the first account you made, then use Migration Assistant to transfer your account from the MBP.
-
How to use Powershell to set delegate for user mailbox in Exchange 2010 and Office 365
Hello,
Can you please tell me if I can set delegate for user mailbox in Exchange 2010 or Office 365 using Powershell?
If I can, then how can I do that? (which Powershell commands for setting the delegate?)
Many thanks, and have a good day!Hi,
If you wanted to add a delegate to possiblly a large number of users or you do this during mailbox provisioning. So the following script will use
impersonation to access another users mailbox and add a delegate.
$mbtoDelegate = "[email protected]"
$delegatetoAdd = "[email protected]"
$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"
[void][Reflection.Assembly]::LoadFile($dllpath)
$service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)
$windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"
$aceuser = [ADSI]$sidbind
$service.AutodiscoverUrl($aceuser.mail.ToString())
$service.ImpersonatedUserId = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,
$mbtoDelegate);
$mbMailbox = new-object Microsoft.Exchange.WebServices.Data.Mailbox($mbtoDelegate)
$dgUser = new-object Microsoft.Exchange.WebServices.Data.DelegateUser($delegatetoAdd)
$dgUser.ViewPrivateItems = $false
$dgUser.ReceiveCopiesOfMeetingMessages = $false
$dgUser.Permissions.CalendarFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Editor
$dgUser.Permissions.InboxFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Reviewer
$dgArray = new-object Microsoft.Exchange.WebServices.Data.DelegateUser[] 1
$dgArray[0] = $dgUser
$service.AddDelegates($mbMailbox, [Microsoft.Exchange.WebServices.Data.MeetingRequestsDeliveryScope]::DelegatesAndMe, $dgArray);
Hope this helps. -
How to use Powershell to update user details in Active Directory?
Hi,
I received an updated contact list from HR of about 1500 names, and I want to update (make corrections and add missing data) ADUC quickly without having to do each user manually. How would I go about that using power-shell?
The fields that need updating are:
Under the General tab -> Description, Telephone number
Everything under the Address tab
Under the Telephone tab - > Mobile
Under the Organization tab -> Job Title, Department, Company, Manager
The server we're using is Windows Server 2008 R2.
Many thanks,
NickThere are 100 of such scripts are there online.
here are few tips and codes. you will get more.
https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
Please mark this as answer if it helps -
How to use class.getResource() to create an ImageIcon
Hi,
I am well acquainted with creating and using ImageIcon icons using the ImageIcon constructor
and putting the image file in a folder called Images which is at the same level as the
bin and src folders.
I discovered a demo program, LayeredPaneDemo, that uses class.getResource() to create
an icon and found that in my eclipse version, the icon's image file was not found when
I used the original getResource() call but the icon was created when I used the ImageIcon
constructor.
I posted on JavaRanch and eventually realized that the image file needed to be with the
.class files, so I moved the Images folder under bin and getResource() works fine and I'm
happy.
However, I have three questions for you.
One poster on JavaRanch told me that it's better to use getResource() rather than the
ImageIcon constructor for distributing an app (I'm not distributing anything but want
to do it all correctly).
Do you agree with that or can I safe keep using the ImageIcon constructor?
Another poster told me he doesn't think it's safe to leave the image file in bin because
it might be lost during the build in eclipse and that there is a way to have eclipse copy
the files to bin during the build which should mean that I can leave the images folder at
the level of bin and src.
Do you agree with that?
If yes, how do I get eclipse to copy the file during the build?
P.S.
Before I posted on JavaRanch, I put the Images folder at every level of the project's
directory as shown in eclipse (which is why I missed the bin folder until JavaRanch
whacked me upside the head) and getResource() still didn't work.The contents of the Java Source folder are compiled if they're source files, copied otherwise (assuming no filter's been put in place to prevent copying), so your images belong under a source folder.
-
How to use the java class created by "CONTIVO" as web sevrvice?
Hi All,
We are creating the java class by the Contivo mapping tool, how to use that class as a web serivce?
Very thankful if anyone gives some light on this.
Thanks in advance.....
rgds,
Rajeev Pariyadathucom.contivo.runtime.dom.Transform
Transform.transform( "Transform_HotelAvailRQ_",file1, file2);, like this we can use the contivo generated class -
How to use networkmanager-applet to creat wireless internet sharing?
hi,
I'm trying to creat a wireless connection to share internet with another laptop.
I followed the usual step like how i did it on Ubuntu
Creat New Wireless Connection-->
then I setup a connection
Mode: Ad-hoc (No security password, cuz it's for testing)
ipv4 settings: Method: shared to other computers
when I tried to connect to this connection, it does work for only a second. the notify-osd says connection established, then changed into disconnected right after. and the connection does was detected on the other laptop (with vista), but only last about a second.
I have no idea what happed. but it works perfectly on Ubuntu, with the same operations.
also, if I create a connection on vista, it can connect to that connection.
what should I do to make it works as well as how it does in unbuntu?
# /etc/rc.conf - Main Configuration for Arch Linux
# LOCALIZATION
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Asia/Shanghai"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# HARDWARE
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(acpi_cpufreq cpufreq_ondemand cpufreq_powersave usblp usbcore)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# NETWORKING
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
HOSTNAME="kwan-laptop"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
INTERFACES=(lo !eth0 !ath0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
# Network profiles are found in /etc/network.d
# This now requires the netcfg package
#NETWORKS=(main)
# DAEMONS
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
DAEMONS=(syslog-ng hal fam cpufreq @laptop-mode ufw networkmanager dnsmasq netfs cups crond avahi-daemon !network !lastfmsubmitd !lastmp alsa gdm)
[kwan@kwan-laptop ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:A9:50:3D:2B
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::213:a9ff:fe50:3d2b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1628 errors:0 dropped:0 overruns:0 frame:0
TX packets:1788 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1061372 (1.0 Mb) TX bytes:276083 (269.6 Kb)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:694 errors:0 dropped:0 overruns:0 frame:0
TX packets:694 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34780 (33.9 Kb) TX bytes:34780 (33.9 Kb)
wlan0 Link encap:Ethernet HWaddr 00:19:7D:C0:F8:5A
inet6 addr: fe80::219:7dff:fec0:f85a/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:20024 (19.5 Kb)
wmaster0 Link encap:UNSPEC HWaddr 00-19-7D-C0-F8-5A-00-00-00-00-00-00-00-00-00-00
UP RUNNING MTU:0 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)I can't get this to work either. I've tried everything I can think of.
Relevant configuration file:
# DHCP configuration generated by Firestarter
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 128.253.180.2, 132.236.58.250;
option ip-forwarding off;
range dynamic-bootp 192.168.1.100 192.168.1.110;
default-lease-time 21600;
max-lease-time 43200;
dnsmasq is installed and running.
created ad-hoc network in nm-applet, tried all sorts of different configs in there to no avail.
Has anyone gotten this working in Arch? -
How to Use NDS Tool and create a very simple application
Hi All,
Today i have Installed NDS on my machine,but i dont know
how to use it,is there any guide inside NDS which gives me step by step procedure to create a simple application.
Can any link help me know about this.version of NDS is 2.0.9.Is this latest one?
I am pretty confused about NDS and PDK,if NDS can be used to develop java apllications ,then whats the need of PDK at all?
Thanks in Advance
Rani AHi Rani,
The Portal Development Kit (<b>PDK</b>) provides documentation and examples with source code to demonstrate how to develop portal applications and portal content for the SAP NetWeaver Portal using the <b>SAP NetWeaver Developer Studio</b>.
PDK includes coding examples on the following topics:
*Creating Portal Components and Portal Services,Portal Profiles,Resources,Internationalization,Portal Beans,Page Builder,EPCF,Application Integrator,Connector Framework,Portal Navigation,Object Based Navigation,Transformation Service,User Management etc
PDK is for deployment for portal application, has very good documentation of portal development, contains sample application, Java Docs for all the apis for portal and KM and plugins for eclipse(which you don't need if you are using NWDS). It is basically a nice help for developer along with an iviews for uploading par and testing them.
In EP 6.0 it is just business package that you import to your portal. This will then give a "java development" role in portal which can be assigned to users. The role will then create a tab called "Java Development" in the top navigation and click on it you can see all the contents underneath.
If u want to see the application on which an iview is based on import that par file into NWDS.
Regards,
Pooja. -
How to use Synchronized method when creating our own controls
I don't know how to use the synchronized method when creating our own activex like controls to speed up the application.
[url http://java.sun.com/docs/books/tutorial/essential/threads/multithreaded.html] here you go
-
How to use ora:processXSLT to create HTML with BR tags included?
I am using a .xsl to create HTML for use as part of a notification process. The issue is that if in the .xsl I include the
tag, when the transform engine runs to make the HTML it creates <br> tags with out the maching </br> tags. (in doing some reading this seems to be a feature of most XSLT engines) But the result is invalid XML, so when I attempt to assign the output to a variable the process faults and I get the following error:
XPath expression failed to execute.
Error while processing xpath expression, the expression is "ora:processXSLT("XML_PURCHASE_ORDER_to_HTML.xsl", bpws:getVariableData("inputVariable", "payload", "/ns1:XML_PURCHASE_ORDER"))", the reason is The XML data is invalid.
The XML data is invalid; the reason is "Error on line 100 of document : The element type "br" must be terminated by the matching end-tag "
". Nested exception: The element type "br" must be terminated by the matching end-tag "
Message was edited by:
mlutze
Message was edited by:
mlutze
Message was edited by:
mlutzeYou can probably set the output format in the stylesheet, like:
<xsl:output method="txt" indent="no" omit-xml-declaration="yes" />
if you really don't want to use xhtml. The result might have to be wraped in a cdata block in the bpel flow?
cheers
/Stig -
How to use BYDATE to run a procedure on a given list of dates ..?
Hi all,
Our client has a meeting schedule and he needs a report prior to every meeting. He had sent us the meeting dates and my manager asked me to schedule a job in the database to run prior to his meeting so that we can get him the report on time. Now I have to schedule a job which should be executed on the dates he has given. I tried to configure the BYDATE parameter in dbms_scheduler.create_schedule but its giving me an error. My database is Oracle 10g R1 and OS is Solaris 9.
select * from V$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bi
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for Solaris: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
select PLATFORM_NAME from v$database;
PLATFORM_NAME
Solaris[tm] OE (64-bit)
BEGIN
dbms_scheduler.create_schedule (
schedule_name => 'CLIENT_REPORT_JOB',
repeat_interval => 'FREQ=DAILY;BYDATE=20080912,20080913',
comments => 'Client Report');
END;
ERROR at line 1:
ORA-27412: repeat interval contains invalid keyword: BYDATE
ORA-06512: at "SYS.DBMS_ISCHED", line 595
ORA-06512: at "SYS.DBMS_SCHEDULER", line 1045
ORA-06512: at line 2
Can someone help me, please...?
Thanks in advance.
Regards,
FlameThrowerHi,
Many of the Scheduler Calendar enhancements were introduced in 10gR2. Since you are using 10gR1 you should check the Scheduler documentation for 10gR1 to see if BYDATE is supported in that release (I don't think it is).
If it isn't, as a workaround, you can use a PL/SQL date function which has the list of dates hardcoded in it and returns the next applicable date.
Hope this helps,
Ravi.
Maybe you are looking for
-
Why are my steppers misbehaving in closed loop mode, but work fine in open loop
I have a 7344 controlling a 4 axis prototype machine, which is configured with 50,000 steps/rev and linear encoders providing 50800 counts per inch. The physical properties of the machine are less than perfect (prototype!), so there is a considerable
-
Can i open an itunes account without a credit card
hello, I live somewhere in africa but just picked up the ipad3. i cant seem to download apps onto it. my appstore account is set up but each time i try to download a free app it tells me to complete the payment side of the account opening form. i hav
-
Is there a new naming procedure in 10.5.7?
Previous to 10.5.7, whenever I partitioned a drive using Disk Utility, the names I gave it were the names it had. I'm finding since 10.5.7, however, a numeral is added...if it's the first time the name is used a "1" is added; if it's a second time, a
-
the given is problem
-
Can you change the UseNames to a difference field? e.g. FirstName+Lastname rather than displayname? I have the problem that all our display names are lastname, firstname so when you join if your name is Fred Bloggs it will announce "Bloggs, Fred is j