Azurepowershell.com
A System Administrator's Notebook

Browse:

  • Home
  • Powershell
  • Page 3
  • Login to Azure/Office 365 in a script

    How you can programmatically login to Azure/Office 365 in a script.

  • Start Powershell script in Task Scheduler

    An easy way to get the output from a script in a log file. Save this as a cmd and use it as the trigger.

  • Computer info template/example (quick and dirty)

    A quick and dirty script to get computer info

  • PS AppDeploy Blocked Progams

    If you block an application while you run a PS AppDeploy script and the script fails, you can manually remove the the lock in registry.

  • Office 365 repair remotely with Powershell

    You can use PS remoting to almost everything – like fixing Outlook

  • Remove Orphaned ADMX GPO values

    http://blog.jocha.se/tech/remove-orphaned-admx-gpo-values Example: 1Remove-GPRegistryValue -Name "My Group Policy" -key "HKLM\Software\Policies\Microsoft\Windows\Skydrive" -ValueName DisableFileSync

  • Use IP address for remote Powershell session

    1set-item wsman:\localhost\client\trustedhosts -value xxx.xxx.xxx.xxx

  • Manually remove Direct Access from a client

    If the client is unable to do a DNS lookup, remove the following in the registry to disable/remove Direct Access DNS config. 123456$reg = ‘HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\DnsPolicyConfig’ Get-ChildItem -Path $reg | ForEach {Remove-Item $_.pspath} Restart-Service DNSCache -force

  • SCVMM: Force remove missing VM

    Make sure you get the correct VM Get-VM -Name “VM Name”  | Ft Name When you know that the first query give you the correct VM, and only that VM Get- VM -Name “VM Name” | Remove-VM -Force

  • Powershell: Rename remote computer with WMI

    To rename a computer when Rename-Computer is not available (pre Powershell 4.0) Get-WmiObject Win32_ComputerSystem -ComputerName OLDNAME -Authentication 6 | ForEach-Object {$_.Rename(“NEWNAME”,”PASSWORD”,”USERNAME”)}   You can also mask the password $credential = Get-Credential Get-WmiObject Win32_ComputerSystem -ComputerName OLDNAME -Authentication 6 | ForEach-Object {$_.Rename(“NEWNAME”,$credential.GetNetworkCredential().Password,$credential.Username)}

« 1 2 3

Powered by WordPress. Theta theme by CooThemes.com.