Post by shaiksccm on Feb 28, 2021 15:10:00 GMT
Hi,
Am trying edit xml to rename computer based on Department. Here is TS Variables which am currently using.
<Action Type="TSVar" Name="SMSTSPreferredAdvertID">%TSSelection%</Action>
<Action Type="WMIRead" Variable="PCModel" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Model"/>
<Action Type="WMIRead" Variable="PCManufacturer" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Manufacturer"/>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop"'>%XHCLMachineChecked%L%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop"'>%XHCLMachineChecked%D%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual"'>"%XHCLMachineChecked%V%VMName%"</Action>
But i wanted to name computer based on department based on OSD Image Selection from the drop down and here are TS variable which am using and it is not working
<Action Type="WMIRead" Variable="PCModel" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Model"/>
<Action Type="WMIRead" Variable="PCManufacturer" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Manufacturer"/>
<!-- <Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop" AND "OSDSelectedImage" = "IsStandardMachine"'>%XHCLMachineChecked%L%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop" AND "OSDSelectedImage" = "IsStandardMachine"'>%XHCLMachineChecked%D%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop" AND "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CL%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop" AND "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CD%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual"'>"%XHCLMachineChecked%V%VMName%"</Action> -->
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual" and "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CL%SerialNumber%</Action>
Please help me guys am stuck here.
Thank you
Am trying edit xml to rename computer based on Department. Here is TS Variables which am currently using.
<Action Type="TSVar" Name="SMSTSPreferredAdvertID">%TSSelection%</Action>
<Action Type="WMIRead" Variable="PCModel" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Model"/>
<Action Type="WMIRead" Variable="PCManufacturer" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Manufacturer"/>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop"'>%XHCLMachineChecked%L%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop"'>%XHCLMachineChecked%D%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual"'>"%XHCLMachineChecked%V%VMName%"</Action>
But i wanted to name computer based on department based on OSD Image Selection from the drop down and here are TS variable which am using and it is not working
<Action Type="WMIRead" Variable="PCModel" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Model"/>
<Action Type="WMIRead" Variable="PCManufacturer" Namespace="root\cimv2" Class="Win32_ComputerSystem" Property="Manufacturer"/>
<!-- <Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop" AND "OSDSelectedImage" = "IsStandardMachine"'>%XHCLMachineChecked%L%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop" AND "OSDSelectedImage" = "IsStandardMachine"'>%XHCLMachineChecked%D%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Laptop" AND "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CL%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Desktop" AND "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CD%SerialNumber%</Action>
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual"'>"%XHCLMachineChecked%V%VMName%"</Action> -->
<Action Type="TSVar" Name="OSDComputerName" Condition='"%XHWChassisType%" = "Virtual" and "OSDSelectedImage" = "IsCCMachine"'>%XHCLMachineChecked%CL%SerialNumber%</Action>
Please help me guys am stuck here.
Thank you