Showing posts with label Citrix. Show all posts
Showing posts with label Citrix. Show all posts

PowerShell command to list out all the VDAs registered or registered/unregistered to site and schedule it using task scheduler send the report over mail

 PowerShell command to list out all the VDAs registered or registered/unregistered to site and schedule it using task scheduler send the report over mail

The PowerShell command will be used to collect only unregistered VDAs from the site.


Get-BrokerDesktop -MaxRecordCount 5000 | Select-Object ClientName, AssociatedUserFullNames, MachineName, RegistrationState, StartTime, LastDeregistrationReason, CatalogName, LastConnectionTime, FunctionalLevel |Where-object {$_.RegistrationState -eq 'Unregistered'} | Export-Csv -Path C:\TEMP\Get-brokerDesktop.csv |Format-Table –AutoSize

 

Send-MailMessage –From administrator@ads.com –To VDA@ads.com –Subject “Guess what!” -Attachment "Get-brokerDesktop.csv" –Body “I am testing to get VDA status through PowerShell” -SmtpServer smtp.mail.com -Port 25 



Below PowerShell command will be used to collect all VDAs registered/unregistered from the site.


Get-BrokerDesktop -MaxRecordCount 5000 | Select-Object ClientName, AssociatedUserFullNames, MachineName, RegistrationState, StartTime, LastDeregistrationReason, CatalogName, LastConnectionTime, FunctionalLevel, AssociatedUserSID, HostedMachineName | Export-Csv -Path C:\TEMP\Get-broker6.csv |Format-Table -InformationAction Stop -AutoSize

 

Send-MailMessage –From administrator@ads.com –To VDA@ads.com –Subject “Guess what!” -Attachment "Get-brokerDesktop.csv" –Body “I am testing to get VDA status through PowerShell” -SmtpServer smtp.mail.com -Port 25 


If you want  more details, refer below link and update the parameters accordingly.


https://developer-docs.citrix.com/projects/citrix-virtual-apps-desktops-sdk/en/latest/Broker/Get-BrokerMachine/ 


Output will be like below.



You can schedule it using the task scheduler.

You need to save the script file in the same location where the report file is getting exported.

For me it is c:\temp

Login to server from where you want to schedule task

Open Task scheduler

Create new task -> Give task name

In security options select how you want to run the script 

In my case I have selected Run whether user is logged on or not

Check mark on Run with highest privileges.



Click on Triggers and set the scheduled time



Click on Action and in Action select start a program

In program/script browse and select powershell.exe

In arguments: give the script path with script name .ps1

Start in: Give the path where you have kept your script.



Apply OK and wait for the scheduled time, task will execute at scheduled time like below



Manage Delivery Groups allow and restrict Users and groups to use desktop in Citrix delivery group

 

I have created 3 delivery groups in my test LAB.

To give access to these delivery groups I shall create 3 different groups in Active Directory.

I shall create 3 users and make them members of the group.

Next I shall give access to the delivery group from Citrix studio.


Below is the delivery group list.



Below is the list of users and groups



Added all 3 users in security group member list



Now login to Citrix Studio server and open console.

Click Delivery Groups




Select Delivery group from list where you want to do access modification 

Click Edit delivery group


Select Restrict use of this delivery group to the following users.


Click Add 



Enter group name that you want to allow access



Click check name and Okay

Click apply and Ok



Now click on delivery group from the list

And click Details, you will see delivery group details.



Now access Storefronts from Web console

Enter user id and password 

ADS\SRV2K16A

****************


Click on Desktops 

Now you will see a mapped desktop in web console.



Launch Desktop from console



Create Delivery group in Citrix 7.9 Step by Step

 


Create Delivery group in Citrix 7.9 Step by Step


To create a Delivery Group we need to first create a machine catalog and before creating a machine catalog we need to deploy machines.


Login to DDC server 

Open Citrix Studio -> Select Delivery Group



Right click on Delivery Group -> Create Delivery group



Click Next



Select the machine catalog that you want to assign in delivery group

In my case I am selecting DEMOVDI that I created recently.


Choose the number of machines for this Delivery group



Add Users or group names here to whom you want to allow access.

As I am doing for testing purpose so selecting here Domain admins



If you want to publish an application from here, Click Add and publish application as well but in my case I am not publishing application from here.


Click next.



Click next



Enter Display name that will show when you will launch Citrix storefront web console

Check mark on Enable desktop.



Click next



Enter delivery group name

Click finish


Now newly delivery group has been created.





Now launch Citrix  StoreFront and login with user ID  & Password


http://demopvsdc.ads.com/Citrix/StoreWeb/ 


Newly created Delivery group DEMOVDI is showing here.



Create Machine catalog in Citrix Studio 7.9 step by step

 Create Machine catalog in Citrix Studio 7.9 step by step

Login to DDC server where you have installed Citrix Studio

Open Citrix Studio console



Right click on Machine Catalogs -> Select Create Machine Catalog





Click Next

Select Operating system types (In my case I am creating for server OS)



Select Machine Management for VM select Power managed


Deployment type – in my case I am using PVS based



Enter PVS Name

Expend Site and select collection that you want to publish.



Click Next


Enter Machine catalog name

Enter machine catalog description 



Click Finish



New Machine catalog has created.

Now all 6 machines are showing that is available in that device collection.



PVS Device collection



Next steps will be create delivery group


http://www.mytechinfoit.com/2021/12/citrix-provisioning-2109-installation.html 

http://www.mytechinfoit.com/2021/12/how-to-create-bulk-machines-in-citrix.html 



Featured Post

HPE MSA 2040 configuration step by step

HPE MSA 2040 configuration Default IP range for HP SAN storage MSA 2040 is 10.0.0.1/2 You need to connect your laptop and storage with...