Login to Azure/Office 365 in a script
How you can programmatically login to Azure/Office 365 in a script.
How you can programmatically login to Azure/Office 365 in a script.
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.
A quick and dirty script to get computer info
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.
You can use PS remoting to almost everything – like fixing Outlook
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
1set-item wsman:\localhost\client\trustedhosts -value xxx.xxx.xxx.xxx
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
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
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)}