Automated Software deployment through SCCM 2012 using wmi - powershell

I was been looking for an option to automated deployment(Installation) of software in the client machines using SCCM 2012 by making calls to WMI classes through code. I have found the following URL
http://www.sepago.de/e/david/2012/03/17/microsoft-configuration-manager-2012-and-powershell-ae-create-deployments
But this only advertises the packages available for install. I want something that would allow me to actually install the software. Hope my query was clear.
Regards
Tiklu

Start-CMApplicationDeployment
Start-CMPackageDeployment
Start-CMTaskSequenceDeployment
And with the -DeployPurpose<DeployPurposeType> parameters set it to Required
You can't do it with Start-CMSoftwareUpdateDeployment.

I'd like to suggest the Total Software Deployment software for remote software installation. This tool is a new alternative to SCCM. It may be a bit less functional in the current version, but I beleive that it will develop into something bigger soon.

Related

SQL Server (WINCC) does not exist

I'm really in trouble having Wincc RT Professional running on my computer. It has consistently come with an error "Compilation not possible. the "WinCC" SQL instance is either not running or not available" anytime I compile it. I searched that it dues to SQL server (WINCC) is not running so I was gonna enable it in Sql server configuration manager but it didn't have such thing like that in the list of SQL Server services. How can I install it manually or make Wincc Pro run successfully? I'm using TIA Portal V14 that worked well with Wincc RT Advanced and the SIMATIC WinCC Runtime Professional has also installed formerly. Hope this description enough and clear for you. Thanks in advance.
This error has been reported a number of times on the Siemens forums. Unfortunately, it seems every time the forum users stop short of saying what they did to fix it (or they didn't fix it)...
As you may have guessed, the backbone of WinCC RT Professional is a Microsoft SQL Server database, although what flavor and version of SQL they embed in their product, I'm not sure.
Your installation has gone bad in some way. Sorry that's not a helpful description, but it's hard to tell why without further information, so here are some fault finding steps I would take.
If you haven't done so already, have a quick scan of forum to see if you can find a quick fix.
If you were never, ever able to compile with this installation, can I suggest the following as general fault-finding:
A. if a working installation on another machine is available, compare the installs as much as possible to find out what's different. You might find the compatibility tool useful for this: compatibility tool
B. If (A) is not possible, perform a fresh installation on a different machine without any other siemens software, and try to compile.
C. if (B) works, you might have a software conflict. It happens. I thought that the installers for the different flavors of WinCC check for this before installing, but I'm not sure.
Check if your SQL service is started, as shown in the picture below

How to create virtual appliance like bitname and turnkey linux

i have a question i am bit of a linux user sort of programmer but i couldn't understand is how to develop your own virtual appliance similar to bitnami and turnkey and if there is a way please tell me!!
Take a look at TKLPatch, a simple tool for customizing and extending any of 100+ appliances in the TurnKey Linux library. The resulting patch can be used to generate an ISO that can be installed in a VM or on real hardware.
If you have any questions or need help, feel free to post to the TurnKey forum.
Updated info
Hopefully my necro-posting adds some value...
The new TurnKey build tool is TKLDev. It uses a similar paradigm to TKLPatch, but instead of requiring you to start with an ISO; it builds completely from source.
So long as you can script the install (and there's almost always a way that you can) and it will work on Debian, then you can build yourself a software appliance in a load of different build types (inc. OVA, VMDK, hybrid ISO etc) using TurnKey Linux's TKLDev build engine. The major VM platform that it doesn't (yet) support is Hyper-V but the ISO installs.

How does Win32_Product work?

While working on an auditing project I came across different problems regarding software and licenses. My project runs on Linux with Perl and I successfully retried remote machine software via both SNMP and WMI. The big issue is that the two protocols return quite different results. For instance one may find a program and the other may not, and vice versa.
I know that SNMP retrieves software wich have a related uninstall key on (correct me if I am wrong):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
But what about Win32_Product? This is what the documentation says about:
The Win32_Product WMI class represents products as they are installed
by Windows Installer. A product generally correlates to one
installation package.
What does that mean? And, last but not least, is there a way to improve how installed software are retrieved? I mean if I lookt at my installed software from the control panel and confront results with SNMP and WMI there are a lot of wierd things.
EDIT: Just a quick update, I developed a couple of programs in .NET C# that I installed on many computers. Too bad neither WMI and SNMP find them out. I installed these programs with the usual Visual Studio generated setup. Any hints?
People basically use WMI to query various system parameters. WMI exposes a lot of interfaces which one can leverage. It is mostly used with VBScript but one can also use C++/COM or C# to interact with it. This Wikipedia article can give you a detailed explanation about WMI and then you may understand what Win32_Product Class does. This is another great article and a must-read for someone beginning to work with WMI.
Also go through these articles without fail:
Retrieving a CLASS
Retrieving an Instance
Retrieving part of an Instance
Accessing a Qualifier
These articles will give you a good understanding of WMI concepts.
As far as Windows installer is concerned:
Windows installer is based on Server-Client architecture. The Windows Installer is actually a Windows Service. The various features that Windows installer supports has made it the most standard method of application life-cycle management. The Basic MSI(there is nothing Basic about it) package with the .msi extension is used to package and distribute apps.
The Basic MSI package is basically a DATABASE. The application binaries and other stuff may be packaged as CAB files and included in the MSI package or may exist outside of it.
This is known as TRANSACTIONAL install method. The Application Packaging developer just has to fill in the various tables in the database and the Windows Installer engine takes care of everything else. This may seem or sound easy but is very difficult and needs a lot of knowledge.
When the application is installed on to any sytem, Windows Installer writes all the Registry keys needed for proper management of all resources installed on to the system. As the life-cycle of an application is managed by Windows Installer, it can easily support:
1) Repair
2) Resilience
Once you go through all this, you may have a better idea of all the parties involved in your case. Then you will have clearer questions(or may not!), and we can help you better(or you may not need it at all!).

Windows Web Platform Installer vs Manual Install?

I am going to be moving all my websites to a Windows Web Server 2008 R2 machine. I have installed it in a virtual machine to test that my websites work with it.
I have noticied that there is a program called Web Platform Installer. I have used it to install a few sites but I was just thinking is it a security risk using this? Would it be better for me to manually install the sites (WordPress, Umbraco, etc)
Thanks
We push that out to all our customers just for ease of deployment, and I have not seen any security issues with it, however, I would question its reliability as it fails about 10% of the time (to install whatever I have selected). Having said that, when it does work, its a fairly good tool, as it will install any prerequisites that you may not have been aware of (like SMO, or if you try to install Wordpress without MySQL), and will also keep you up-to-date on newer version of software that you have installed.

How can I change features in Windows Vista programatically?

I'm looking for a way to programatically change features ("Programs and Features" -> "Turn Windows Features on or off") in Windows Vista (and newer Redmond OS, e.g. Server 2008).
Ideal solution would be in the form of a Powershell script (Get-Features, Set-Features), however any pointers to MSDN/other documentation would be very welcome! (my initial quick Google/StackOverflow search came up empty).
Having an automatic way to turn features on or off would allow me to automate computer setup for different scenarios. For example, to develop ASP.NET applications using IIS a bunch of IIS features need to be installed that are not installed by default. My current process of "make sure at least the features shown in this screenshot are checked" leaves a lot to be desired.
I just found an extension that works for Windows 7. "PowerShell module to Add/Remove Windows 7 features" - https://psclientmanager.codeplex.com/
in windows server 2008, there is the ServerManagerCmd command. This can install IIS with or without the subfeatures you want. You can also install/uninstall most of the major Windows features.
You can setup your server the way you want then run ServerManagerCmd -query template.xml. This exports the configuration to an Xml file.
You need to transform the file to prepare it for use on other servers
Copy the transformed file to the server you want to configure and run ServerManagerCmd -inputPath transformTemplate.xml
The way to do this in Vista and Windows 2008 is with the PKGMGR command line tool. Search MSDN for this tool to find a list of features/packages.
It looks live Powershell V2 on Server 2008 R2 (Beta) has a module that does exactly this. Let's hope Windows 7 will have this functionality as well...
For more details, see Managing Server Features with PowerShell Cmdlets on Windows 2008 Server R2 Beta
There's unfortunately not a set of cmdlets, yet, nor is there anything in WMI or any other easily-accessible area. Interestingly, Server Core's script-based role management features will only work on Server Core :). Windows 7 may bring some relief in this regard - but it also might not. In the meantime, you're pretty much left with the native Win32 APIs mentioned in the other answer.
As an aside, I should point out that MS deliberately doesn't want applications installing major OS features due to the security considerations. Adding IIS isn't something done lightly, and it brings with it security considerations and responsibilities. Witness MS' own application setups, which check for pre-reqs like that, but do not offer to install them for you. While I understand wanting to make your app setup as painless as possible, there's also damage to be done in putting major functionality into the OS under someone's nose :). I personally would prefer that apps err on the side of caution, tell me what they need, and let me make the decisions about how and what to install things - especially major functionality that will open ports and be able to execute arbitrary code, like IIS.