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: Scripting
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
Express Route Provisioning Error
We have recently decided to invest in an Express Route circuit for Azure. It is supposed to be helpful with Azure and Office 365. There are two ways to provision the ExpressRoute circuit. Both require PowerShell. There is the classic: https://azure.microsoft.com/en-us/documentation/articles/expressroute-howto-circuit-classic/ And there is the Resource Manager: https://azure.microsoft.com/en-us/documentation/articles/expressroute-howto-circuit-arm/ Here is the note about those… Continue reading Express Route Provisioning Error
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…
PowerShell Confirm Preference
I seem to run into an issue when I run some PowerShell scripts where I get prompted at each line of the script for confirmation. That can get really annoying, so I have to look up how to prevent that behavior. Thankfully, there is already some good information out there on how to do that:… Continue reading PowerShell Confirm Preference