Azure recipes

See also: all the recipes and the intro # docs about Azure VMs https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-disks-vhds/ # Azure PowerShell tools https://azure.microsoft.com/en-us/downloads/ # How to upload a VHD to Azure https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-create-upload-vhd-windows-server/ # How to acess HTTP PowerShell in Azure http://michaelwasham.com/windows-azure-powershell-reference-guide/introduction-remote-powershell-with-windows-azure/ # Script to install the Azure root cert on machines that will be connecting to # Azure VMs…

0

Certificate recipes

See also: all the recipes and the intro See also my series of posts about the certificates. The recipes here partially overlap with the information from these posts. # Machine Certificates http://msdn.microsoft.com/en-us/library/windows/desktop/cc542475%28v=vs.85%29.aspx # how to create certs in .NET http://stackoverflow.com/questions/13806299/how-to-create-a-self-signed-certificate-using-c # how to create self-signed certs with makecert.exe https://msdn.microsoft.com/en-us/library/ms733813%28v=vs.110%29.aspx # cert EKU values https://support.microsoft.com/en-us/kb/287547 http://stackoverflow.com/questions/10019412/certificates-oid-reference-for-extended-key-usages…

0

assorted PowerShell recipes

See also: all the recipes and the intro # setting up the powershell remoting http://technet.microsoft.com/en-us/magazine/ff700227.aspx # setting the limits for powershell remoting http://stackoverflow.com/questions/13561730/maximum-data-size-in-a-remote-command http://powershell.com/cs/media/p/7257.aspx#using-custom-session-configurations # Encrypting with RSA in PowerShell http://powershell.org/wp/2014/02/01/revisited-powershell-and-encryption/ # encrypting with RSA http://stackoverflow.com/questions/26300364/alternative-for-system-security-cryptography-pkcs-on-windows-mobile-6 # custom powershell object http://social.technet.microsoft.com/wiki/contents/articles/7804.powershell-creating-custom-objects.aspx # .NET/PowerShell string formatting http://go.microsoft.com/fwlink/?LinkID=166451 # PowerShell function parameters http://social.technet.microsoft.com/wiki/contents/articles/15994.powershell-advanced-function-parameter-attributes.aspx # PowerShell classes http://technet.microsoft.com/en-us/library/dn820211.aspx…

0

Security descriptor recipes

See also: all the recipes and the intro For a nicer introduction, please read my series of posts on security descriptors. Here are just the short recipes (partially overlapping with that series). # Privileges and SDDL http://msdn.microsoft.com/en-us/library/windows/desktop/aa379306%28v=vs.85%29.aspx # Changing ACLs from PowerShell http://technet.microsoft.com/en-us/magazine/2008.02.powershell.aspx # ACL/SDDL in .NET https://msdn.microsoft.com/en-us/library/ms229925%28v=vs.110%29.aspx # Control of permissions in PowerShell http://stackoverflow.com/questions/7690994/powershell-running-a-command-as-administrator…

0

WMI recipes

See also: all the recipes and the intro WMI is an RPC interface that allows to control the arbitrary processes, including the Windows kernel and subsystems. # WMI browsing (doesn’t seem to work well) http://www.microsoft.com/en-us/download/details.aspx?id=24045 # With powershell get-WmiObject -class Msft_Providers | fl -property * get-wmiObject -list | select-string Provider # Developing a WMI provider…

0

network configuration recipes

See also: all the recipes and the intro See also how to configure CredSSP with PowerShell. #  DHCP server In a VM must use the Legacy adapter, or it would refuse to get a static address, and DHCP will refuse to attach to interfaces with dynamic address. # how to shut up the DHCP authorization…

0

assorted recipes and links

See also: all the recipes and the intro I have collected here the small groups of recipes and links that are not worthy a separate post each. As usual, some of the recipes are for cmd, some for PowerShell, guessing which is which is easy enough. # Windows CMD command syntax http://ss64.com/nt/syntax.html # To search…

0

how to upload a machine cert to Azure

When you’re creating a VM with the Azure Resource Manager (“new Azure portal”) and want to connect to it through WinRM/PowerShell with the HTTPS protocol, you have to provide a machine certificate for it. In the old Azure it was easier, it would generate a cert on its own and would let you download its…

0

how to run PowerShell from SetupComplete.cmd

See also: all the recipes and the intro In case if you didn’t know, %windir%\Setup\Scripts\SetupComplete.cmd is an user script that runs at the end of Windows setup, in case if you place it there either in advance or from some script that you run in the middle of setup from Unattend.xml. SetupComplete.cmd runs after the…

0

how to mount a System partition

As I’ve mentioned before, the on the machines with EFI BIOS the boot files are located on a separate System partition that can be mounted. However the direct mounting of it doesn’t work so well, leaving a drive letter busy even after unmounting. If you want to modify a lot of VHDs for the v2…

0