![]() ![]() A direct membership rule lets you explicitly choose the members of the device collection. The Add-CMDeviceCollectionDirectMembershipRule cmdlet adds a direct membership rule to a device collection. Output : Add a computer to a collection (Direct Membership) Get-CMDevice -Fast | Where-Object | Select Name The last part Select-Object Name will only return the name of the non-clients (without the rest of the properties). We will also use the Get-CMDevice cmdlet to list all non-clients. Output : Get All Device that are not client ![]() Get-CMDevice – Get a Configuration Manager device. So here’s a couple of examples to get you started : Get information about a specific device At the time of this writing, there are hundreds of cmdlets available.Īs with any Powershell cmdlet, the cmdlet is pretty self-explanatory for example the GET-CMDevice cmdlet will “ GET” a “ CM” (Configuration Manager), “ Device” information. Once connected, you can enter any SCCM Powershell cmdlet to control your site. For example, if the site code is “SCD”, the prompt will show: PS SCD:\> A Windows PowerShell loads, you’ll see a prompt that contains your site code.Select the upper-left white arrow choose Connect via Windows PowerShell.If you’re not familiar with PowerShell and SCCM, the easiest way to connect to your site is to use the shortcut in the console : Starting in version 2010, the Configuration Manager PowerShell cmdlet library supports PowerShell 7. ![]() Supported versions of SCCM’s current branch support Windows PowerShell version 5.1. When you get used to it, you can write more complex scripts to automate and save lots of time. You can do pretty much anything using Powershell. This is very useful to do stuff in SCCM without using the console. You can run SCCM Powershell cmdlet and scripts from the SCCM console or from a Windows PowerShell session. ![]()
0 Comments
Leave a Reply. |