tag:blogger.com,1999:blog-22069142930183434652024-02-20T11:30:21.665+00:00Under The FleeceJon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.comBlogger76125tag:blogger.com,1999:blog-2206914293018343465.post-82540222518733720782019-01-04T15:40:00.002+00:002019-01-04T15:40:53.300+00:00Microsoft Teams: Changing Time/Date Settings<span style="font-family: Arial, Helvetica, sans-serif;">When using the installed Microsoft Teams client it is possible to change the time/date settings to display formatting other than US English.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To do so, click your user icon in the top right corner of the screen and go to "Settings". Change the App language to your preferred setting and click "Save and Restart". Once Teams loads again the date/time formats with be set correctly</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com18tag:blogger.com,1999:blog-2206914293018343465.post-88026512871470916862019-01-04T15:36:00.000+00:002019-01-04T15:36:33.376+00:00Microsoft Azure: Get-AzSubscription Returns Token Error<div class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">Recently I changed my Azure login to use my organisational account rather than a Microsoft account for a particular subscription. Following this I found I was unable to access the subscription via PowerShell.</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Running the cmdlet "Get-AzSubscription" (or "Get-AzureRmSubscription" if you use the older command set) returned the information for most of my subscriptions but threw the following warning for the subscription where my login had been changed;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">WARNING: Unable to acquire token for tenant 'x''</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">After some investigation I found that my old credentials were cached in the context. Running the following cmdlet cleared this cache and allowed the subscription to be access via PowerShell again;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">Clear-AzContext<br />(or Clear-AzureRmContext with the older cmdlets)</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">You can disable this auto-caching of tokens by using the following;</span><br />
<blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">Disable-AzContextAutosave<br />(or Disable-AzureRmContextAutosave with the older cmdlets)</span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com16tag:blogger.com,1999:blog-2206914293018343465.post-40793734827113104682018-08-24T09:56:00.003+01:002018-08-24T09:57:10.274+01:00vSphere: Find VM by MAC Address<span style="font-family: "arial" , "helvetica" , sans-serif;">While trawling through event logs on a Windows server I encountered the following error;</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">The system detected an address conflict for IP address x.x.x.x with the system having network hardware address 00-50-56-xx-xx-xx. Network operations on this system may be disrupted as a result</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Knowing that 00-50-56 is a VMware MAC Address I used PowerShell to search for the network adaptor with that MAC assigned;</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Get-VM | Get-NetworkAdapter | Where {$_.MacAddress -eq “00:50:56:xx:xx:xx”} | fl</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"> The "Parent" in the resulting output is the VM name</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com2tag:blogger.com,1999:blog-2206914293018343465.post-17782711789976016582018-02-28T12:00:00.003+00:002019-01-04T15:36:54.102+00:00AWS: IAM Users And Groups Report<span style="font-family: Arial, Helvetica, sans-serif;">The following script will pull the list of groups associated with IAM users in AWS. The user list can be generated by going to the IAM service in the AWS console and selecting "Credential Report".</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">$users = get-content iam-users.txt</span></blockquote>
</blockquote>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">$report = @() </span></blockquote>
</blockquote>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">foreach ($user in $users)</span></blockquote>
</blockquote>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">{</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"> $info = Get-IAMGroupForUser -UserName $user | select -ExpandProperty GroupName</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">$report+="$user, $info"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">}</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">$report | Out-File "user-groups.csv"</span></blockquote>
</blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com2tag:blogger.com,1999:blog-2206914293018343465.post-61857329876076826372017-09-05T10:06:00.002+01:002017-09-05T10:07:14.077+01:00Office 365: Granting Access To Another User's OneDrive Folder<span style="font-family: "arial" , "helvetica" , sans-serif;">The guide below walks you through granting access to another user's OneDrive for Business folders via the Office 365 admin console.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://4sysops.com/archives/onedrive-for-business-part-4-access-user-files-and-ediscovery/">https://4sysops.com/archives/onedrive-for-business-part-4-access-user-files-and-ediscovery/</a></span><br />
<br />Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-27274725059978425622017-07-07T16:29:00.002+01:002017-07-07T16:29:30.043+01:00PowerShell: Get Hostname Following Successful Ping<span style="font-family: Arial, Helvetica, sans-serif;">The script below will attempt to ping a range of IP addresses and if successful, will return their hostnames;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">1..10 | % {Test-NetConnection -ComputerName x.x.x.$_ -ErrorAction SilentlyContinue -WarningAction SilentlyContinue } | </span><span style="font-family: Arial, Helvetica, sans-serif;">Select ComputerName,RemoteAddress,PingSucceeded, `</span><span style="font-family: Arial, Helvetica, sans-serif;">@{ Name = 'HostName'; Expression = { If ($_.PingSucceeded){([System.Net.Dns]::gethostentry($_.computername)).HostName}Else{$null} } } | FT -AutoSize</span></blockquote>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Replace the "1..10" at the start of the command with the range of IP addresses you wish to scan and update the -ComputerName parameter with the IP you wish to scan (e.g. 10.100.1.$_)</span></div>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-15812668198598090722017-07-07T16:24:00.000+01:002017-07-07T16:24:26.645+01:00PowerShell: Basic Networking Troubleshooting<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://www.thomasmaurer.ch/2016/02/basic-networking-powershell-cmdlets-cheatsheet-to-replace-netsh-ipconfig-nslookup-and-more/">http://www.thomasmaurer.ch/2016/02/basic-networking-powershell-cmdlets-cheatsheet-to-replace-netsh-ipconfig-nslookup-and-more/</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The above site has a nice "cheat sheet" of PowerShell cmdlets for networking tasks</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-88603537453750376302017-05-03T09:50:00.001+01:002017-05-03T09:50:48.355+01:00Azure: Recovery Services VM Backups Failing<span style="font-family: Arial, Helvetica, sans-serif;">This morning I received a number of emails telling me that the backups of some of my Azure VMs had failed with the following message;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<table class="azc-grid-full " data-bind="'attr':{'class':ko.unwrap("azc-grid-full"+" "+(ko.unwrap($ctl.getPlugin("azc-grid-selectableRow")._multiselect)?"azc-grid-multiselectable":"")+" "+(ko.unwrap($ctl.getPlugin("azc-grid-selectableRow")._showSelectionExperience)?"azc-grid-selectable":""))+" "+ko.unwrap((ko.unwrap($ctl.getPlugin("azc-grid-activateableRow")._activateOnSelected)?"azc-grid-activateonselected":""))}" role="presentation"><tbody class="azc-grid-groupdata" role="rowgroup">
<tr aria-selected="true" class="azc-grid-row fxs-portal-hover fxs-portal-selected" data-bind="'attr':{'class':ko.unwrap(ko.unwrap(ko.unwrap(ko.unwrap("azc-grid-row "+ cssClass())+" "+ko.unwrap((ko.unwrap($disabled)?"azc-row-disabled":"")))+" "+ko.unwrap("fxs-portal-hover"))+" "+ko.unwrap((ko.unwrap(selected())?"fxs-portal-selected":"")))+" "+ko.unwrap((ko.unwrap(!$disabled() && link() && link().uri)?"azc-grid-link":"")+" "+(ko.unwrap(activated())?"fxs-portal-selected":"")),'aria-disabled':$disabled,'data-grid-focusable':true,'tabindex':selected() || focused() ? $tabIndex():$focusIndex(),'data-grid-selectable':true,'aria-selected':selected() ?"true":"false",'data-grid-activateable':"true",'data-grid-row-activated':activated() ?"true":"false"}" data-grid-activateable="true" data-grid-focusable="true" data-grid-row-activated="false" data-grid-selectable="true" role="row" tabindex="0"><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643a"">
<div class="msportalfx-text-ellipsis">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Error Code</span></b></div>
</div>
</div>
</td><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643b"">
<div class="msportalfx-text-ellipsis ext-mab-joberrordetails-value">
<span data-bind="text: value"><span style="font-family: Arial, Helvetica, sans-serif;">UserErrorGuestAgentStatusUnavailable</span></span></div>
</div>
</div>
</td><!-- /ko --></tr>
<!-- /ko --><!-- ko template: { name: 'bodyRowsCore', data: $ctl.getRowMetadata($data), context: function (metadata) { return { $disabled: metadata.disabled || $disabled }; } } -->
<tr aria-selected="false" class="azc-grid-row fxs-portal-hover " data-bind="'attr':{'class':ko.unwrap(ko.unwrap(ko.unwrap(ko.unwrap("azc-grid-row "+ cssClass())+" "+ko.unwrap((ko.unwrap($disabled)?"azc-row-disabled":"")))+" "+ko.unwrap("fxs-portal-hover"))+" "+ko.unwrap((ko.unwrap(selected())?"fxs-portal-selected":"")))+" "+ko.unwrap((ko.unwrap(!$disabled() && link() && link().uri)?"azc-grid-link":"")+" "+(ko.unwrap(activated())?"fxs-portal-selected":"")),'aria-disabled':$disabled,'data-grid-focusable':true,'tabindex':selected() || focused() ? $tabIndex():$focusIndex(),'data-grid-selectable':true,'aria-selected':selected() ?"true":"false",'data-grid-activateable':"true",'data-grid-row-activated':activated() ?"true":"false"}" data-grid-activateable="true" data-grid-focusable="true" data-grid-row-activated="false" data-grid-selectable="true" role="row" tabindex="-1"><!-- ko template: { name: 'bodyCell', foreach: $vm.columns } --><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643c"">
<div class="msportalfx-text-ellipsis">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Error Message</span></b></div>
</div>
</div>
</td><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643d"">
<div class="msportalfx-text-ellipsis ext-mab-joberrordetails-value">
<span data-bind="text: value"><span style="font-family: Arial, Helvetica, sans-serif;">VM agent is unable to communicate with the Azure Backup Service.</span></span></div>
</div>
</div>
</td><!-- /ko --></tr>
<!-- /ko --><!-- ko template: { name: 'bodyRowsCore', data: $ctl.getRowMetadata($data), context: function (metadata) { return { $disabled: metadata.disabled || $disabled }; } } -->
<tr aria-selected="false" class="azc-grid-row fxs-portal-hover azc-grid-virtualFocus" data-bind="'attr':{'class':ko.unwrap(ko.unwrap(ko.unwrap(ko.unwrap("azc-grid-row "+ cssClass())+" "+ko.unwrap((ko.unwrap($disabled)?"azc-row-disabled":"")))+" "+ko.unwrap("fxs-portal-hover"))+" "+ko.unwrap((ko.unwrap(selected())?"fxs-portal-selected":"")))+" "+ko.unwrap((ko.unwrap(!$disabled() && link() && link().uri)?"azc-grid-link":"")+" "+(ko.unwrap(activated())?"fxs-portal-selected":"")),'aria-disabled':$disabled,'data-grid-focusable':true,'tabindex':selected() || focused() ? $tabIndex():$focusIndex(),'data-grid-selectable':true,'aria-selected':selected() ?"true":"false",'data-grid-activateable':"true",'data-grid-row-activated':activated() ?"true":"false"}" data-grid-activateable="true" data-grid-focusable="true" data-grid-row-activated="false" data-grid-selectable="true" role="row" tabindex="-1"><!-- ko template: { name: 'bodyCell', foreach: $vm.columns } --><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643e"">
<div class="msportalfx-text-ellipsis">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Recommended Action</span></b></div>
</div>
</div>
</td><td class="azc-grid-cell azc-br-muted " data-bind="'template':{ name:"bodyCellContent"},'attr':{'class':ko.unwrap("azc-grid-cell azc-br-muted "+ cssClass +(itemKey ==="infoBalloon"?"azc-grid-infoBalloon":""))+" "+ko.unwrap((ko.unwrap($data.hiddenInCollapsed)?"azc-collapsed-hidden":"")),'data-activatable':activatable(),'tabindex':activatable() ? $tabIndex():null,'data-grid-cell-activated':$parent.activated() === $data.itemKey ?"true":"false"}" data-grid-cell-activated="false" role="gridcell"><div class="azc-grid-cellContent" data-bind="css: { "azc-grid-cell-ellipse": $data.enableEllipse, "azc-grid-cell-fullheight": $data.fullHeight }, trustedHtml: $ctl._cellFormat($parentContext.$parentContext.$index, $index, $parent, $data)">
<div class="azc-vivaControl" data-bind="vivaControl: "58929ad6-a0ff-414e-8bb0-c3c33bab643f"">
<div class="msportalfx-text-ellipsis ext-mab-joberrordetails-value">
<span data-bind="text: value"><span style="font-family: Arial, Helvetica, sans-serif;">Ensure the VM has network connectivity and the VM agent is latest and running. For more information, please refer to http://go.microsoft.com/fwlink/?LinkID=823919 </span></span></div>
</div>
</div>
</td></tr>
</tbody></table>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">When I have encountered this message previously, one of the following three actions has resolved the error and allowed backups to work again;</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">1. Connect to the VM and check the "IaasVmProvider" service. This should be running with the startup type set to Automatic and logging on with the local system account. If this is stopped, start the service.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">2. Update the agent on the VM by reinstalling the VMAgent binary as outlined at https://docs.microsoft.com/en-gb/azure/backup/backup-azure-vms-troubleshoot#vm-agent. NOTE: Make sure no backups are running on your VM when you do this.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">3. Reinstall the VMSnapshot extension by browsing to the VM in the Azure portal and clicking on "Extensions". Uninstall the "VMSnaphot" extension then try to run the backup again. This will reinstall the extension and automatically start the IaasVMProvider service in the OS.</span></div>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-76515131837114558462017-04-04T14:56:00.000+01:002017-04-04T14:56:28.874+01:00vSphere: Snapshot Error - Change Tracking Target File Already Exists<span style="font-family: Arial, Helvetica, sans-serif;">I ran into an issue when attempting to consolidate and create snapshots of VMs being backed up using NetBackup. The snapshot creation would start but fail at 10% with the following error;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"><i>An error occurred while saving the snapshot: Change tracking target file already exists.</i></span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;"> This is quite a easy fix and simply involves moving the ctk files out of the root folder.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">1. SSH to ESXi host that the VM is running on.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2. Navigate to the virtual machine directory using the following command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">cd /vmfs/volumes/datastore/virtual_machine/</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">3. List the contents of the directory with "ls" and look for file including "-ctk.vmdk".</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">4. Create a temporary directory using the following command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">mkdir temp</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">5. Move the ctk files into this directory using the following command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"> <span style="background-color: white; color: #333333;">mv *-ctk.vmdk temp/</span></span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">6. Attempt to take another snapshot to confirm this is now working.</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com3tag:blogger.com,1999:blog-2206914293018343465.post-21295975629127318602017-01-17T09:22:00.005+00:002017-01-17T09:22:47.973+00:00Windows: Wrongly Hidden "Protected Operating System" Files and Folders<span style="font-family: Arial, Helvetica, sans-serif;">I came across an issue where a folder of SQL backups had been wrongly marked as hidden. They had been classed as "Protected Operating System Files" and so the "hide" box in the properties was greyed out.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Running the below from the command line removes the Hidden and System properties from the folder as well as from all sub-folders inside the top level.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #444444;">attrib -H -S C:\path\to\your\folder /S /D</span> </span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">or </span><br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #444444;"><span style="font-family: Arial, Helvetica, sans-serif;">attrib -H -S C:\path\to\your\file.doc /S /D</span></span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-22669114860605797762016-12-14T13:20:00.001+00:002016-12-14T13:20:51.644+00:00VMware SRM 6.0: Unable To Protect VMs - "Device not found: CD/DVD drive 1"<div class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">When trying to protect a number of VMware Virtual Machines with SRM 6.0 we ran into the following alert on some of the VMs;</span></div>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">"Device not found: CD/DVD drive 1"</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">This is due to an ISO image being mounted to the Virtual Machine (sometimes VMware tools or an OS disk). If you have a large number of VMs to set back to "Client Device" for CD settings you may want to do this by running the following script;</span><br />
<blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">$vms = Get-Content C:\Scripts\In\cd-vms.txt</span></blockquote>
<blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">foreach($vm in $vms){<br /> Get-VM -Name $vm | Get-CDDrive | Set-CDDrive -NoMedia -Confirm:$false<br />}</span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">This will set the CD settings to "Client Device" and confirm silently rather than needing to receive user input for each VM. </span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-36783921883791021362016-10-14T13:24:00.000+01:002016-10-14T13:24:08.260+01:00vSphere: List Network Details For All Hosts<span style="font-family: Arial, Helvetica, sans-serif;">I had a requirement to view detailed network information for all host NICs under a vCenter server. The following command generates the required information (including MTU, IP and MAC addresses) and exports this to a .CSV file;</span><br />
<br />
<blockquote class="tr_bq">
<span style="background-color: white; color: #384452;"><span style="font-family: Arial, Helvetica, sans-serif;">Get-VMHostNetworkAdapter | select VMhost, Name, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec | Export-Csv C:\VMHostNetworkDetails.csv</span></span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-20845374907225067792016-08-23T13:33:00.002+01:002016-08-23T13:40:54.419+01:00AWS: Enabling Federation With ADFS<span style="font-family: "arial" , "helvetica" , sans-serif;">Following the guide found in the blog post below;</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="https://blogs.aws.amazon.com/security/post/Tx71TWXXJ3UI14/Enabling-Federation-to-AWS-using-Windows-Active-Directory-ADFS-and-SAML-2-0">https://blogs.aws.amazon.com/security/post/Tx71TWXXJ3UI14/Enabling-Federation-to-AWS-using-Windows-Active-Directory-ADFS-and-SAML-2-0</a></span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This guide allowed us to set up federation using ADFS 3.0. The only thing to note which does not appear to be in the blog post, is that the Active Directory Security Groups that you create (starting AWS-) must be <b>Global or Universal</b>. This will not work if the group has been created as Domain Local.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">If you have created the group at this level you can change this without needing to recreate the Security Group. Simply set the Group Scope to "Universal" as this will then allow the "Global" box to be selected again.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: arial, helvetica, sans-serif;">This will also accept nested groups when granting access so you do not need to add all users individually.</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-64564026734956597592016-08-15T08:58:00.001+01:002016-08-23T11:40:17.238+01:00Azure: Using Azure AzCopy<span style="font-family: "arial" , "helvetica" , sans-serif;">When attempting to upload files to a storage account in Azure, if you upload using the portal no Check-MD5 value appears to be generated. In order to have a value generated you need to use the AzCopy tool.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Once you have this installed, open a command prompt and run the tool (default installation location will be <i>C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe</i>)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">To upload a single file to a location, use the following command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">AzCopy /Source:<b>A:\Folder\On\My\Computer</b> /Dest:<b>https://storageaccount.file.core.windows.net/filescontainer/folder</b> /DestKey:<b>Storage-Account-Access-Key</b> /Pattern:<b>FileName.ext</b></span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Replace the bold text with your parameters</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">/Source: needs to be the folder location only - do not include the file name or the command will fail. The file name is specified in /Pattern:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b><u>Update:</u></b></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Alternatively, if you have several files to upload to a single location and so want to copy the entire contents of a folder, you can run the command below. This copies all content in a directory including structure;</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">AzCopy /Source:<b>A:\Folder\On\My\Computer</b> /Dest:<b>https://storageaccount.file.core.windows.net/filescontainer/folder</b> /DestKey:<b>Storage-Account-Access-Key</b> /S</span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-13564892315223148042016-06-20T10:39:00.000+01:002016-06-20T10:39:22.828+01:00ESXi: Restart Management Agents<span style="font-family: "arial" , "helvetica" , sans-serif;">Running ESXi 5.0.0 with command line access the following commands will restart the management agents - logged in as root;</span><br />
<blockquote class="tr_bq">
<span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif; font-style: inherit; font-variant: inherit; line-height: inherit;">/etc/init.d/hostd restart</span><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif; font-style: inherit; font-variant: inherit; line-height: inherit;">/etc/init.d/vpxa restart</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This was required when the host stopped reporting it's CPU and Memory usage in vSphere Client. </span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-12009401639411579542016-06-16T15:37:00.000+01:002016-06-16T15:37:02.193+01:00Compatibility View In IE11<span style="font-family: Arial, Helvetica, sans-serif;">After adding some additional sites to the "<b>Use Policy List of Internet Explorer 7 sites</b>" policy in Group Policy we found that these sites were not running in compatibility view for the user despite RSOP reporting that the policy was in place, and the user's registry reporting the same.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">(Registry key can be found at <i>HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\BrowserEmulation\PolicyList</i>)</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">There is a known limitation in IE11 whereby it doesn't run sites presented from this policy. Instead if you want to enable compatibility mode via GPO you need to <b>turn on Enterprise Mode</b>.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The TechNet document below gives the steps to deploying from GPO, as well as creating a registry entry to test with a single user.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="https://technet.microsoft.com/en-us/itpro/internet-explorer/ie11-deploy-guide/turn-on-enterprise-mode-and-use-a-site-list">https://technet.microsoft.com/en-us/itpro/internet-explorer/ie11-deploy-guide/turn-on-enterprise-mode-and-use-a-site-list</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">If you turn Enterprise Mode on and still cannot select it from the "Tools" menu in IE11, chances are you are missing update <b>3087038</b> (KB3089548). If this is not installed you will not be able to turn on Enterprise Mode in the browser.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />More information on this update can be found at</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="https://support.microsoft.com/en-us/kb/3089548">https://support.microsoft.com/en-us/kb/3089548</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The update itself can be downloaded from</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="https://technet.microsoft.com/library/security/MS15-094">https://technet.microsoft.com/library/security/MS15-094</a></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Once this is installed you should be able to use Enterprise Mode to view sites that require compatibility.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To create the XML file containing sites to be displayed using Enterprise Mode download the <b>Enterprise Mode Site List Manager</b> tool from h<a href="ttps://www.microsoft.com/en-us/download/details.aspx?id=42501">ttps://www.microsoft.com/en-us/download/details.aspx?id=42501</a></span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-67409638520560542032016-06-08T16:23:00.000+01:002016-06-09T14:59:02.806+01:00DNS: Converting An Automatically Created Record To Static<span style="font-family: "arial" , "helvetica" , sans-serif;">I had a requirement to convert a large number of automatically created DNS "A" records into static entries to avoid issues with DNS scavenging. Rather than manually creating a static record then removing the existing one, this can be accomplished with a few clicks.</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">1. In "<b>DNS Manager</b>" select "<i>View</i>" > "<i>Advanced</i>"</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">2</span><span style="font-family: "arial" , "helvetica" , sans-serif;">. Browse into the appropriate "<b>Forward Lookup Zone</b>" and select the "A" record you wish to convert to static.</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">3. Double click the record (or right click and select "Properties") and uncheck the "<b>Delete this record when it becomes stale</b>" tick box.</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">4. Click <b>OK</b>.</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">When you refresh the page you'll now see the time stamp has been removed from the record and is instead set to "Static"</span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-38952376173839583892016-05-18T08:27:00.001+01:002016-05-18T08:27:23.376+01:003PAR: Check Licensed Features<span style="font-family: Arial, Helvetica, sans-serif;">In order to check which features you are licenced for on your 3PAR, open a connection to the CLI and run the command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"><b>showlicense</b></span></blockquote>
<span style="font-family: Arial, Helvetica, sans-serif;">You should see a response similar to;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">License key was generated on <i>date</i></span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">License features currently enabled:<br />Dynamic Optimization<br />InForm Suite<br />System Reporter<br />Thin Conversion<br />Thin Copy Reclamation<br />Thin Persistence<br />Thin Provisioning (44032G)<br />Virtual Copy</span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-9215147886959689412016-04-26T11:24:00.005+01:002016-04-26T11:24:56.706+01:00Get PowerShell Version<span style="font-family: Arial, Helvetica, sans-serif;">To find out which version of PowerShell you are using, run the following in PowerShell;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="background-color: white; line-height: 21px;"><span style="font-family: Arial, Helvetica, sans-serif;"><b>$PSVersionTable.PSVersion</b></span></span><br />
<span style="background-color: white; line-height: 21px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<span style="background-color: white; line-height: 21px;"><span style="font-family: Arial, Helvetica, sans-serif;">You will get an output similar to;</span></span><br />
<span style="background-color: white; line-height: 21px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 21px;">Major Minor Build Revision</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 21px;">----- ----- ----- --------</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 21px;"></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 21px;">5 0 10586 117</span></span>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-73691167588929612662016-04-22T08:44:00.001+01:002016-04-22T08:44:59.025+01:00Formula to Calculate LUN Number in HP-UX<span style="font-family: Arial, Helvetica, sans-serif;">***** This formula only works if the LUN number isn't too high (ie over 100ish) *****</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The disk in HP-UX has the identifier <b>/dev/dsk/c</b><i>x</i><b>t</b><i>y</i><b>d</b><i>z</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Take the <b>/c</b><i>x</i><b>t</b><i>y</i><b>d</b><i>z</i> portion and apply the formula below;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">(y x 8) + z</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">This should give you the LUN number from the SAN device. In the example below this would be;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<b style="font-family: Arial, Helvetica, sans-serif;">c52t2d1</b><br />
<b style="font-family: Arial, Helvetica, sans-serif;"><br /></b>
<b style="font-family: Arial, Helvetica, sans-serif;">t =2, d = 1</b><br />
<b style="font-family: Arial, Helvetica, sans-serif;"><br /></b>
<b style="font-family: Arial, Helvetica, sans-serif;">(2 x 8) + 1 = 17</b><br />
<b style="font-family: Arial, Helvetica, sans-serif;"><br /></b>
<span style="font-family: Arial, Helvetica, sans-serif;">LUN number is </span><b style="font-family: Arial, Helvetica, sans-serif;">17</b>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-9531470877385671592016-03-31T08:23:00.002+01:002016-03-31T08:23:54.928+01:00Adding Users To Local Groups On Domain Controllers<span style="font-family: "arial" , "helvetica" , sans-serif;">As the local groups are hidden in Computer Management on a Domain Controller, this needs to be done via command line;</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">net localgroup "<i>groupname</i>" "<i>domain\username</i>" /add</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">For example;</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">net localgroup "Remote Desktop Users" "UTF\Jon" /add </span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-19730741007073013502016-02-03T17:32:00.000+00:002016-02-03T17:32:07.321+00:00Exchange Online - Get Distribution Lists With Owners<span style="font-family: Arial, Helvetica, sans-serif;">I had a requirement to generate a list of all distribution lists with their owners. In the Exchange portal on Office 365 I could export a list but there was no option to include the owners of the list.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I managed to get the information I needed using Powershell. Having connected Powershell to Exchange Online I ran the following command;</span><br />
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;">Get-DistributionGroup -Filter * | Select Name, ManagedBy | Export-CSV C:\export.csv -NoTypeInformation</span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-60272460230324170552016-02-03T15:45:00.001+00:002016-02-04T16:28:37.340+00:00Exchange Online - Connecting With Powershell<span style="font-family: "arial" , "helvetica" , sans-serif;">1. Open Powershell and run;</span><br />
<blockquote class="tr_bq">
<span style="line-height: 17.55px;"><span style="font-family: "arial" , "helvetica" , sans-serif;">$UserCredential = Get-Credential</span></span></blockquote>
<span style="line-height: 17.55px;"><span style="font-family: "arial" , "helvetica" , sans-serif;">2. Enter your Exchange Online credentials</span></span><br />
<span style="line-height: 17.55px;"><span style="font-family: "arial" , "helvetica" , sans-serif;">3. Run;</span></span><br />
<blockquote class="tr_bq">
<span style="line-height: 17.55px;"><span style="font-family: "arial" , "helvetica" , sans-serif;">$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection</span></span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">4. Run;</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Import-PSSession $Session</span></blockquote>
<span style="font-family: "arial" , "helvetica" , sans-serif;">When you are finished run;</span><br />
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Remove-PSSession $Session </span></blockquote>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-34789495081833496052016-02-03T14:34:00.002+00:002016-02-03T14:34:42.460+00:00Windows 10 - Show "Run As Different User" On The Start Menu<span style="font-family: Arial, Helvetica, sans-serif;">By default, unlike in Windows 7 there is no option in Windows 10 to run software from the Start Menu as a different user when you Shift + Right Click. To enable this option again follow the steps below;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">1. Open <b>regedit</b> and browse to;</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<i><span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 23px;">HKEY_CURRENT_USER\Software\Policies\</span><span style="background-color: white; line-height: 23px;">Microsoft\Windows\Explorer</span></span></i><br />
<i><span style="background-color: white; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></i>
<span style="background-color: white; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;">If <b>Explorer</b> does not exist, create it as a new key under <b>Windows</b>.</span></span><br />
<span style="background-color: white; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; line-height: 23px;">2. A</span><span style="background-color: white; line-height: 23px;">dd a </span><span style="background-color: white; box-sizing: border-box; line-height: 23px;"><b>DWORD</b></span><span style="background-color: white; line-height: 23px;"> with the value </span><span style="background-color: white; box-sizing: border-box; line-height: 23px;"><i>ShowRunasDifferentuserinStart</i>.</span></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;">3. Right click the new DWORD and set the value to<b> 1</b>. Click OK.</span></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;">4. Restart your machine.</span></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div>
<span style="background-color: white; box-sizing: border-box; line-height: 23px;"><span style="font-family: Arial, Helvetica, sans-serif;">After the restart you should now be able to "Run As Different User" in the Start Menu.</span></span></div>
Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0tag:blogger.com,1999:blog-2206914293018343465.post-3218124207099618212016-01-04T12:14:00.001+00:002016-01-04T12:14:28.333+00:00Find .ISOs Attached To VMs<span style="font-family: Arial, Helvetica, sans-serif;">To get a list of all .ISOs attached to the CD drive of VMs, run the script below. This will give you the server name that the ISO is connected to, as well as the path to that ISO.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />I used this when trying to delete old ISO images from a datastore. The file would not delete as it was still attached to a VM.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"><i>Get-VM | where { $_ | Get-CDDrive | where { $_.ConnectionState.Connected -eq "</i></span><span style="font-family: Arial, Helvetica, sans-serif;"><i>true" -and $_.ISOPath -like "*.ISO*"} } | select Name, @{Name=".ISO Path";Expression={(Get-CDDrive $_).isopath }}</i></span></blockquote>
<i><span style="font-family: Arial, Helvetica, sans-serif;"></span></i>Jon Langridgehttp://www.blogger.com/profile/02465795658954772411noreply@blogger.com0