system-center interview questions
Top system-center frequently asked interview questions
I'm having a hard time finding any documentation on how to interact with the SCSM Console.
Almost all samples and documentation I stumble upon, are regarding interacting with the System Center Backend.
My goal is to have a TextBox and a Button, in the TextBox goes an Incident ID, and a click on the button would then open the incident in the SCSM Console.
I don't know if its even possible, does anyone of you have experience with this?
Source: (StackOverflow)
So I am trying to implement App Controller 2012 R2 in my Hyper-V setup.
I am running 1 VM that has 2 instances of SQL Server 2012 Developer edition (Default and Erpdev) and one with SQL Server 2012 Standard Edition (SC2012R2). All are configured with Mixed mode authentication. This VM is called sql-srv1
I then have another VM called sc-srv1
, which holds the SC VMM installation and should also contain the App Controller.
Installation of VMM management server and VMM Console went fine and works as it should.
I then tried to install App Controller and everything goes fine until it has to connect with the SQL Server database. I enter the name of my SQL Server and wait a few seconds for it to detect the instances and then choose SC2012R2. Database name is left as AppController
. The database is created before installation and the AD user that will be used as the service account for App Controller has sysadmin access to the entire SQL Server instance.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections
The SQL Server instance is configured to allow incoming TCP/IP connection and also named pipe connections. For troubleshooting purposes I have disabled Windows Firewall, but there is an incoming rule in place to allow TCP connections on port 1433.
I know that the SQL Server instance can be accessed from the network as the same instance is used with SC VMM.
Does anyone have an idea for why the App Controller setup is giving this error?
Source: (StackOverflow)
Wrote a script to create incidents (objects) in bulk in SCSM (Microsoft System Center Service Manager) using PowerShell. The script pulls the data required from a CSV file. I am running into the following error:
New-SCSMIncident : Index was outside the bounds of the array.
At C:\Users\portalservice\Desktop\scripts\Incidents\BULK_Create_Incidents.ps1:83 char:5 + New-SCSMIncident -Title $Title -Description $Description -AffectedUser $Affe ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Interface Packets Dropped :String) [New-SCSMIncident], IndexOutOfRangeException
+ FullyQualifiedErrorId : NewIncident,SMLets.SCSMIncidentNew
When I echo the contents of the array I see normal data... it all looks correct. Here is my script:
# Script designed to create tickets in bulk, reading the information needed from a CSVfile
# Tailored for incidents, can be modified to work with any work item
# SirLearnAlot 2015
# NOTES: Modify the $path variable to match the path of the data file being imported
# Import the smlets module
ipmo SMLets
Write-Host ""
Write-Host "Importing Smlets..."
# ---------------------------------------- Variable Decleration ----------------------------------------
Write-Host "Getting the classes needed..."
# Get the incident class
$IncidentClass = Get-SCSMClass -Name System.WorkItem.Incident$
# Get the CI Class
$CIClass = Get-SCSMClass -Name COMPANY.CI.Class$
# Get the Relationship we want to add (Affected Items)
$RelWIaboutCI = Get-SCSMRelationshipClass -Name System.WorkItemAboutConfigItem$
# Clear the error variable incase it contains anything already
$error.clear()
# --------------------------------------------- Data Import --------------------------------------------
# Import the CSV Data file containing list of incidents to create and their information
Write-Host "Importing CSV Data File..."
$path = "C:\Users\portalservice\Desktop\Script Data\Work Item Creation\Incidents\11.12.15\data.csv"
$data = ipcsv $path
if ($error -like "Could not find file *")
{
Write-Host "Encountered an error while importing the data file from '$path'. Please verify the path directories and file exist and run the script again."
exit
}
else
{
Write-Host "Successfully imported data file!"
Write-Host "Beginning ticket creation..."
#pause
}
# ---------------------------------------------- Execution ---------------------------------------------
# Begin going through file line by line
foreach ($case in $data)
{
# Clear the error variable
$error.clear()
# Visual Formatting
Write-Host ""
Write-Host "----------------------------------------------------------------------------------------"
Write-Host ""
# GETTING THE INFORMATION FROM DATA FILE AND STORING IN VARIABLES
# Get the Info for the Incident to create
$Title = $case.Title
Write-Host "Got case title: $Title"
$Description = $case.Description
Write-Host "Got case description: $Description"
$AffectedUser = $case.AffectedUser
Write-Host "Got case affected user: $AffectedUser"
$Classification = $case.Classification
Write-Host "Got case classification: $Classification"
$Impact = $case.Impact
Write-Host "Got case impact: $Impact"
$Urgency = $case.Urgency
Write-Host "Got case urgency: $Urgency"
$SupportGroup = $case.SupportGroup
Write-Host "Got case support group: $SupportGroup"
$PrimaryOwner = $case.PrimaryOwner
Write-Host "Got case owner: $PrimaryOwner"
$Vendor = $case.Vendor
Write-Host "Got case vendor: $Vendor"
$Customer = $case.Customer
Write-Host "Got case customer: $Customer"
$ReportedOn = $case.ReportedOn
Write-Host "Got date reported on: $ReportedOn"
# Get the name of the correct CI to add
$CIToAddNum = $case.CI
Write-Host "Got case CI: $CIToAddNum"
# Apply the non-OOB Values to the property hash table
$PropertyHashTable = @{"Vendor" = $Vendor; "Customer" = $Customer; "Reported_On" = $ReportedOn}
# INCIDENT CREATION
Write-Host "Attemping to create Incident from case data..."
New-SCSMIncident -Title $Title -Description $Description -AffectedUser $AffectedUser -Classification $Classification -Impact $Impact -Urgency $Urgency -SupportGroup $SupportGroup -Bulk
# Checks to see if the there is an error, if so displays a warning message and exits
if (!$error)
{
Write-Host "Incident creation successful."
}
else
{
Write-Host "$error"
Write-Host "Error creating the incident. Check the incident creation code and run this script again."
exit
}
# INCIDENT RETRIEVAL (POST-CREATION)
Write-Host "Attempting to retrieve incident for modification (Adding Customer, Vendor, and Reported On date to ticket)"
$Incident = Get-SCSMObject -Class $IncidentClass -Filter "Description -like '%$Description%'"
# Checks to see if the retrieval failed, if so displays error message and exits script
if ($Incident = $null)
{
Write-Host "Incident retrieval failed. Check the incident retrieval code and run the script again."
exit
}
# Apply the property hash table to the retrieved incident
$Incident | Set-SCSMObject -PropertyHashtable $PropertyHashTable
# ADDING THE CI TO THE INCIDENT
# Get the CI from the CMDB
$CIToAdd = Get-SCSMObject -Class $CIClass -Filter "DisplayName -eq '$CIToAddNum'"
if ($CIToAdd = $null)
{
Write-Host "Cannot find $CIToAddNum in the database, this CI does not seem to exist or the code to retrieve the CI failed. Please import the CI into the SMDB or fix the retrieval code and run this script again"
exit
}
# Attempt to add the CI to the Incident (Create a new relationship)
# Note: Due to a bug the -bulk paramater is required
Write-Host "Attempting to add $CIToAddNum to Incident..."
New-SCSMRelationshipObject -Relationship $RelWIaboutCI -Source $Incident -Target $CIToAdd -bulk
# Check if script throws error (cannot find the CI from the data file in our SMDB)
# If so provides error message and exits, otherwise provides success message
if ($error -like "Cannot bind argument to parameter 'Target' because it is null.")
{
Write-Host "Encountered an error while trying to add $CIToAddNum to $IncidentNum, this CI is not in the Service Manager Database or there was a problem retrieving it. Please import the CI into the SMDB or check the retrieval code and run this script again"
exit
}
else
{
Write-Host "Successfully Added!"
}
}
Write-Host ""
Write-Host "Success! All Incidents Corrected :)"
Not sure what the problem is here, any ideas?
Source: (StackOverflow)
Am new to scripting kindly help me write a script that will connect to VMM and get details such as below.
Name : ABC Machine
CPUCount : 8
Memory : 8192
DynamicMemoryEnabled : False
VHDType : DynamicallyExpanding
MaximumSize : 214748364800
Size : 4194304
Location : C:\ClusterStorage\Volume3\CRB\CRB Test Machine_disk_1.vhdx
Classification : Silver
VHDType : DynamicallyExpanding
MaximumSize : 4748364800
Size : 41304
Location : C:\ClusterStorage\Volume2\CRB\CRB Test Machine_disk_2.vhdx
Classification : Silver
I have been able to get individual commands to get the info however I am not able to make a script that will do it for all VMs and convert disk sizes to GB
My working commands are
Get-SCVirtualMachine -Name "ABC Machine" | select Name, CPUCount, Memory, DynamicMemoryEnabled | fl
$DiskINfo = Get-SCVirtualDiskDrive -VMMServer "abc.abcgroupcloud.com" -VM "ABC Machine"
$DiskINfo.VirtualHardDisk | select VHDType, MaximumSize, Size, Location, Classification
Source: (StackOverflow)
I am getting an error on very few occasions while running the below script.
I have written the script to get the data from an SCVMM server and copy it to a CSV file. This script is runing in every 15 minutes. we have scheduled this using our scheduler. But the issue here is that sometimes it is throwing below warning and it is not copying the required data to the CSV file. Most of the time it is running. Very few instances it is throwing an error:
Get-SCCloud : VMM is unable to connect to the VMM management server calo-infvmm-01.calocosn.local because the specified computer name could not be resolved.
2016-05-15 19:01:30,334 INFO running system command: C:\cc-working\scripts\PowerShell\VMHours\Sydney\GetStorageDetails.bat -d 20160515 > C:\cc-working\usage_files\VMUphours\Sydney\Output\VMHours_20160515.csv
2016-05-15 19:01:33,874 WARN Get-SCCloud : VMM is unable to connect to the VMM management server
2016-05-15 19:01:33,874 WARN calo-infvmm-01.calocosn.local because the specified computer name could not be
2016-05-15 19:01:33,890 WARN resolved. (Error ID: 1601)
2016-05-15 19:01:33,890 WARN
2016-05-15 19:01:33,890 WARN Ensure that the computer name is correct, and then try the operation again. If
2016-05-15 19:01:33,890 WARN the problem persists, contact your network administrator.
2016-05-15 19:01:33,890 WARN At C:\cc-working\scripts\PowerShell\VMHours\Sydney\usage.ps1:7 char:11
2016-05-15 19:01:33,890 WARN + $clouds = Get-SCCloud -VMMServer $VMMServer
2016-05-15 19:01:33,890 WARN + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-05-15 19:01:33,890 WARN + CategoryInfo : ReadError: (:) [Get-SCCloud], CarmineException
2016-05-15 19:01:33,890 WARN + FullyQualifiedErrorId : 1601,Microsoft.SystemCenter.VirtualMachineManage
2016-05-15 19:01:33,890 WARN r.Cmdlets.GetSCCloudCmdlet
2016-05-15 19:01:34,373 INFO command completed successfully with an exit value of '0'
2016-05-15 19:01:34,389 INFO reader charset from auto-detect: ASCII
2016-05-15 19:01:34,389 INFO INPUT: file [C:\cc-working\usage_files\VMUphours\Sydney\Output\VMHours_20160515.csv]
2016-05-15 19:01:34,404 INFO collection feed: Sydney-VMHours-Collection
Below is my script:
$VMMServer = "calo-infvmm-10001.calocosn.local"
$a = ((Get-Date).ToUniversalTime()).ToString("yyyyMMddTHHmmss")
$clouds = Get-SCCloud -VMMServer $VMMServer
$vmHeader = [string]::Concat("VMId",",","SubscriptionId",",","VMName",",","OperatingSystem",",","Memory(MB)",",","CPUCount",",","DiskUsed(GB)",",","DiskAllocated(GB)",",","StorageClassification",",","Owner",",","CreationTime",",","SampleTime",",","Status",",","StartAction",",","StopAction")
Write-Output $vmHeader
foreach ($cloud in $clouds) {
$VMs = Get-SCVirtualMachine -Cloud $cloud
foreach ($VM in $VMs) {
$size = 0
$maxSize = 0
$classification = "Standard"
foreach ($disk in $VM.VirtualHardDisks) {
$classification = $disk.Classification
$size += $disk.Size / 1gb
$parentDisk = $disk.ParentDisk
while ($parentDisk) {
$size += $parentDisk.Size / 1gb
$parentDisk = $parentDisk.ParentDisk
}
$maxSize += $disk.MaximumSize / 1gb
}
$vmText = [string]::Concat($vm.ID,",",$vm.UserRoleID,",",$vm.Name,",",$vm.OperatingSystem,",",$vm.Memory,",",$vm.CPUCount,",",$size,",",$maxSize,",",$classification,",",$vm.Owner,",",$vm.CreationTime,",",$a,",",$vm.Status,",",$vm.StartAction,",",$vm.StopAction)
Write-Output $vmText
}
}
Source: (StackOverflow)
I am authoring a management pack in XML and using the authoring console in System Center. For testing the MP I created, I need to install agents on machines that have my distributed app running.
SCOM Operations Manager 2012 agent installation fails with
One or more computers you are trying to manage are already in the process of being managed
I know this issue should be resolved from the database - do you know what SQL queries I should run to remove the machines I am trying to install agents on from the pending actions table?
Source: (StackOverflow)
I asked this question on the TechNet forums without any luck (link), so I thought I'd see if anyone around here might have an answer:
At our company we have a VMM server (SCVMM 2012) controlling two physical Hyper-V hosts (let's call them HOST01 and HOST02). I'm trying to get some information about HOST01 via PowerShell queries on the VMM server:
Get-VMHost -ComputerName HOST01
..which among other things returns some CPU info:
...
LogicalProcessorCount = 12
PhysicalCPUCount = 1
CoresPerCPU = 12
L2CacheSize = 2048
L3CacheSize = 20480
BusSpeed = 100
ProcessorSpeed = 2294
ProcessorModel = Xeon
ProcessorManufacturer = Intel
ProcessorArchitecture = 9
ProcessorFamily = 179
CpuUtilization = 33
...
Now, I happen to know that HOST01 runs on a 6 core CPU with hyperthreading *), so LogicalProcessorCount = 12
is correct, but I expected to see CoresPerCPU = 6
(not 12). Why doesn't VMM show the correct number of physical cores? Am I looking in the wrong place?
Alternatively, is there a way to see whether hyperthreading is activated on the host, so I could divide by 2 as a last resort?
*) HOST01 is our own test server, so I have queried it separately through WMI to get CPU data, but in a production environment we cannot rely on having access to anything but the VMM server.
Source: (StackOverflow)
I use a powershell script, triggered by teamcity, to spin up new Windows Server VMs. Currently, when the machine is up and running, I need to log in via the VMM console to make a couple of configuration changes (enable file sharing, network discovery, msdeploy and remoting over winrm) in order to allow other teamcity jobs to be able to deploy enterprise apps to the VM.
I haven't found any way to run my config setup scripts on the new VM other than by using the GUI console in VMM. For VMHosts, there is Invoke-SCScriptCommand, but this doesn't work for virtual machines themselves. Am I missing something or do I have to alter the template that my VM's are built from, in order to get the required config on the VMs?
Source: (StackOverflow)
i created a Template with my Virtual Machine Manager. ( SystemCenter 2012 SP1 ) I am trying to deploy this to my hyper-v host. After a wihle , the process is going to stop with an error:
Error (22042) The service (123) was not successfully deployed. Review
the event log to determine the cause before you take corrective
action.
Recommended Action The deployment can be restarted by retrying the
job.
Error (12702) Cannot bind to TCP port 443 because it is in use by
another process on the vmmanger.de.myserver.corp server.
Recommended Action Wait until the other process is completed, and then
try the operation again.
Error (12702) Cannot bind to TCP port 443 because it is in use by
another process on the vmmanger.de.myserver.corp server.
Recommended Action Wait until the other process is completed, and then
try the operation again.
Source: (StackOverflow)
New to SCCM 2012 and have a lot of applications with msi's that I am creating applications for. I've also been able to create a few applications with exe's. Is the only reason to use a package, if you need to run multiple programs or apps in succession?
Source: (StackOverflow)
We’re running System Center 2012 with SharePoint Management Pack installed. It’s not really used in anger, but recently we have been asked to output stats on user logins and concurrent connections from the reporting console.
Having reviewed the guide for the 2013 SharePoint MP, I can’t see any monitors or rules that would enable this. Unless I’m missing something?
Does this mean it would have to be done at a Windows server level, and if so what are the monitors that would enable the stat to be collected in the Data Warehouse?
Any help appreciated. Thank you!
Source: (StackOverflow)
I have a number of Windows Services written in .NET/C# and each of these have custom performance counters added via the System.Diagnostics.CounterCreationData and System.Diagnostics.CounterCreationDataCollection classes.
In System Center 2012 I have a Dashboard for each of these Services in which I want to display/graph the values from my custom counters. However, I only see the standard performance counters which are the same for all Services and can not find my custom counters anywhere. My counters are visible via PerfMon but SCOM does not see them.
Is it possible to do what I want, and how?
Thanks
Source: (StackOverflow)
I have an issue with simple service upgrade. My service has one tire and it has a web application.
When I try to upgrade the service, the following error occurred.
`Application (C:\ProgramData\VirtualMachineManagerData\CacheResources\779b4f72f2a647e2b6dc119f20e0da25\BusinessCenter_Package_v0.0.0.57.zip, WebDeploy) removal failed on the virtual machine (HBC_STAG_VM_01). DetailedErrorMessage: An error was encountered when processing operation 'Delete Directory' on 'C:\inetpub\wwwroot\Content'.`
Then I have added a web deploy configuration file msdeploy.exe.configsettings with following contents to disable two webdeploy rules.
<configuration>
<rules>
<rule name="BlockHarmfulDeleteOperations" enabled="false" />
<rule name="BlockUnsupportedDeleteOperations" enabled="false" />
</rules>
</configuration>
Now I am getting following error.
`Application (C:\ProgramData\VirtualMachineManagerData\CacheResources\a9483ef219134b75bf1422774b3efdcb\BusinessCenter_Package_v0.0.0.59.zip, WebDeploy) removal failed on the virtual machine (HBC_STAG_VM_01). DetailedErrorMessage: Provider setAcl is blocked, by BlockUnsupportedDeleteOperations, from performing delete operations to avoid unexpected results.`
I never able to successfully upgrade a service. Any help is greatly appreciated.
Any help is highly appreciated.
Sapumal.
Source: (StackOverflow)
I was trying to set up the network config in System Center Virtual Machine Manager, when i got some problems while adding virtual switches to my hosts.
One adapter is showing the mac-address in this format: 000000000000
The other adapter is showing the mac-address in this format: 00:00:00:00:00:00
Screenshot of the two ethernet adapters side by side in SCVMM
This gives me an error (Error 625):
"The specified MAC address format is incorrect. The MAC address format is 00-00-00-00-00-00"
Source: (StackOverflow)
I am trying to use PowerShell Script in a management pack I am creating to trigger discovery automatically.
I try using the PowerShell script described here in link:

TaskId : ff34dc4f-2db3-1736-d9f2-6d85b539ff96
BatchId : 53d9f71a-a3ce-494f-9536-cc2443d6fb1d
SubmittedBy : dev2\administrator
RunningAs :
TargetObjectId : 6904f683-999f-ae14-5be7-fef74d1e5596
TargetClassId : ab4c891f-3359-3fb6-0704-075fbfe36710
LocationId : 6904f683-999f-ae14-5be7-fef74d1e5596
Status : Succeeded
Output : <DataItem type="System.OnDemandDiscoveryResponse" time="2013-08-16T11:36:10.9682547-07:00" sourceHealthServiceId="6904F683-999F-AE14-5BE7-FEF74D1E5596"><Result>DISCOVERY_NOT_FOUND</Result><Timestamp></Timesta
mp></DataItem>
ErrorCode : 0
I tried the Operations Console Task and I get the same result as shown by the image.
NOTE I pass in the GUID of the Discovery I have. I tried keeping Target Id as $Target/Id$ and also changing it to GUID of target class that my discovery runs on. Both gave same result below.
Source: (StackOverflow)