<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sitecode &#8211; Haikos Blog</title>
	<atom:link href="https://www.hertes.net/tag/sitecode/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.hertes.net</link>
	<description>Blog von Haiko Hertes zu allen Themen rund um Microsoft, Cloud und Datacenter</description>
	<lastBuildDate>Wed, 27 Apr 2016 17:11:55 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>System Center Configuration Manager: Site Code eines Clients auslesen</title>
		<link>https://www.hertes.net/2016/04/system-center-configuration-manager-site-code-eines-clients-auslesen/</link>
					<comments>https://www.hertes.net/2016/04/system-center-configuration-manager-site-code-eines-clients-auslesen/#respond</comments>
		
		<dc:creator><![CDATA[Haiko]]></dc:creator>
		<pubDate>Tue, 26 Apr 2016 13:52:11 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[System Center]]></category>
		<category><![CDATA[System Center Configuration Manager]]></category>
		<category><![CDATA[Configuration Manager]]></category>
		<category><![CDATA[SCCM]]></category>
		<category><![CDATA[Sitecode]]></category>
		<category><![CDATA[Standort]]></category>
		<guid isPermaLink="false">http://www.hertes.net/?p=3165</guid>

					<description><![CDATA[Um den Site Code (Standortcode) eines SCCM Clients auszulesen, kann man WMI verwenden. Ich habe dafür ein kleines PowerShell Script geschrieben: &#60;# .Synopsis Returns the Site Code of a SCCM Client as a String .DESCRIPTION Queries a given computer using WMI and returns its site code for System Center Configuration Manager (Tested on 2012 R2 and 1511) .EXAMPLE Get-SMSSiteCode -MachineName PC1 Get's the site code of the Computer named PC1 #&#62; Function Get-SMSSiteCode { Param( # The Computername of the machine that you want to query for it's SCCM Site Code [Parameter(Mandatory=$true)] [string]$MachineName ) Return (Get-WmiObject -ComputerName $MachineName ` -Namespace&#8230;]]></description>
										<content:encoded><![CDATA[<p>Um den Site Code (Standortcode) eines SCCM Clients auszulesen, kann man WMI verwenden. Ich habe dafür ein kleines PowerShell Script geschrieben:</p>
<pre lang="PowerShell" line="1">&lt;# .Synopsis Returns the Site Code of a SCCM Client as a String .DESCRIPTION Queries a given computer using WMI and returns its site code for System Center Configuration Manager (Tested on 2012 R2 and 1511) .EXAMPLE Get-SMSSiteCode -MachineName PC1 Get's the site code of the Computer named PC1 #&gt;

Function Get-SMSSiteCode
{
    Param(
        # The Computername of the machine that you want to query for it's SCCM Site Code
        [Parameter(Mandatory=$true)]
        [string]$MachineName
    )

    Return (Get-WmiObject -ComputerName $MachineName `
                          -Namespace "root\CCM" `
                          -Class sms_authority `
           ).Name.TrimStart("SMS:")
}
</pre>
<p><a href="https://onedrive.live.com/redir?resid=836DDAB51184D5B9!363520&amp;authkey=!AKbYFRwALpGpUO4&amp;ithint=file%2cps1">Downloaden könnt ihr das Skript hier!</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.hertes.net/2016/04/system-center-configuration-manager-site-code-eines-clients-auslesen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
