I mentioned in a previous post that we were experimenting with Azure Virtual Desktop. One of the things that I need to be able to do is launch from a web page. We have figured out how to do that using this info: Uniform Resource Identifier schemes with the Remote Desktop client for Azure Virtual… Continue reading Further AVD Adventures
Tag: PowerShell
Launching an AVD Published App Via Command Line
We are experimenting with Azure Virtual Desktop and I have a need to launch a published application from a command line. I haven’t found much documentation on that, and perhaps that is because I don’t know where to look. However, I did find out a few things that might help me. Everyone who has the… Continue reading Launching an AVD Published App Via Command Line
Pull DHCP info using PowerShell
This short script will get all the DHCP servers authorized in your Windows domain, and pull all the scopes and IPs. It exports these to two separate CSV files. $DHCPServers = Get-DhcpServerInDC If (Test-Path -Path $env:TEMP\Scopes.csv) {Remove-Item $env:TEMP\Scopes.csv} If (Test-Path -Path $env:TEMP\Leases.csv) {Remove-Item $env:TEMP\Leases.csv} If (Test-Path -Path $env:TEMP\Leases.csv) {Remove-Item $env:TEMP\DNSExport.csv} foreach ($_ In $DHCPServers) {… Continue reading Pull DHCP info using PowerShell
DNS PowerShell one liner
This is a “one liner” that pulls all the DNS Entries for a particular zone, including the IPv4 and IPv6. If you don’t care about the IPv6, you can remove that segment of the code. Get-DnsServerResourceRecord –ComputerName <DNSServerName> –ZoneName <YourZoneName> | Select-Object DistinguishedName,HostName,@{Name=’IPv4Address’;Expression={$_.RecordData.IPv4Address.IPAddressToString}},@{Name=’IPv6Address’;Expression={$_.RecordData.IPv6Address.IPAddressToString}},RecordType,Timestamp,TimeToLive | Export-Csv $env:TEMP\DNSExport.csv –NoTypeInformation It is amazing how much you can do… Continue reading DNS PowerShell one liner
SharePoint Documents are all checked out
I wanted to write a PowerShell script to check all the documents back in that had been checked out. Turns out that is not as straight forward as I had hoped. First search came up with this: Office Discarding Check Out Using PowerShell Then when I tried to run the command (from the server console,… Continue reading SharePoint Documents are all checked out
Operations Manager 2012 R2 Management Pack Dependencies
I am not proficient at managing Ops Manager. I am at best a competent tinkerer. I have been needing to do some clean up on our Ops Manager installation, and clear some management packs that are not used, or just used to generate noise that we subsequently ignore. That is a bit of an annoying… Continue reading Operations Manager 2012 R2 Management Pack Dependencies
Script to fix “unknown” power state in Xen Desktop
After an unpretty Hyper-V cluster failover, several machines in our Xen Desktop deployment were showing an “unknown” power state. After a call to Citrix, they gave my coworker a few commands to use to fix it. This has to be done from the Xen Desktop controller: Load the Citrix PSSnapIn: Add-PSSnapIn Citrix.* This gets… Continue reading Script to fix “unknown” power state in Xen Desktop
Launch a PowerShell script minimized
We use Citrix for a lot of applications, and I have a need to launch Outlook, then an application, and then close Outlook when that application is closed by the user. This seems like a pretty simple thing to do (and I suppose it is, sort of) but it took me a while to figure… Continue reading Launch a PowerShell script minimized
Using Powershell to get logon script path from Active Directory
If you want to know what logon script users are getting, this is an easy way to get that information: Import-Module -Name ActiveDirectory Get-ADUser -Filter * -SearchBase "OU=YourOUName,DC=YourDomain,DC=COM" -properties ScriptPath | Export-Csv "c:\script\ADUser.csv" Note: In order for this to work, you have to have the ActiveDirectory Module loaded.
Not recognized as a cmdlet…
I have been working on a simple little script to copy a file and then launch a program. I am sure that there are a lot of ways to do it, but I decided to use PowerShell, and this is what I came up with: $CheckForFile = "H:\custom.ini" $FileToCopy = "c:\IT\custom.ini" $CopyFileTo = "H:\" $PathTest… Continue reading Not recognized as a cmdlet…